The default behavior (if the -g, -N, and -U options are not specified) is defined by the USERGROUPS_ENAB variable in N, -no-user-group Do not create a group with the same name as the user, but add the user to the group specified by the -g option or by the GROUP variable in M Do not create the user's home directory, even if the system wide setting from /etc/fs ( CREATE_HOME) is set to yes. Useradd will create the home directory unless CREATE_HOME in /etc/fs is set to no. k option) will be copied to the home directory. The files and directories contained in the skeleton directory (which can be defined with the m, -create-home Create the user's home directory if it does not exist. l, -no-log-init Do not add the user to the lastlog and faillog databases.īy default, the user's entries in the lastlog and faillog databases are resetted to avoid reusing the entry from a previously deleted user. Note: -K UID_MIN= 10, UID_MAX= 499 doesn't work yet. Multiple -K options can be specified, e.g.: -K UID_MIN= 100 -K UID_MAX= 499 K, -key KEY= VALUE Overrides /etc/fs defaults ( UID_MIN, UID_MAX, UMASK, PASS_MAX_DAYS and others).Įxample: -K PASS_MAX_DAYS= -1 can be used when creating system account to turn off password ageing, even though system account has no If this option is not set, the skeleton directory is defined by the SKEL variable in /etc/default/useradd or, by default, /etc/skel. This option is only valid if the -m (or -create-home) option is specified. k, -skel SKEL_DIR The skeleton directory, which contains files and directories to be copied in the user's home directory, when the home directory is created by The default is for the user to belong only to the initial Groups are subject to the same restrictions as the group given with the -g option. Each group is separated from the next by a comma, with no intervening whitespace. G, -groups GROUP1]]Ī list of supplementary groups which the user is also a member of. Specified by the GROUP variable in /etc/default/useradd, or 100 by default. Variable is set to no (or -N/-no-user-group is specified on the command line), useradd will set the primary group of the new user to the value Yes (or -U/-user-group is specified on the command line), a group will be created for the user, with the same name as her loginname. If not specified, the bahavior of useradd will depend on the USERGROUPS_ENAB variable in /etc/fs. A group number must refer to an already existing group. g, -gid GROUP The group name or number of the user's initial login group. If not specified, useradd will use the default inactivity period specified by the INACTIVE variable in /etc/default/useradd, or -1 by A value of 0 disables the account as soon as the password hasĮxpired, and a value of -1 disables the feature. f, -inactive INACTIVE The number of days after a password expires until the account is permanently disabled. If not specified, useradd will use the default expiry date specified by the EXPIRE variable in /etc/default/useradd, or an empty string (no The date is specified in the format YYYY-MM-DD. e, -expiredate EXPIRE_DATE The date on which the user account will be disabled. D, -defaults See below, the subsection "Changing the default values". The directory HOME_DIR does not have to exist but will not be created if it is The default is to append the LOGIN name toīASE_DIR and use that as the login directory name. d, -home HOME_DIR The new user will be created using HOME_DIR as the value for the user's login directory. It is generally a short description of the login, and is currently used as the field for the user's full name. If this option is not specified, useradd will use the base directory specified by the HOME variable in /etc/default/useradd, or /home by If the -m option is not used, BASE_DIR must exist. BASE_DIR is concatenated with the account name to define the b, -base-dir BASE_DIR The default base directory for the system if -d HOME_DIR is not specified. The options which apply to the useradd command are: Depending on command line options, the useradd command will update system files and may also create the new user's homeīy default, a group will also be created for the new user (see -g, -N, -U, and USERGROUPS_ENAB). When invoked without the -D option, the useradd command creates a new user account using the values specified on the command line plus theĭefault values from the system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |