Skip to content

Instantly share code, notes, and snippets.

@tpowellcio
Created May 24, 2016 12:49
Show Gist options
  • Save tpowellcio/ed74ea0008ab3797a7d98180a35bfff0 to your computer and use it in GitHub Desktop.
Save tpowellcio/ed74ea0008ab3797a7d98180a35bfff0 to your computer and use it in GitHub Desktop.
Cleaning up users on linux machine, inconsistent user ids

#Cleaning up users on linux machine, inconsistent user ids

    $ getent group | grep 1063 (grep information for groupid 1063)
    $ getent passwd | grep 1063 (grep information for uid 1063)
    $ usermod -u <userid> <username> (change the user id for username)
    $ groupmod -n <new name> <old name> (change group name to <new name> from <old name>)
    $ usermod -g <group id> <user name> (change the <group id> of <user name>)
    $ groupmod -g <group id> <group name> (change <group id> of <group name>)
    $ id <user name> (get the information for <user name>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment