Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding multiple users with a script / other tool 1

Status
Not open for further replies.

Tarquin

Technical User
Jun 17, 2001
38
AU
I'm using RH7.1 and need to set up some servers to replace existing RH6.2 and SunOS servers (with different groups of users).
Basically there are 100 + users per box and I want to know if the is a tool / script available to copy user names, groups and shadow while setting up new options such as .ssh and .Desktop etc which exist on 7.1 by default when users are added manually.
 
If the users are already defined in /etc/passwd on another box just copy /etc/passwd, /etc/shadow and /etc/group to the other box, then create an /etc/skel directory with all the default .bash_profile, .bashrc, .ssh, .Desktop files/directories in it. For existing users just copy their home directories onto the new box using a tar backup of the old machine. When new users are created their home directories will be created by reading the /etc/skel directory and copying the files in if you use the "-m -k /etc/skel" option of the "adduser" command. See "man adduser" for other options. d3funct
zimmer.jon@cfwy.com
The software required `Windows 95 or better', so I installed Linux.

 
Please see the post very similar to this for a bash or perl script to add make passwd changes/adds:also see the expect
site at nist or -get expect.
 
Thanks for your response d3funct.

Have moved passwd shadow and group but I am wondering if I can get existing users (with a /home directory) to get the rest of the items in /etc/skel and ssh installed?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top