1748109 Members
4410 Online
108758 Solutions
New Discussion юеВ

Re: modify UID

 
Go to solution
j773303
Super Advisor

modify UID

I've 2 servers and the user UID not the same.
Any other command or tools can quickly modify the UID for the same? Thanks for the advise.
Hero
4 REPLIES 4
Ramesh S
Esteemed Contributor
Solution

Re: modify UID

Hi

"usermod" is the command to change the UID fo user.

Thanks & Regards

Ramesh
d_bachelor01
Frequent Advisor

Re: modify UID

Hi,

usermod -u uid loginname

Regards,
-jef
A. Clay Stephenson
Acclaimed Contributor

Re: modify UID

Bear in mind that you will probably also have to do a find with -exec to chown any files owned by this user. Man find for details.
If it ain't broke, I can fix that.
Avishay_Cohen
Frequent Advisor

Re: modify UID

hello,
yes... the files are still using the old uid number so you should run:
find / -user oldUID -exec chown newUID {} \;
avishay