SCIENTIFIC-LINUX-USERS Archives

August 2015

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
David Sommerseth <[log in to unmask]>
Reply To:
Date:
Wed, 19 Aug 2015 15:07:59 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
On 19/08/15 14:51, Chris Schanzle wrote:
[...snip...]
> I wouldn't imagine migrating to the new scheme would be *that* difficult
> once you nail down the user, old uid, new uid, change their passwd uid,
> then run something like this on all your systems: find PATHS -user
> $oldID -exec chown -h $newID {} +

I've done this a few times.  Basically my routine was:

---------------------------------------------------------------
 for d in /home /var /tmp;  # See note below
 do
    find $d -uid ${OLD_UID} -exec chown -ch ${NEW_UID} {} \;
    find $d -gid ${OLD_GID} -exec chgrp -ch ${NEW_GID} {} \;
 done;
---------------------------------------------------------------

[note: Depending on your setup, you might need /usr, /opt, /run or
       other paths as well.  Avoid network based filesystems and do
       that job on those servers directly]

There are also more tricks to do if you convert a computer withtout a
centralized user database (for example LDAP/Kerberos) to become
integrated with a centralized user database.  But that's a different story.


-- 
kind regards,

David Sommerseth

ATOM RSS1 RSS2