MAN page from OpenSuSE pwdutils-3.2.5-2.4.1.x86_64.rpm
useradd
Section: Maintenance Commands (8)
Updated: April 2005
Index NAME
useradd - create a new user account
SYNOPSIS
- useradd [-D binddn] [-P path] [-c comment] [-d homedir]
[-e expire] [-f inactive] [-G group,...] [-g gid]
[-m [-k skeldir]] [-o] [-p password] [-u uid]
[-r] [-s shell] [--service service] [--help]
[--usage] [-v] [--preferred-uid uid] account- useradd --show-defaults
- useradd --save-defaults [-d homedir] [-e expire] [-f inactive]
- [-g gid] [-G group,...] [-k skeldir] [-s shell]
DESCRIPTION
useradd creates a new user account using the default valuesfrom
/etc/default/useradd and the specified on the command line.Depending on the command line options the new account will be added tothe system files or LDAP database, the home directory will be createdand the initial default files and directories will be copied.
The account name must begin with an alphabetic character and the restof the string should be from the POSIX portable character class([A-Za-z_][A-Za-z0-9_-.]*[A-Za-z0-9_-.$]).
OPTIONS
- -c, --comment comment
- This option specifies the users finger information.
- -d, --home homedir
- This option specifies the users home directory.If not specified, the default from /etc/default/useradd is used.
- -e, --expire expire
- With this option the date when the account will be expired canbe changed. expiredate has to be specified as number ofdays since January 1st, 1970. The date may also be expressed inthe format YYYY-MM-DD.If not specified, the default from /etc/default/useradd is used.
- -f, --inactive inactive
- This option is used to set the number of days of inactivity aftera password has expired before the account is locked. A user whoseaccount is locked must contact the system administrator beforebeing able to use the account again.A value of -1 disables this feature.If not specified, the default from /etc/default/useradd is used.
- -G, --groups group,...
- With this option a list of supplementary groups can be specified,which the user should become a member of. Each group is separatedfrom the next one only by a comma, without whitespace.If not specified, the default from /etc/default/useradd is used.
- -g, --gid gid
- The group name or number of the user's main group. The group nameor number must refer to an already existing group.If not specified, the default from /etc/default/useradd is used.
- -k, --skel skeldir
- Specify an alternative skel directory. This option is only valid,if the home directory for the new user should be created, too.If not specified, the default from /etc/default/useradd or/etc/skel is used.
- -m, --create-home
- Create home directory for new user account.
- -o, --non-unique
- Allow duplicate (non-unique) User IDs.
- -p, --password password
- Encrypted password as returned bycrypt(3)for the new account. The default is to disable the account.
- -u, --uid uid
- Force the new userid to be the given number. This value must bepositive and unique. The default is to use the first free ID afterthe greatest used one. The range from which the user ID is chosencan be specified in /etc/login.defs.
- --preferred-uid uid
- Set the new userid to the specified value if possible. If that valueis already in use the first free ID will be chosen as describedabove.
- -r, --system
- Create a system account. A system account is an user with an UIDbetween SYSTEM_UID_MIN and SYSTEM_UID_MAX as defined in/etc/login.defs, if no UID is specified. The GROUPS entryin /etc/default/useradd is ignored, too.
- -s, --shell shell
- Specify user's login shell. The default for normal user accountsis taken from /etc/default/useradd/, the default for systemaccounts is /bin/false.
- --service service
- Add the account to a special directory. The default is files,but ldap is also valid.
- -D, --binddn binddn
- Use the Distinguished Name binddn to bind to the LDAP directory.The user will be prompted for a password for simple authentication.
- -P, --path path
- The passwd and shadow files are located belowthe specified directory path. useradd will use this files,not /etc/passwd and /etc/shadow.
- --help
- Print a list of valid options with a short description.
- --usage
- Print a short list of valid options.
- -v, --version
- Print the version number and exit.
FILES
/etc/passwd - user account information
/etc/shadow - shadow user account information
/etc/group - group information
/etc/default/useradd - default values for account creation
/etc/skel - directory containing default files
SEE ALSO
passwd(1),
login.defs(5),
passwd(5),
shadow(5),
userdel(8),
usermod(8)
AUTHOR
Thorsten Kukuk <kukukAATTsuse.de>
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- FILES
- SEE ALSO
- AUTHOR
This document was created byman2html,using the manual pages.