All commands
useradd
Topic: Users
Program: useradd
Creates a new user.
Package: users
Usage
useradd [OPTION]... LOGIN
Description
Create the user LOGIN in /etc/passwd and /etc/shadow, with a group of the same name. Only root may do this.
Options in the simulator
-
-c, --comment=COMMENT text for the comment field (full name) -
-d, --home-dir=HOME home directory instead of /home/LOGIN -
-g, --gid=GROUP primary group (name or number) instead of a new group LOGIN -
-G, --groups=LIST comma separated list of supplementary groups -
-m, --create-home make /home/LOGIN and fill it from /etc/skel -
-M, --no-create-home no home directory (what happens without -m) -
-r, --system account for a service, with an ID below 1000 -
-s, --shell=SHELL login shell instead of /bin/sh -
-u, --uid=UID user ID instead of the next free one -
-h, --help show this help and exit
17 more options of the real program, not in the simulator yet
-
--badname not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
-b, --base-dir needs a value not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
--btrfs-subvolume-home not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
-D, --defaults not in the simulator yet useradd -D shows or changes the defaults in /etc/default/useradd; the simulator uses the fixed defaults of Debian 13.
-
-e, --expiredate needs a value not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
-f, --inactive needs a value not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
-F, --add-subids-for-system not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
-k, --skel needs a value not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
-K, --key needs a value not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
-N, --no-user-group not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
-o, --non-unique not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
-p, --password needs a value not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
-R, --root needs a value not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
-P, --prefix needs a value not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
-U, --user-group not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
-Z, --selinux-user needs a value not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
-
--selinux-range needs a value not in the simulator yet This option exists on a real system; the simulator cannot do it for this command yet.
Where you learn it
Lessons
All commands