Linux -- groupmod

來源:互聯網
上載者:User

標籤: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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.