標籤:io 使用 ar for 檔案 2014 sp log on
GROUPMOD(8) 系統管理命令 GROUPMOD(8)
名稱
groupmod - modify a group definition on the system
大綱
groupmod [選項] GROUP
描述
The groupmod command modifies the definition of the specified GROUP by modifying the appropriate entry in the group database.
選項
groupmod 命令可以接受的選項有:
-g, --gidGID
The group ID of the given GROUP will be changed to GID.
The value of GID must be a non-negative decimal integer. This value must be unique, unless the -o option is used.
Users who use the group as primary group will be updated to keep the group as their primary group.
Any files that have the old group ID and must continue to belong to GROUP, must have their group ID changed manually.
No checks will be performed with regard to the GID_MIN, GID_MAX, SYS_GID_MIN, or SYS_GID_MAX from /etc/login.defs.
-o, --non-unique
When used with the -g option, allow to change the group GID to a non-unique value.
-h, --help
現實協助資訊並退出。
-n, --new-nameNEW_GROUP
The name of the group will be changed from GROUP to NEW_GROUP name.
-p, --passwordPASSWORD
已經加密過的密碼,就像 crypt(3) 返回的那樣。
注意:不推薦使用這個選項,因為密碼(或加密過的密碼)會被使用者通過列出這個過程而看到。
您應該確保密碼符合系統的密碼政策。
-R, --rootCHROOT_DIR
Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory.
設定檔
在 /etc/login.defs 中有如下組態變數,可以用來更改此工具的行為:
MAX_MEMBERS_PER_GROUP (number)
每個組條目的最大成員數。達到最大值時,在 /etc/group 開始一個新條目(行)(使用同樣的名稱,同樣的密碼,同樣的 GID)。
預設值是 0,意味著組中的成員數沒有限制。
此功能(分割組)允許限制組檔案中的行長度。這對於確保 NIS 組的行比長於 1024 字元。
如果要強制這個限制,可以使用 25。
注意:分割組可能不受所有工具的支援(甚至在 Shadow 工具集中)。您不應該使用這個變數,除非真的需要。
檔案
/etc/group
組賬戶資訊。
/etc/gshadow
安全性群組賬戶資訊。
/etc/login.defs
Shadow 密碼套件配置。
/etc/passwd
使用者賬戶資訊。
退出值
groupmod 命令可以返回如下值:
0
成功
2
無效的命令文法
3
給了選項一個無效的參數
4
指定的組不存在
6
指定的組不存在
9
組名已經在使用
10
無法更新群組檔案
參見
chfn(1), chsh(1), passwd(1), gpasswd(8), groupadd(8), groupdel(8), login.defs(5), useradd(8), userdel(8), usermod(8).
shadow-utils 4.1.5.1 2014-02-17 GROUPMOD(8)
Linux -- groupmod