Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 1997 22:51:05 -0700
From:      Warner Losh <imp@village.org>
To:        David Hawkins <dhawk@river.org>
Cc:        stable@freebsd.org
Subject:   Re: root & /etc/nologin 
Message-ID:  <199703180551.WAA01226@rover.village.org>
In-Reply-To: Your message of "Mon, 17 Mar 1997 21:34:27 PST." <199703180534.VAA04418@ohio.river.org> 
References:  <199703180534.VAA04418@ohio.river.org>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <199703180534.VAA04418@ohio.river.org> David Hawkins writes:
: The man page (login) just says logins are disabled, but I was
: wondering if root/console was a special case.

My FreeBSD sources are offline while I'm updating NetBSD, but my Dec 5
NetBSD sources say:
...
		if (pwd = getpwnam(username))
			salt = pwd->pw_passwd;
		else
			salt = "xx";

		/*
		 * if we have a valid account name, and it doesn't have a
		 * password, or the -f option was specified and the caller
		 * is root or the caller isn't changing their uid, don't
		 * authenticate.
		 */
		if (pwd) {
			if (pwd->pw_uid == 0)
				rootlogin = 1;
...

	/* if user not super-user, check for disabled logins */
	if (!rootlogin)
		checknologin();


which looks like root can always login, even in the face of the
/etc/nologin file.  I strongly suspect FreeBSD wouldn't be any
different in this area.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703180551.WAA01226>