- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Coping user to new Computer
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2001 08:58 AM
09-11-2001 08:58 AM
When I go to put the users from the Old box to New box is there an easier way than righting a script to recreate the users. The script would do the same thing we do now when we create just one user. The difference it that I already have there names and other information.
Some one told me I could just copy the /etc/passwd and /etc/group files then copy the Users home Directory. In this case I would still have deal with users rights to there home Directory. The Users do not need any of the data in as their directories as they are captive users and it is only passive information.
What you thing?
Marty
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2001 09:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2001 09:19 AM
09-11-2001 09:19 AM
Re: Coping user to new Computer
You can do it in different ways. You can even complicate by writing some scripts and incorporating adduser in it.
The best way is as follows. Copy the password and group files as a whole into N-4000.
on N-4000
#cp /etc/passwd /etc/passwd.orig
#vi passwd.k420
Remove all the default entries. Or the
entries that match the passwd file of N4000.
Once they are made sure and removed, save the file
#cat passwd.k420>> /etc/passwd
Do the same thing for group file.
Now take the saved passwd.k420 file and do this
awk '{FS=":";print $1}' passwd.k420 > user.list
Copy this list to K420
on K420 do
#for USER in user.list
>do
>grep "^$USER" /etc/passwd |awk '{FS=":":print $6}' >> home.list
>done
#tar cvf /tmp/home.tar `cat home.list`
Copy /tmp/home.tar into your N-4000 and untar
on N-4000
#tar xvf home.tar
This should copy the home directories.
Now your users can login as it it was the old K420.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2001 09:19 AM
09-11-2001 09:19 AM
Re: Coping user to new Computer
You can do it in different ways. You can even complicate by writing some scripts and incorporating adduser in it.
The best way is as follows. Copy the password and group files as a whole into N-4000.
on N-4000
#cp /etc/passwd /etc/passwd.orig
#vi passwd.k420
Remove all the default entries. Or the
entries that match the passwd file of N4000.
Once they are made sure and removed, save the file
#cat passwd.k420>> /etc/passwd
Do the same thing for group file.
Now take the saved passwd.k420 file and do this
awk '{FS=":";print $1}' passwd.k420 > user.list
Copy this list to K420
on K420 do
#for USER in user.list
>do
>grep "^$USER" /etc/passwd |awk '{FS=":":print $6}' >> home.list
>done
#tar cvf /tmp/home.tar `cat home.list`
Copy /tmp/home.tar into your N-4000 and untar
on N-4000
#tar xvf home.tar
This should copy the home directories.
Now your users can login as if it was the old K420.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2001 10:08 AM
09-11-2001 10:08 AM
Re: Coping user to new Computer
The box isn't Trusted. Well not yet.
If I edit the Old passwd and group file then append them to the new box files that should give me the old users/groups on the new box?
How do I get the rights for the users directories?
If I put them on tape and move them will the rights on the directories/files go with them?
What I think I'm asking is the userID has a UID. Are the rights attached to the UID or the UserID(name)?
If I ftp this data from one box to the other how does the Right happen for the User's Directories?
Am I tring to make the harder than it is?
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2001 10:16 AM
09-11-2001 10:16 AM
Re: Coping user to new Computer
Sorry for answering the question on behalf of victor.
The permissions will not change if you untar the home directories and will be set accordingly. As long as you don't change the uids, the permissions will remain intact. If you change the uids in the password files, then the files owned by the corresponding user will be owned by the previous uid number. That is the reason why we just need to append the password files.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2001 10:17 AM
09-11-2001 10:17 AM
Re: Coping user to new Computer
Most archiving utility have an option to preserve the permissions and timestamp of files in the archive. For tar, the options is -p. This option is a default for superuser.
So when you create and when you restore the user's home file and if you're using tar, use the -p option.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2001 03:25 AM
11-18-2001 03:25 AM
Re: Coping user to new Computer
My approach many not be as fancy as some, but it works for me, so here goes. FTP the /etc/passwd and /etc/group files to the new server but do not place them into /etc. For this example we will say that you put them into slash[/]. Run vi on /passwd and remove the second columns data(encrypted password) and replace it with a asterisk(*). This will disable all of the accounts. Then save the file. Then copy /etc/passwd to /etc/passwd.orig and copy both the /passwd and /group into /etc. Then at the command line run 'passwd' as root to change the root password. Think of a default password that you can assign for each user, and then execute 'passwd' for any one user (eg. passwd gwells). Then go into the /etc/passwd file and find the user who's passwd you set to the default. You will then want to copy the second column of data(encrypted passwd) from that user(eg XjrZs15A1K42) Then paste that data into the second column of all of your users(not into the special accounts obviously). Doing this should set the passwd for all of your users to the same thing. Then you just email them all to let them know that they can login to the new server with the default passwd and that they need to change their password upon login. Then just keep the string written onto a piece of paper so that you can check back after a while to see who has changed their passwords. Well, I hope that helps.
Regards,
Jason V.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2001 05:01 AM
11-18-2001 05:01 AM
Re: Coping user to new Computer
<
Yes. When you install the O/S on the New system, default system accounts are created in the password and group file. Except these accounts , you would need to append all the accounts from your old system.
for eg: if your old password file and group file is
/etc/password.OLD
/etc/group.OLD
Edit these two files and remove any entry
which is already there in the new systems
/etc/passwd and /etc/group file.
Then, you just append these files.
<
Restoring the directories will take care
of this.
<
Yes!
<
The rights are attached to the userid.
If you restore the files without creating/copying the user accounts to the new system, the files will have the UID number as the ownership .
<
FTP is not a good idea, since it doesn't preserve the old permission or ownerships.
You would need to do them manually after FTPing the file. Whereas if you restore, it will be automaticaally be taken care of.
HTH
raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2001 07:49 PM
11-18-2001 07:49 PM
Re: Coping user to new Computer
YOu can cp the passwd and group file.
Then you can do a
#rcp -rp
I am assuming that your user directories are under /home filesystem.
before you do that make sure that you have a entry in your /.rhosts file of the old server.
#vi /.rhosts
newserveripaddress root
wq!