LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
LinkBack Search this Thread
Old 09-08-2010, 03:52 PM   #1
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Alsip, IL
Distribution: Bodhi and Maemo
Posts: 291

Rep: Reputation: 33
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.

Regards,
~Jeff
 
Old 09-08-2010, 04:45 PM   #2
MensaWater
Senior Member
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 4,762

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
"usermod -u <newUID> <username>"

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>
 
1 members found this post helpful.
Old 09-12-2010, 01:30 PM   #3
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Alsip, IL
Distribution: Bodhi and Maemo
Posts: 291

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by MensaWater View Post
"usermod -u <newUID> <username>"

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>
Worked like a charm. Thanks mate.

~Jeff
 
Old 09-13-2010, 02:43 PM   #4
MensaWater
Senior Member
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 4,762

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
Glad I could help.

Please go to "Thread Tools" and "Mark This Thread as Solved". That way anyone else finding it on a search will no it has a solution in it.
 
  


Reply

Tags
cli, userid


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shadow passwords - Changing encryption method from MD5 to SHA Phaethar Linux - Security 1 11-04-2009 05:38 PM
Best method of changing linux distributions FooAtari Linux - General 2 01-11-2009 08:42 AM
Changing the mount-by method in openSuSE 10.3 kaplan71 Suse/Novell 3 12-24-2008 09:31 AM
Creating a Distro Neutral Package JohnE1 Linux - Software 18 06-27-2007 06:46 PM
Changing dial method in KPPP akr85 Linux - General 2 04-02-2002 10:49 PM


All times are GMT -5. The time now is 09:20 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration