Unable to login

Matthew Seaman matthew at FreeBSD.org
Mon Nov 11 15:46:52 UTC 2019

On 11/11/2019 14:38, Jerry wrote:
> I recently updated to FreeBSD 12.1. Everything seemed fine at first.
> Now, quite suddenly, I am unable to login to my system.
>  From a cold boot, the login screen appears. I type in the name and
> password, and a new login screen appears, The time of my last login is
> updated though. It appears that I am being immediately signed out of
> each session. I am caught in a login cycle.
> What can I do to correct this?

Here's an outline of the sorts of things you can try to get access to an 
uncommunicative system.  Try these in this order until you succeed in 
logging in.  You almost certainly won't need to try the later stages in 
this sequence, as those indicate a machine so badly broken that it would 
struggle to boot at all, let alone get to a login screen.  But I've left 
them in here for completeness' sake.

Are you using a graphical login manager?  Can you login on the console 
without the graphical bits?  You can usually use Crt-Alt-F2 to switch to 
vty2 which should give you a console login prompt.

Failing that, can you login remotely via the network at all?

     --- if you can login outside your graphical environment, then the
         breakage is in the graphical layer.  Check the logs for clues;
         try reinstalling various graphical bits.  Make sure you have any
         necessary loadable kernel modules loaded: remember that these
         are specific to the exact kernel version you're running, so
         loadable modules may well need recompiling locally after an

         Be sure to check for things like disk full (df -h) or run-out-
         of-inodes (df -i)

Can you login on the console as a different user?  As root would be useful.

     --- being able to login as a different user indicates that it's
         probably something like your user shell that's broken.  Missing
         shared libraries is a classic reason for things like that to

Failing that, can you reboot the machine into single user mode and get 
into the console that way? (Take the default when it asks you what shell 
to use)

     --- this gives you a somewhat limited root shell, without networking
         or any of the other usual services running.  Also the filesystem
         will be mounted read-only (if you're on UFS2) or only the root
         ZFS will be mounted, so you may need to remount it read-write
         and also mount all of the other filesystems.  Again, go hunting
         in system logs for any indication of why your login is failing.

         If that doesn't work, try again, but this time, when prompted to
         type in the name of the shell, type in /rescue/sh  If you get
         this far then your system is pretty badly hosed and you should
         be thinking about reinstalling, but you still have a chance to
         recover stuff from your drive before you overwrite it.

The final level to try is booting into a live-CD from some installation 
media.  You should then be able to mount your actual filesystems onto 
the live-CD and do the sort of investigations described above.



More information about the freebsd-questions mailing list