usermod
Topic: Users
Program: usermod
Changes a user, for example their groups.
Package: users
Usage
usermod [OPTION]... LOGIN
Description
Change the account LOGIN: groups, shell, comment, home directory, lock. Only root may do this.
Options in the simulator
-
-a, --append with -G: add the groups, keep the others -
-c, --comment=COMMENT new text for the comment field -
-d, --home=HOME new home directory (with -m the content moves there) -
-G, --groups=LIST new list of supplementary groups; without -a it replaces the old list -
-L, --lock lock the password (puts ! in front of it in /etc/shadow) -
-m, --move-home with -d: move the home directory -
-s, --shell=SHELL program that starts at login from now on -
-U, --unlock unlock the password -
-h, --help show this help and exit
17 more options of the real program, not in the simulator yet
-
-b, --badnamenot in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-e, --expiredateneeds a value not in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-f, --inactiveneeds a value not in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-g, --gidneeds a value not in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-l, --loginneeds a value not in the simulator yetusermod -l renames a user. The simulator cannot do that yet; create a new user (useradd) and delete the old one (userdel).
-
-o, --non-uniquenot in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-p, --passwordneeds a value not in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-P, --prefixneeds a value not in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-r, --removenot in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-R, --rootneeds a value not in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-u, --uidneeds a value not in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-v, --add-subuidsneeds a value not in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-V, --del-subuidsneeds a value not in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-w, --add-subgidsneeds a value not in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-W, --del-subgidsneeds a value not in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
-Z, --selinux-userneeds a value not in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
-
--selinux-rangeneeds a value not in the simulator yetThis option exists on a real system; the simulator cannot do it for this command yet.
Where you learn it
No lesson yet.