Bash Script Help

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

  1. Linux-novice

    Linux-novice New Member

    Joined:
    Nov 21, 2013
    Messages:
    1
    Likes Received:
    1
    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 Well-Known Member Staff Member Staff Writer

    Joined:
    May 21, 2013
    Messages:
    1,635
    Likes Received:
    1,273
  3. ryanc

    ryanc New Member

    Joined:
    Jan 1, 2014
    Messages:
    12
    Likes Received:
    10
    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