标签:ftp 命令 添加 mail 执行 swa bashrc sync operator
[root@node1 ~]# cp -r /etc/skel/ /home/tuser1
[root@node1 ~]# chmod -R 700 /home/tuser1
[root@node1 ~]# ls -ld /home/tuser1
drwx------. 2 root root 62 Sep 7 21:40 /home/tuser1
[root@node1 ~]# vim /etc/group
[root@node1 ~]# tail -1 /etc/group
hadoop:x:1006:
[root@node1 ~]# vim /etc/passwd
[root@node1 ~]# tail -1 /etc/passwd
hadoop:x:1006:1006::/home/hadoop/:/bin/bash
[root@node1 ~]# cp -r /etc/skel/ /home/hadoop
[root@node1 ~]# chmod 700 /home/hadoop
[root@node1 ~]# ls -ld /home/hadoop
drwx------. 2 root root 62 Sep 7 22:05 /home/hadoop
[root@node1 ~]# chown -R hadoop:hadoop /home/hadoop/
[root@node1 ~]# ls -al /home/hadoop/
total 12
drwx------. 2 hadoop hadoop 62 Sep 7 22:05 .
drwxr-xr-x. 10 root root 118 Sep 7 22:05 ..
-rw-r--r--. 1 hadoop hadoop 18 Sep 7 22:05 .bash_logout
-rw-r--r--. 1 hadoop hadoop 193 Sep 7 22:05 .bash_profile
-rw-r--r--. 1 hadoop hadoop 231 Sep 7 22:05 .bashrc
[root@node1 ~]# grep ‘^[Ss]‘ /proc/meminfo
SwapCached: 0 kB
SwapTotal: 2097148 kB
SwapFree: 2097148 kB
Shmem: 8320 kB
Slab: 84952 kB
SReclaimable: 37240 kB
SUnreclaim: 47712 kB
[root@node1 ~]# grep -E ‘^(S|s)‘ /proc/meminfo
SwapCached: 0 kB
SwapTotal: 2097148 kB
SwapFree: 2097148 kB
Shmem: 8320 kB
Slab: 84952 kB
SReclaimable: 37240 kB
SUnreclaim: 47712 kB
[root@node1 ~]# grep -v "/sbin/nologin$" /etc/passwd | cut -d: -f1
root
sync
shutdown
halt
centos
user1
bash
basher
testbash
hadoop
[root@node1 ~]# grep "/bin/bash$" /etc/passwd | cut -d: -f1
root
centos
user1
bash
basher
testbash
hadoop
[root@node1 ~]# grep "\<[0-9][0-9]\?\>" /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
[root@node1 ~]# grep "^[[:space:]]\{1,\}" /boot/grub/grub.conf
[root@node1 ~]# grep "^#[[:space:]]\{1,\}[^[:space:]]\{1,\}" /etc/rc.d/rc.sysinit
[root@node1 ~]# netstat -tan | grep "LISTEN[[:space:]]*$"
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:25 :::* LISTEN
[root@node1 ~]# grep "^\([[:alnum:]]\{1,\}\):.*\1$" /etc/passwd
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
bash:x:1007:1007::/home/bash:/bin/bash
nologin:x:1010:1010::/home/nologin:/sbin/nologin
标签:ftp 命令 添加 mail 执行 swa bashrc sync operator
原文地址:http://blog.51cto.com/13929964/2171965