Bash Script Help

Discussion in 'General Linux' started by Linux-novice, Nov 21, 2013.

  1. Linux-novice

    Linux-novice New Member

    Messages:
    1
    Likes Received:
    1
    Trophy Points:
    3
    Hi,

    I look after a number of ubuntu servers in the cloud which I access via ssh. At moment new users are created manually which is time consuming. I need to create a bash script but have no clue how to.

    The script needs to do the following


    Create new user if doesnt exist, create password for new user, create development group if doesn't exist add new user to group, add development group to /etc/sudoers file.

    nice to have:

    Create default iptables. Save in /etc as iptables.firewall.rules and add rule to rc.local to automatically restore iptables.firewall.rules if server rebooted.

    Would very much appreciate some help

    Thanks
    DevynCJohnson likes this.
  2. DevynCJohnson

    DevynCJohnson Super Moderator Staff Member Staff Writer

    Messages:
    973
    Likes Received:
    857
    Trophy Points:
    93
  3. ryanc

    ryanc New Member

    Messages:
    11
    Likes Received:
    6
    Trophy Points:
    3
    Doesn't directly answer your question but how many servers are we talking about? It may be that centrally managing your users via LDAP would be a cleaner and easier to manage option.
    DevynCJohnson likes this.

Share This Page