Distro/DE neutral method of changing someone's UserID
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Distro/DE neutral method of changing someone's UserID
Howdy There,
Is there a DE/distro neutral (I guess CLI) method of changing a given user's user ID on a Linux system? I want to set all my systems to have the same UserID so my external hard drive stops giving permission errors when moving between them.
That's what I use on RHEL/CentOS and Debian. So far as I know that is distro neutral but it wouldn't surprise me if there weren't odd ones in the world that don't use it for some reason.
Once you've changed it you might want to check the local filesystems for any files owned by the old UID and chown them:
find / -user <oldUID> |xargs chown <newUID>
That's what I use on RHEL/CentOS and Debian. So far as I know that is distro neutral but it wouldn't surprise me if there weren't odd ones in the world that don't use it for some reason.
Once you've changed it you might want to check the local filesystems for any files owned by the old UID and chown them:
find / -user <oldUID> |xargs chown <newUID>
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.