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.

Share:
5,853

Related videos on Youtube

Peter
Author by

Peter

Updated on September 18, 2022

Comments

  • Peter
    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
    Dennis over 11 years
    Well, 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
    Peter over 11 years
    That'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
    Dennis over 11 years
    Glad I could help! /bin/false is correct for non-human users that don't need a shell (e.g., syslog).
  • Arash Hatami
    Arash Hatami about 7 years
    OMG !!!! you save me ♥