[root@Salve ~]# ll 总用量 100 -rw-------. 1 root root 1752 5月 22 00:29 anaconda-ks.cfg -rw-r--r--. 1 root root 44184 5月 22 00:28 install.log [root@Salve ~]# head -1 /etc/passwd root:x:0:0:root:/root:/bin/bash [root@Salve ~]# head -1 /etc/group root:x:0: [root@Salve ~]# cat /etc/group root:x:0: bin:x:1:bin,daemon
id username
(2)、用户添加
useradd username
创建用户,同时会产生新的用户组,并且用户属于该组
userdel -r username
[root@Salve ~]# id test2 uid=501(test2) gid=501(test2) 组=501(test2) [root@Salve ~]# gpasswd -a test2 root #把用户test2加入到root组 Adding user test2 to group root [root@Salve ~]# id test2 uid=501(test2) gid=501(test2) 组=501(test2),0(root) #test2同时属于两个组
[root@Salve ~]# gpasswd -d test2 root
Removing user test2 from group root
setfacl -m u:user1:rw file01.txt
setfacl -m u:user2:rx file01.txt
getfacl file01.txt
#!/bin/bash #tesh.sh echo ‘disk space:‘ echo df -Th echo echo ‘free space:‘ free -m echo echo ‘users:‘ for i in‘ls /home‘ do id -u $i done
#!/bin/bash #ftp目录统计 date >>/var/log/pubdir.log ls -lhR /var/ftp/pub >>/var/log/pubdir.log rm -rf /var/ftp/pub
crontab -e
crontab -l
原文:http://www.cnblogs.com/chinas/p/5557727.html