日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

Linux中 groupadd 和 useradd 的命令说明

發(fā)布時間:2023/12/13 综合教程 36 生活家
生活随笔 收集整理的這篇文章主要介紹了 Linux中 groupadd 和 useradd 的命令说明 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

groupadd [options] group

說明
The groupadd command creates a new group account using the values specified on the command line plus the default values from the system. The new group will be entered into the system files as needed.
Options

參數(shù)

-f, --force
    This option causes the command to simply exit with success status if the specified group already exists. When used with -g, and the specified GID already exists, another (unique) GID is chosen (i.e. -g is turned off).
    和rm -f的意義一樣, 使用此參數(shù)時, 即使指定的組已經(jīng)存在, 命令依然會正常退出(不返回錯誤), 當和-g一起使用時, 如果指定的GID已經(jīng)存在, 則會自動使用另一個GID.

-g, --gid GID
    The numerical value of the group's ID. This value must be unique, unless the -o option is used. The value must be non-negative. The default is to use the smallest ID value greater than 999 and greater than every other group. Values between 0 and 999 are typically reserved for system accounts.

-h, --help
    Display help message and exit.

-K, --key KEY=VALUE
    Overrides /etc/login.defs defaults (GID_MIN, GID_MAX and others). Multiple -K options can be specified.
    Example: -K GID_MIN=100 -K GID_MAX=499
    Note: -K GID_MIN=10,GID_MAX=499 doesn't work yet.

-o, --non-unique
    This option permits to add a group with a non-unique GID.

-p, --password PASSWORD
    The encrypted password, as returned by crypt(3). The default is to disable the password.
    Note: This option is not recommended because the password (or encrypted password) will be visible by users listing the processes.
    You should make sure the password respects the system's password policy.

-r, --system
    Create a system group.
    The numeric identifiers of new system groups are choosen in the SYS_GID_MIN-SYS_GID_MAX range, defined in login.defs, instead of GID_MIN-GID_MAX.
    創(chuàng)建一個系統(tǒng)組. 新系統(tǒng)組的GID會自動從login.defs中的SYS_GID_MIN-SYS_GID_MAX中選擇, 而不是 GID_MIN-GID_MAX

useradd [options] LOGIN

useradd -D
useradd -D [options]

說明
When invoked without the -D option, the useradd command creates a new user account using the values specified on the command line plus the default values from the system. Depending on command line options, the useradd command will update system files and may also create the new user's home directory and copy initial files.

By default, a group will also be created for the new user (see -g, -N, -U, and USERGROUPS_ENAB).

選項

-b, --base-dir BASE_DIR
    The default base directory for the system if -d HOME_DIR is not specified. BASE_DIR is concatenated with the account name to define the home directory. If the -m option is not used, BASE_DIR must exist.
    If this option is not specified, useradd will use the base directory specified by the HOME variable in /etc/default/useradd, or /home by default.

-c, --comment COMMENT
    Any text string. It is generally a short description of the login, and is currently used as the field for the user's full name.

-d, --home HOME_DIR
    The new user will be created using HOME_DIR as the value for the user's login directory. The default is to append the LOGIN name to BASE_DIR and use that as the login directory name. The directory HOME_DIR does not have to exist but will not be created if it is missing.

-D, --defaults
    See below, the subsection "Changing the default values".

-e, --expiredate EXPIRE_DATE
    The date on which the user account will be disabled. The date is specified in the format YYYY-MM-DD.
    If not specified, useradd will use the default expiry date specified by the EXPIRE variable in /etc/default/useradd, or an empty string (no expiry) by default.

-f, --inactive INACTIVE
    The number of days after a password expires until the account is permanently disabled. A value of 0 disables the account as soon as the password has expired, and a value of -1 disables the feature.
    If not specified, useradd will use the default inactivity period specified by the INACTIVE variable in /etc/default/useradd, or -1 by default.

-g, --gid GROUP
    The group name or number of the user's initial login group. The group name must exist. A group number must refer to an already existing group.
    If not specified, the bahavior of useradd will depend on the USERGROUPS_ENAB variable in /etc/login.defs. If this variable is set to 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 the 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 specified by the GROUP variable in /etc/default/useradd, or 100 by default.

-G, --groups GROUP1[,GROUP2,...[,GROUPN]]]
    A list of supplementary groups which the user is also a member of. Each group is separated from the next by a comma, with no intervening whitespace. The groups are subject to the same restrictions as the group given with the -g option. The default is for the user to belong only to the initial group.

-h, --help
    Display help message and exit.

-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 useradd.
    This option is only valid if the -m (or --create-home) option is specified.
    If this option is not set, the skeleton directory is defined by the SKEL variable in /etc/default/useradd or, by default, /etc/skel.

-K, --key KEY=VALUE
    Overrides /etc/login.defs defaults (UID_MIN, UID_MAX, UMASK, PASS_MAX_DAYS and others).
    Example: -K PASS_MAX_DAYS=-1 can be used when creating system account to turn off password ageing, even though system account has no password at all. Multiple -K options can be specified, e.g.: -K UID_MIN=100 -K UID_MAX=499
    Note: -K UID_MIN=10,UID_MAX=499 doesn't work yet.

-l, --no-log-init
    Do not add the user to the lastlog and faillog databases.
    By default, the user's entries in the lastlog and faillog databases are resetted to avoid reusing the entry from a previously deleted user.

