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

John Edwards john at cornerstonelinux.co.uk
Wed Apr 18 09:03:08 UTC 2012


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.


-- 
#---------------------------------------------------------#
|    John Edwards   Email: john at cornerstonelinux.co.uk    |
#---------------------------------------------------------#
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 205 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20120418/fd7bcbea/attachment.pgp>
-------------- next part --------------
--
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list