[K12OSN] Moving Home files to a new server

Rob Owens rowens at bio-chemvalve.com
Tue Oct 9 14:29:06 UTC 2007


Carl,

The system assigns ownership based on UID and GID (numbers) and
"translates" that to usernames.  Your user and group ID numbers in
/etc/passwd and /etc/group need to be the same on the new system as they
were on the old system.

Alternatively, you can fix your problems by doing a "find" of files
owned by a particular user and change ownership to the proper user.
Same thing for groups.  Like this:

find /home -user wrongusername -exec chown -R rightusername {} \;
find /home -group wronggroup -exec chgrp -R rightgroup {} \;

Please test this on a small batch of files before letting it loose on
your whole system.  Also note that I specified /home as the path.  You
may have other folders to search, for instance /mnt/shared_drive or
something.

-Rob

Carl Keil wrote:
> Hi Folks,
> 
> So, the big disaster happened.  My K12LTSP hard drive died.  I've got
> everything backed up (thank you BackupPC), so I thought I was golden,
> but I'm having a weird problem.
> 
> When I restore files from backup they are showing up "read only" in
> people's directories.  When I do a "ls -la /home/username" it is showing
> that the files are owned by other users and other groups.  A "chown -R
> username:groupname /home/username" doesn't solve the problem.
> I tried copying over all the 500+ /etc/passwd and /etc/shadow info from
> the most recent backup but after that I couldn't even log in as
> different users.  Any suggestions for what I should do?  I'd really like
> to just set up new user accounts for everyone and then just copy over
> selected files from backup for each user.  This is a family installation
> of K12LTSP, so there are only about 10 user accounts.  I used "useradd"
> on the new server to create everyone's account and I don't think I did
> them in the same order as the original server.  Should I delete everyone
> and re-add them in the exact same order?  I could do that based on
> /etc/passwd from the backup?
> 
> Thanks a lot,
> 
> ck
> 
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>




More information about the K12OSN mailing list