[root@ns2 ~]# su atyu
[google@ns2 root]$ mail
/var/spool/mail/root: Permission denied
[atyu@ns2 root]$ exit
exit
[root@ns2 ~]# su - atyu
[atyu@ns2 ~]$ mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/google": 2 messages 2 new
>N 1 MAILER-DAEMON@atyu Mon Sep 10 13:38 80/2616 "Undelivered Mail Returned to Sender"
N 2 baidu@ns2.atyu.c Mon Sep 10 13:45 19/658 "IBM"
&
迷惑了好久,无意中发现居然收到邮件了
可见“-”的重要
#su - username 携带环境变量
#su username 只是切换用户,但是环境变量还是之前用户的
阅读(2376) | 评论(1) | 转发(0) |