问题描述:
切换用户时,会出现红色部分的提示信息。有时候会影响之前脚本的正常运行,如何去掉它。
[root@rac1 ~]# su - oracle
Last login: Tue Mar 21 17:44:11 CST 2017
解决方法:
修改 /etc/pam.d/su文件
将红色部分注释掉即可
[root@rac1 ~]# cat /etc/pam.d/su
#%PAM-1.0
auth sufficient pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth sufficient pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth required pam_wheel.so use_uid
auth substack system-auth
auth include postlogin
account sufficient pam_succeed_if.so uid = 0 use_uid quiet
account include system-auth
password include system-auth
session include system-auth
#session include postlogin
session optional pam_xauth.so
验证:
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$
版权声明:本文为博主原创文章,未经博主允许不得转载。
su last login