Autologout after logging in
5,853
It sounds like your account's default shell has been changed.
Take a look at /etc/passwd
. There should be a line similar to this one:
useraccount:x:1000:1000:username,,,:/home/useraccount:/bin/bash
If the last CSV is not your usual default shell, change it.
If your default shell it set correctly, examine the contents of /home/useraccount/.bashrc
(or the equivalent of your shell) any every shell script it calls.
Related videos on Youtube
Author by
Peter
Updated on September 18, 2022Comments
-
Peter almost 2 years
I have a Ubuntu 10.04 LTS server.
I'm currently logged in as root, because I suddenly cannot log into my account anymore.
When I execute
su useraccount
, nothing happens.The log file
auth.log
tells me the following:Jan 25 14:51:43 server su[26174]: Successful su for useraccount by root Jan 25 14:51:43 serversu[26174]: pam_unix(su:session): session opened for user useraccount by root(uid=0) Jan 25 14:51:43 serversu[26174]: pam_unix(su:session): session closed for user useraccount Jan 25 14:51:43 serversu[26174]: + /dev/ttyS0 root:useraccount
So, I can actually log in successfully, but I get kicked out right away.
-
Dennis over 11 yearsWell, that's the problem then:
/bin/false
means no shell at all. Ubuntu's default shell is/bin/bash
. I have no idea how the shell might have changed. -
Peter over 11 yearsThat's not the only user where /bin/false is set. Well I will re-setup this server anyway. Maybe it really was caused by the last plesk update. I've got no idea. Thank you.
-
Dennis over 11 yearsGlad I could help!
/bin/false
is correct for non-human users that don't need a shell (e.g.,syslog
). -
Arash Hatami about 7 yearsOMG !!!! you save me ♥