[Gllug] CORRECTION: Gnome3 on Fedora 16 (Again)

Stuart Sears stuart at sjsears.com
Wed Apr 18 09:06:33 UTC 2012


 On Wed, 18 Apr 2012 10:03:08 +0100, John Edwards wrote:
> On Wed, Apr 18, 2012 at 09:42:12AM +0100, John Edwards wrote:
> <snip>
>> B) Change your UID from 500 to 1001 (assuming that it UID is not
>> used), and probably also your GID as well. Likely to be safer in the
>> long term, but carries a small amount of risk to it.
>>
>> Steps are:
>> 1) Make sure that you can login to the text console as the root 
>> user.
>> 2) Logout of everything as your normal user.
>> 3) As root run 'usermod -u 1001 <your_username>'
>> 4) As root run 'groupmod -u 1001 <your_username>'
>
> The "-u" option in the groupmod should of course be "-g" for GID:
> 	'groupmod -g 1001 <your_username>'
>
> This is assuming that RedHat/Fedora still creates a group for every
> user with the GID equal to the UID.
>> 5) As root run 'find / -uid  -exec 501 chown 1001 "{}" \;'
>
> Another typo:
> 	find / -uid 501 -exec chown 1001 "{}" \;
>
>> 6) As root run 'find / -gid  -exec 501 chgrp 1001 "{}" \;'
>
> Another typo:
> 	find / -gid 501 -exec chgrp 1001 "{}" \;
>
>> 7) Log back in as your normal user.
>
> 8) Realise that you shouldn't trust code sent via the Internet.
>
>
> ps. If you have a lot of files then the 'find' commands will take a
> long time, because chown/chgrp is called separately for every file.
> This might be speeded up by piping the list of files to xargs with
> something like:
> 	find / -gid 501 -print0 | xargs -r0 chgrp 1001
>
> But I sometimes meet problems with files with special characters in
> them when doing this, usually created by Windows clients via Samba.

-- 
 Stuart Sears RHCA etc.
 "It's today!" said Piglet.
 "My favourite day," said Pooh.
--
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list