From owner-freebsd-questions@freebsd.org Mon Nov 11 15:46:52 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D256C1B835F for ; Mon, 11 Nov 2019 15:46:52 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47BZxS5HfFz4K28 for ; Mon, 11 Nov 2019 15:46:52 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: matthew/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 778FA1F74D for ; Mon, 11 Nov 2019 15:46:52 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from leaf.local (unknown [88.212.184.97]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id EC15D1539F for ; Mon, 11 Nov 2019 15:46:49 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/EC15D1539F; dkim=none; dkim-atps=neutral From: Matthew Seaman Subject: Re: Unable to login To: freebsd-questions@freebsd.org References: <20191111093855.0000098e@seibercom.net> Message-ID: Date: Mon, 11 Nov 2019 15:46:39 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191111093855.0000098e@seibercom.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Nov 2019 15:46:52 -0000 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