Name
useradd -- create a new user
Syntax
vxuseradd [--after command]
[--before command] [--vxdb database] [-G
group[,...]] [-S level] [-c comment]
[-d home_dir] [-e date] [-f days]
[-g group] [-m [-k skel_dir]] [-s
shell] [-u uid [-o]|-r]
username
Description
vxuseradd will create a new user using the supplied
parameters. The configuration file for vxuseradd is
/etc/vitalnix/useradd.conf
.
Options
--after command |
Runs the specified command after the user was
successfully added. If --after is given, but with
a zero-length command string, the default command in the
configuration file is not run. |
--before
command |
Runs the specified command before the user is
added. It is run always, even if adding fails. If
--before is given, but with a zero-length command
string, the default command in the configuration file is not
run. |
--vxdb database |
Uses the specified database rather than the default one listed in the VXDB configuration file. |
-G
group[,...] |
The supplemental (secondary) groups the user should be a member in, separated by comma. group can either be the group's name or its GID. (UNSUPPORTED) |
-S |
Uses the "split home" feature. This will create
the home directory as /home/u/username rather than
the default /home/username . Specifying
-S twice (which is the maximum) will result in a
two-level split, i.e. /home/u/us/username . The
-d option overrides this one. |
-c comment |
The comment field for the new user. It can be in turn again split up in fields, separated by comma. Usually, the real name of the user is stored in the first field, the others are left for other commentary or data. |
-d dir |
The new user will get dir as his home
directory. This option alone does not create his home
directory, but rather only writes that directory information
into the user database. You usually want to pass
-m also along to create the directory. This
option overrides -S . |
-e date |
Date on which the account expires. Date formats must be YYYY-MM-DD. The default is to not let the account expire. |
-f days |
The number of days which need to pass after a
password expiration (that is not -e !) until the
account is locked down. |
-g group |
The group name or number of the user's initial
(primary) group. group can either be the group's
name or its GID. |
-k dir |
The skeleton directory to use for the new user. Contents from this directory will be copied into the user's. |
-m |
Create the user's home directory. The default is
to create a directory called the same name as the user in
/home , or what you specified as HOME
in the configuration file, or if you passed -S or
-d . If this option is given, an implicit -k
/etc/skel (or SKEL ) takes effect, unless an
explicit -k is specified. |
-o |
If a user with the explicit UID given by
-u already exists, you can override the error
message with this option, to create non-unique UIDs. |
-p pass |
The password to use for the new user. It must
already be encrypted when passed with -p . |
-r |
Create a system user, that is, with a lower UID
than the hardcoded default (100), or what is specified for
MIN_UID in the autouid configuration file. The
-u option overrides this one. |
-s shell |
Use shell as the default command
interpreter for the new user. The default is
/bin/bash or whatever you specified as
SHELL in the configuration file. |
-u uid |
The numerical user id of the new user. The
default is to assign the user the next greatest UID. This
option overrides -r . |