Linux使用者和組

來源:互聯網
上載者:User

使用者

有效使用者

實際使用者

有效使用者ID

實際使用者ID

1 -- 使用者操作函數
linux-rwdx:~ # useradd --helpUsage: useradd ...useradd - create a new user  -c comment     Set the GECOS field for the new account --show-defaults Print default values --save-defaults Save modified default values  -D binddn      Use dn "binddn" to bind to the LDAP directory  -d homedir     Home directory for the new user  -e expire      Date on which the new account will be disabled  -f inactive    Days after a password expires until account is disabled  -G group,...   List of supplementary groups  -g gid         Name/number of the users primary group  -k skeldir     Specify an alternative skel directory  -m             Create home directory for the new user  -o             Allow duplicate (non-unique) UID  -P path        Search passwd, shadow and group file in "path"  -p password    Encrypted password as returned by crypt(3)  -u uid         Force the new userid to be the given number  -r, --system   Create a system account  -s shell       Name of the user's login shell --service srv   Add account to nameservice 'srv'      --help     Give this help list      --usage    Give a short usage message  -v, --version  Print program versionValid services for --service are: files, ldap

添加一個使用者:

linux-rwdx:/home # useradd svn -d /home/svn -g svnlinux-rwdx:/home # passwd svnChanging password for svn.New Password: Reenter New Password: Password changed.mkdir /home/svnchown -R svn:svn /home/svn
2 -- 使用者組操作函數
linux-rwdx:~ # groupadd  --helpUsage: groupadd [-D binddn] [-g gid [-o]] [-r] [-P path] [-p password] groupgroupadd - create a new group  -D binddn      Use dn "binddn" to bind to the LDAP directory  -g gid         Force the new groupid to be the given number  -o             Allow duplicate (non-unique) UID  -P path        Search passwd, shadow and group file in "path"  -p password    Encrypted password as returned by crypt(3)  -r, --system   Create a system account --service srv   Add account to nameservice 'srv'      --help     Give this help list      --usage    Give a short usage message  -v, --version  Print program versionValid services for --service are: files, ldap

 

 

 

 

 

 

 

 

http://wenku.baidu.com/view/37e58269561252d380eb6e0a.html

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.