-m, --create-home
    Create the user's home directory if it does not exist. The files and directories contained in the skeleton directory (which can be defined with the -k option) will be copied to the home directory.
    useradd will create the home directory unless CREATE_HOME in /etc/login.defs is set to no.

-M
    Do not create the user's home directory, even if the system wide setting from /etc/login.defs (CREATE_HOME) is set to yes.

-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 /etc/default/useradd.
    The default behavior (if the -g, -N, and -U options are not specified) is defined by the USERGROUPS_ENAB variable in /etc/login.defs.

-o, --non-unique
    Allow the creation of a user account with a duplicate (non-unique) UID.
    This option is only valid in combination with the -o option.

-p, --password PASSWORD
    The encrypted password, as returned by crypt(3). The default is to disable the password.
    Note: This option is not recommended because the password (or encrypted password) will be visible by users listing the processes.
    You should make sure the password respects the system's password policy.

-r, --system
    Create a system account.
    System users will be created with no aging information in /etc/shadow, and their numeric identifiers are choosen in the SYS_UID_MIN-SYS_UID_MAX range, defined in /etc/login.defs, instead of UID_MIN-UID_MAX (and their GID counterparts for the creation of groups).
    Note that useradd will not create a home directory for such an user, regardless of the default setting in /etc/login.defs (CREATE_HOME). You have to specify the -m options if you want a home directory for a system account to be created.

-s, --shell SHELL
    The name of the user's login shell. The default is to leave this field blank, which causes the system to select the default login shell specified by the SHELL variable in /etc/default/useradd, or an empty string by default.

-u, --uid UID
    The numerical value of the user's ID. This value must be unique, unless the -o option is used. The value must be non-negative. The default is to use the smallest ID value greater than 999 and greater than every other user. Values between 0 and 999 are typically reserved for system accounts.

-U, --user-group
    Create a group with the same name as the user, and add the user to this group.
    The default behavior (if the -g, -N, and -U options are not specified) is defined by the USERGROUPS_ENAB variable in /etc/login.defs.

-Z, --selinux-user SEUSER
    The SELinux user for the user's login. The default is to leave this field blank, which causes the system to select the default SELinux user. 

總結(jié)

以上是生活随笔為你收集整理的Linux中 groupadd 和 useradd 的命令说明的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 高潮毛片无遮挡免费看 | 日韩欧美天堂 | 国产一二在线 | av网在线播放 | 欧美影视一区二区三区 | 日韩欧美一区二区三区视频 | 日韩不卡的av | 婷婷综合激情网 | 在线看片网站 | 在线欧美色 | 蜜桃视频一区二区三区 | 精品人妻一区二区三区四区久久 | 国产欧美二区 | 国产美女www | 亚洲成人动漫在线观看 | 秋霞在线观看视频 | 天天躁日日躁aaaa视频 | 免费看欧美黑人毛片 | 懂色av蜜臂av粉嫩av | 亚洲成在线 | 国产youjizz| 动漫艳母在线观看 | gai免费观看网站外网 | 国产成人久久精品 | 欧美精品一区二区三区在线播放 | 狠狠撸在线观看 | 小箩莉末发育娇小性色xxxx | 青苹果av | 久久99精品久久久久久国产越南 | 国产精品xxxxx| 天天干夜夜撸 | 亚洲av成人精品日韩在线播放 | 国产青青在线 | 青娱乐国产在线 | 自拍偷拍亚洲欧美 | 六月色婷婷| 国产精品免费看片 | 成人娱乐网 | 国产性爱精品视频 | 美女精品视频 | 麻豆91精品91久久久 | 麻豆changesxxx国产 | 久免费一级suv好看的国产 | 国产性生活片 | 婷婷综合亚洲 | 色老头综合网 | 美国色视频 | 26uuu国产| 88av在线| 麻豆av一区二区三区久久 | 中出亚洲 | 成年人看的羞羞网站 | 午夜激情视频 | 泰坦尼克号3小时49分的观看方法 | 99精品网 | 国产在线观看第一页 | 国产爱搞| 日韩久久精品一区二区 | 97超碰在线免费观看 | 人人看人人艹 | 国产盗摄一区二区三区在线 | 一边摸一边抽搐一进一出视频 | 国产一级做a爰片久久毛片男男 | 亚洲五月婷婷 | 色综合视频在线观看 | 自拍偷拍色综合 | 国产亚洲一区二区三区四区 | 国产综合视频在线 | 久久综合91 | 国产精品天美传媒 | 丁香花完整视频在线观看 | 国产精品电影网 | 免费看国产黄色片 | 日韩中文字幕在线播放 | 福利视频一区二区 | av福利片 | 亚洲激情成人 | 精品成人中文无码专区 | 一级黄色免费 | 无码 制服 丝袜 国产 另类 | 一区二区三区免费观看视频 | 呦女精品| 日日摸夜夜添狠狠添久久精品成人 | 在线看一区二区 | 日本一级二级视频 | 欧美精品一区二区三区久久久 | 日韩人妻无码一区二区三区 | 国产成人精品一区二区无码呦 | 亚洲天堂系列 | 日韩一区二区三区在线看 | 999福利视频 | 永久免费在线看片 | h片在线观看免费 | 国产精品久久精品三级 | 国产精品制服诱惑 | 秋霞国产午夜精品免费视频 | 青青草在线视频免费观看 | 小向美奈子在线观看 | 亚洲日本中文 |