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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy users and groups to another server

Status
Not open for further replies.

230173

MIS
Jun 22, 2001
208
SG
Hi,

Is it possible to copy all the users and groups from one server to another with the same AIX version on it (5.1)?

Deeway
 
hi,
in V 4.3.3 I make the following steps:

In source machine
------------------

1) copy lines of these users from /etc/passwd
to a dummy file.
Same operation for /etc/groups

2) copy stanzas of those users from /etc/security/passwd
to a third file (contains encrypted password)
Look in /etc/security/groups if there are interesting
things and in affermative case, create a 4th file

copy these 4 files to target server in /tmp/...

In target machine
------------------

3) save original /etc/passwd /etc/security/passwd
/etc/group and /etc/security/groups

4) edit /etc/passwd and look for possible duplication
of id or other. If ok (no collisions) include
the first copied file in passwd

5) repeat the steps for the groups and /etc/security/ p + g

I think that some gurus of security disapproves
this way, but ... I do !

bye


 
I have a cluster of machines. One of them is a "password" server. I push the passwords, groups, etc from the server to all the machines using rdist. It keeps everything in sync. Here are the files you need to move.

/etc/security/passwd
/etc/required.services
/etc/netsvc.conf
/etc/sendmail.cf
/etc/environment
/etc/group
/etc/ftpusers
/etc/tftpaccess.ctl
/etc/hosts
/etc/sudoers
/etc/security/group
/etc/aliases
/etc/security/user
/etc/security/.profile
/etc/security/limits
/etc/auto.master
This has been working great for 2 years. makes user admin a snap. I run the rdist once an hour. It only pushes files that have changed, so you don't clog the network with traffic.

Of course if you have to systems that have different users and groups onthem, you will need to fix that before you move any files. Also you need to make sure your UID and GID are the same or when you push the files, you will have changed the owner of files and the groups some users are in.

Before you criticize someone, you should walk a mile in their shoes. That way you're a mile away and you have their shoes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top