Username ändern (von tom zu jerry)
uid=1000(tom) gid=1000(tom)
usermod -l jerry tom
id jerry
uid=1000(jerry) gid=1000(tom)
User-ID ändern (1000 zu 2000)
id jerry
uid=1000(jerry) gid=1000(tom)
usermod -u 2000 jerry
id jerry
uid=2000(jerry) gid=1000(tom)
Gruppenname ändern (von tom zu jerry)
id jerry
uid=2000(jerry) gid=1000(tom)
groupmod -n jerry tom
id jerry
uid=2000(jerry) gid=1000(jerry)
Gruppen-ID ändern (1000 zu 2000)
id jerry
uid=2000(jerry) gid=1000(jerry)
groupmod -g 2000
id jerry
uid=2000(jerry) gid=2000(jerry)
User zu sekundären Gruppen hinzufügen
id jerry
uid=2000(jerry) gid=1000(tom)
usermod -G mouse,cartoon jerry
id jerry
uid=2000(jerry) gid=1000(jerry) groups=5001(mouse),4001(cartoon)
Primäre Gruppe des Users ändern
id jerry
uid=2000(jerry) gid=1000(jerry) groups=5001(mouse),4001(cartoon)
usermod -g jerry_new jerry
id jerry
uid=2000(jerry_new) gid=1000(jerry) groups=5001(mouse),4001(cartoon)