Showing results for 
Search instead for 
Do you mean 

modify UID

SOLVED
Go to Solution
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
1 ACCEPTED SOLUTIONS
Esteemed Contributor Esteemed Contributor

Re: modify UID

Hi

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

Thanks & Regards

Ramesh
4 REPLIES
Esteemed Contributor Esteemed Contributor

Re: modify UID

Hi

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

Thanks & Regards

Ramesh
Frequent Advisor

Re: modify UID

Hi,

usermod -u uid loginname

Regards,
-jef
Highlighted
Acclaimed Contributor 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.
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