設定帶sgid的目錄權限
[root@server0 home]# chmod g+s admins/ #所屬組與上級檔案夾一樣
[root@server0 home]# ll
total20
drwx------.5 a a 4096 Oct 1 18:50 a
drwx------.5 abc abc 4096 Oct 1 16:59 abc
drwxrws---.2 root adminuser 16 Oct 1 19:39 admins
[root@server0 home]# cdadmins/
[root@server0 admins]# touch bbbb
[root@server0 admins]# ll
total0
-rw-r--r--.1 root adminuser 0 Oct 1 19:47 bbbb
[root@server0 admins]#
建立指定uid或gid使用者
[root@desktop0 ~]#useradd alex -u 3456
[root@desktop0 ~]# echo"glegunge" | passwd --stdin alex
Changingpassword for user alex.
passwd:all authentication tokens updated successfully.
[root@desktop0 ~]#
本文轉自810105851 51CTO部落格,原文連結:http://blog.51cto.com/4708948/1701862,如需轉載請自行聯系原作者