Date: Mon, 11 Nov 2019 15:46:39 +0000 From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-questions@freebsd.org Subject: Re: Unable to login Message-ID: <cd757f5e-c477-d7a5-8fb7-0ff696cabc87@FreeBSD.org> In-Reply-To: <20191111093855.0000098e@seibercom.net> References: <20191111093855.0000098e@seibercom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 upgrade. 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 happen. 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. Cheers, Matthew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cd757f5e-c477-d7a5-8fb7-0ff696cabc87>