[root@kerry ~]# su kerry
[google@kerry root]$ mail
/var/spool/mail/root: Permission denied
[atyu@kerry root]$ exit
exit
[root@kerry ~]# su - kerry
[atyu@kerry ~]$ mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/google": 2 messages 2 new
>N 1 Mon Sep 10
13:38 80/2616 "Undelivered Mail Returned to Sender"
N 2 Mon Sep 10 13:45 19/658
"IBM"
&
收到邮件了
#su - username 携带环境变量
#su username 只是切换用户,但是环境变量还是之前用户的
本文出自 “聆听未来” 博客,请务必保留此出处http://blog.chinaunix.net/space.php?uid=9419692&do=blog&id=3182651