• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Quick Unix/Linux help

iroast

Golden Member
I know this belongs in the Programming/Tech Support section, but I need a quick response 😀

Moving accounts from one box to another screws up ownership of files/directories. What's the best way to restore them?

Thanks!
 
server 1 contains 10 accounts. their data was backed up and moved to server2. ownership of the data is no screwed up now. how would i move those 10 accounts over to server2 so that the owernship of the data is like server1?
 
Your UID's don't match between servers. The OS uses the UID to determine ownership, and not the username. Assume on server1 that Bob is UID 501 and Sue is 502. If on server2 Bob is 502 and Sue is 501, then Sue owns Bob's files when you restore to server2!

You can copy the user's from /etc/passwd, /etc/shadow, /etc/group and /etc/gshadow from one server to the other. Man vipw and vigrp for details.

 
Originally posted by: iroast
server 1 contains 10 accounts. their data was backed up and moved to server2. ownership of the data is no screwed up now. how would i move those 10 accounts over to server2 so that the owernship of the data is like server1?

Originally posted by: xcript
man chown

 
Originally posted by: n0cmonkey
Watch out for duplicate UIDs. They can be a pain in the rear. 😱

Yeah, personally I would probably tar up the user's home directories, then move them to the new box, useradd the users back, then chown -R the directories to the appropriate users.
 
Originally posted by: DaiShan
Originally posted by: n0cmonkey
Watch out for duplicate UIDs. They can be a pain in the rear. 😱

Yeah, personally I would probably tar up the user's home directories, then move them to the new box, useradd the users back, then chown -R the directories to the appropriate users.

That's exactly what I usually I do.
 
Back
Top