Code Snippet

Just another Code Snippet site

Linux: Changing UIDs and GIDs for a user by Stuart Colville

usermod -u <NEWUID> <LOGIN>    
groupmod -g <NEWGID> <GROUP>
find / -user <OLDUID> -exec chown -h <NEWUID> {} \;
find / -group <OLDGID> -exec chgrp -h <NEWGID> {} \;
usermod -g <NEWGID> <LOGIN>

groupmod -g

Source: Linux: Changing UIDs and GIDs for a user by Stuart Colville

, ,


Leave a Reply

Your email address will not be published. Required fields are marked *