Bash Script Help

L

Linux-novice

Guest
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
 


R

ryanc

Guest
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.
 


Members online

No members online now.

Latest posts

Top