linux権限操作
2908 ワード
:useradd
-g ( )
-G ( , )
-c
-d
useradd –g aa bb bb aa
useradd –G user1 aa aa user1
----------------------------------------------------
:passwd [ ]
-l
-u
:userdel -r
-r: ,
----------------------------------------------------
:usermod useradd
usermod -g webadmin jack
usermod -G group1,group2 jack
-l -c -e -L
-U -aG
----------------------------------------------------
:groupadd
:groupmod
-n:
groupmod -n newname oldname
:groupdel
:gpasswd -a
-a -d
----------------------------------------------------
:su [-]
-:
- root,
:id
UID,GID
----------------------------------------------------
:
jack mary /software
groupadd softadm
usermod –aG softadm jack
gpasswd –a marry softadm
chgrp softadm /software
chmod g+w /software
!
-----------------------------------------------------
ACL(Access Control List), / , / RWX , 2.6 。
:
setfacl -m <rules> <files>
setfacl -m u: :
setfacl -m g: :
:setfacl -m u:jack:rx /backup
-m:
-x:
setfacl –x u:jack /backup
-b:
-R: ( )
:setfacl -m d:u:jack:rwx -R /test
ACL :getfacl ( +)
ACL :
setfacl -R –m u: :
:setfacl -m u:apache:rwx -R /var/www/html/
// acl
setfacl –R –m d:u: :
// acl
:setfacl -m d:u:apache:rwx -R /var/www/html/