su rails 会话神秘地自行关闭

su rails 会话神秘地自行关闭

我需要帮助解决一个奇怪的问题。当我通过 ssh 进入我拥有的服务器并su rails以 root 用户身份执行操作时,会话会自动关闭:

root@ubuntu-server:/4# su rails
rails@ubuntu-server:/4$ exit

我没有输入exit...它只是自己出现...它可能会持续一分钟以上,但它总是在新一分钟的前 5 秒内关闭,如下所示...我该如何解决这个问题?

/var/log/auth.log

Mar 24 19:03:13 ip-10-149-16-81 su[11304]: Successful su for rails by root
Mar 24 19:03:13 ip-10-149-16-81 su[11304]: + /dev/pts/2 root:rails
Mar 24 19:03:13 ip-10-149-16-81 su[11304]: pam_unix(su:session): session opened for user rails by root(uid=0)
Mar 24 19:04:01 ip-10-149-16-81 CRON[11317]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 24 19:04:01 ip-10-149-16-81 CRON[11318]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 24 19:04:01 ip-10-149-16-81 CRON[11319]: pam_unix(cron:session): session opened for user rails by (uid=0)
Mar 24 19:04:01 ip-10-149-16-81 CRON[11320]: pam_unix(cron:session): session opened for user rails by (uid=0)
Mar 24 19:04:01 ip-10-149-16-81 CRON[11318]: pam_unix(cron:session): session closed for user root
Mar 24 19:04:02 ip-10-149-16-81 CRON[11320]: pam_unix(cron:session): session closed for user rails
Mar 24 19:04:03 ip-10-149-16-81 CRON[11319]: pam_unix(cron:session): session closed for user rails
Mar 24 19:04:03 ip-10-149-16-81 su[11304]: pam_unix(su:session): session closed for user rails
Mar 24 19:04:04 ip-10-149-16-81 CRON[11317]: pam_unix(cron:session): session closed for user root

相关内容