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

Copy passwords to another server

Status
Not open for further replies.

DonDavisFCB

Programmer
Aug 22, 2001
73
US
I have recently Installed AIV v5 on a machine that was a redundant server por a production server. The logins and passwords wer the same on both boxes. Is there a way to copy the passwords from one machine to the other without having to reset all of the users?

I have manually added each user with mkuser. Then I copied /etc/security/passwd from the production server to my pristine v5 box. This did not work.

Is this possible?
Thanks,
Don
 
This worked for us:

if /usr/bin/rcp -p /etc/passwd hostname:/etc/passwd.new ; then
if /usr/bin/rcp -p /etc/security/passwd hostname:/etc/security/passwd.new ; then
if /usr/bin/rcp -p /etc/group hostname:/etc/group.new ; then
if /usr/bin/rcp -p /etc/security/group hostname:/etc/security/group.new ; then
if /usr/bin/rcp -p /etc/security/limits hostname:/etc/security/limits.new ; then
if /usr/bin/rcp -p /etc/security/user hostname:/etc/security/user.new ; then
rsh hostname 'cp -p /etc/passwd.new /etc/passwd ; cp -p /etc/security/passwd.new /etc/security/passwd ; cp -p /etc/group.new /etc/group ; cp -p /etc/security/group.new /etc/security/group ; cp -p /etc/security/limits.new /etc/security/limits ; cp -p /etc/security/user.new /etc/security/user'
else
echo "/etc/security/user" | mail -s ...
fi
else
echo "/etc/security/limits" | mail -s ...
fi
else
echo "/etc/security/group" | mail -s ...
fi
else
echo "/etc/group" | mail -s ...
fi
else
echo "/etc/security/passwd" | mail -s ...
fi
else
echo "/etc/passwd" | mail -s ...
fi
exit 0
IBM Certified -- AIX 4.3 Obfuscation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top