- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Copy /etc/passwd, /etc/group to another server
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
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
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
тАО01-28-2008 09:47 PM
тАО01-28-2008 09:47 PM
I need to copy the users from one server to another and create their home directories as well. Any specific instructions on how to do this? Can I just copy the /etc/passwd and /etc/group? How about the directories? Do I have to create them manually?
Thanks in advance!
-jef
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2008 09:55 PM
тАО01-28-2008 09:55 PM
Re: Copy /etc/passwd, /etc/group to another server
Please have look on the following threads
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1162911&admit=109447626+1201586057015+28353475
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1166893&admit=109447626+1201586112406+28353475
Thanks & Regards
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2008 10:03 PM
тАО01-28-2008 10:03 PM
Re: Copy /etc/passwd, /etc/group to another server
You will have to make directories manually or copy the direcories to new system.
BR,
Kapil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2008 10:08 PM
тАО01-28-2008 10:08 PM
Re: Copy /etc/passwd, /etc/group to another server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2008 10:12 PM
тАО01-28-2008 10:12 PM
Re: Copy /etc/passwd, /etc/group to another server
Use -p to preserve permissions.
BR,
kapil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2008 01:15 AM
тАО01-30-2008 01:15 AM
Re: Copy /etc/passwd, /etc/group to another server
I tried to make a tar backup of my home directory. My current set up is that user directories are located on /home/user/user1....
/home/user/user2....
/home/user/user3....
.....
#tar cvf /tmp/home.tar /home/user/
however, my tar archive contains only the contents of each users home directories. I cannot see the subdirectories of the /home/user. Also, how can I preserve the permission of each folder and its subdirectories?
Thanks,
-jef
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2008 02:01 AM
тАО01-30-2008 02:01 AM
Re: Copy /etc/passwd, /etc/group to another server
when doing your backup
- I recommend NOT to use absolute pathnames.
- Create your tarfile at a place containing enough freespace (/tmp may be not big enough)
Use
cd /home
tar cvf /somewhere/backuser.tar user
You will see the progress of the backuped files on stdout.
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2008 02:20 AM
тАО01-30-2008 02:20 AM
Re: Copy /etc/passwd, /etc/group to another server
I dont have enough space on my /home/user directory. Anyway, I have more than 100 users.. I tried making an archive using tar but it seems that only the contents of the users home directories are copied. It is not divided according to "each" users own home directory. Any suggestions on how to make it done the fastest way? Also, I need to preserve the permissions including those in the sub-directories. It would really take some time if I would archive each home directories one by one.
Thanks!
-jef
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2008 03:28 AM
тАО01-30-2008 03:28 AM
Solution(This seems like an extra level of indirection.)
>#tar cvf /tmp/home.tar /home/user/
>my tar archive contains only the contents of each user's home directories. I cannot see the subdirectories of the /home/user.
You have dumped the subdirectories of the /home/user, what do you think is missing?
I suppose if each home directory is automounted, tar may not see them all?
Yes, this happens to me. You'll need:
#tar cvf /tmp/home.tar /home/user/*
Of course if this is automounted, then there is no need to move them because they aren't there on that machine.
>how can I preserve the permission of each folder and its subdirectories?
As Kapil said, you can use -p. But that is the default for root, when you extract.
>Peter: I recommend NOT to use absolute pathnames.
You can always use pax(1) to rename it.
> cd /home; tar cvf /somewhere/backuser.tar user
You can combine these into:
tar cvf /somewhere/backuser.tar -C /home user
>I don't have enough space on my /home/user directory.
That's why Peter said: /somewhere
>but it seems that only the contents of the users home directories are copied. It is not divided according to "each" users own home directory.
This is contradictory. /home/user contains ALL user's home directories. tar should get all of them if you start at /home/user.
Unless some are symlinks??
You need to give an example of a file that isn't backed up. And see if that shows up with "ll /home/user".
>Any suggestions on how to make it done the fastest way?
Mount them over NFS?
>I need to preserve the permissions including those in the sub-directories.
Automatic for root.
>It would really take some time if I would archive each home directories one by one.
You need to explain to us why the command you or what Peter gave isn't working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2008 07:49 PM
тАО01-30-2008 07:49 PM
Re: Copy /etc/passwd, /etc/group to another server
-jef