CORRECTION: Gnome3 on Fedora 16 (Again)

John Edwards <[email protected]>
Newsgroups gmane.user-groups.linux.london.gllug
Message-ID <[email protected]>
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: [email protected]    |
#---------------------------------------------------------#

--
Gllug mailing list  -  [email protected]
http://lists.gllug.org.uk/mailman/listinfo/gllug
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iEYEARECAAYFAk+Og0oACgkQx2vje4FiJvQ14ACbBgrXM5ww/nyHq3PHlp8S/90N
R2gAniZ9kbw+O2DaX+edhXR6CHxqz3Tb
=VabS
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.