Change of UID

Ian Malone ibmalone at gmail.com
Fri Nov 15 13:16:42 UTC 2013


On 15 November 2013 12:45, Tom Horsley <horsley1953 at gmail.com> wrote:
> On Fri, 15 Nov 2013 12:38:17 +0000
> Timothy Murphy wrote:
>
>> I found my UID had changed from 500 to 1000.
>
> When I installed the new system with the 1000 default,
> I booted a live CD, mounted the hard disk partitions and
> ran a find command to find all files owned by UID 500
> and chowned them to UID 1000. (And the same for
> the gid, which also changed).

Also this option provided by chown can be useful when remapping uid or gid:

--from=CURRENT_OWNER:CURRENT_GROUP
              change  the  owner and/or group of each file only if its current
              owner and/or group match those specified here.   Either  may  be
              omitted,  in  which case a match is not required for the omitted
              attribute.

That said, find can give you more flexibility.

-- 
imalone
http://ibmalone.blogspot.co.uk


More information about the users mailing list