1847401 Members
3072 Online
110264 Solutions
New Discussion

Re: Copying Users

 
wyoungblood
New Member

Copying Users

Hello,
When copying users from an old machine to a new one (HP of course), is there any way to preserve the user's password from the old HP? I did not see the option on the useradd command. I googled and saw that on Linux there is a -p option where you can put the encrypted password.

Thanks,
Wayne
5 REPLIES 5
jthrumston
Advisor

Re: Copying Users

This might seem like a strange question but wouldn't it be easier to just tar off the /etc/passwd, shadow, group dirs and the /home dirs and copy them over to the new server? or restore them from a backup?

if its an old to new box scenario that seems like the easiest way to do it instead of doing a useradd for each one
If I wasn't here, I would be someplace else
A. Clay Stephenson
Acclaimed Contributor

Re: Copying Users

If the system is not Trusted then simply copy /etc/passwd,/etc/group, and the users' home directories from the old box to the new and declare victory. If the system is Trusted then in addition to the above files, copy the /tcb filetree as well.

When doing anything password related, make sure that you are logged in as root in at least two sessions so that you can get yourself out of trouble almost as fast as you got yourself in.
If it ain't broke, I can fix that.
David Bellamy
Respected Contributor

Re: Copying Users

The best way to do this is to just copy all of the home directories and /etc/passwd and /etc/group to the new server. We do this all the time and it works.
whiteknight
Honored Contributor

Re: Copying Users


Wayne,

it is simple in hpux, if you are not in trusted mode.

backup
1) /etc/passwd
2) /etc/group
3) /home

restore to your new machine, it should work.
WK
Problem never ends, you must know how to fix it
wyoungblood
New Member

Re: Copying Users

Thanks All,

I do have a process set up to tar the /home/* and ftp to the new server (and extract), and copying the /etc/passwd, etc. over. I didn't realize just copying those over was all that was to it (I'm not a System Admin and we don't really have one on staff).

Thanks again,
Wayne