Subject: Re: Locked Out Root :(
To: Zafer Aydogan <zafer@gmx.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-users
Date: 08/02/2004 00:28:10
On Sun, Aug 01, 2004 at 11:38:40PM +0200, Zafer Aydogan wrote:
> Hello everyone,
> 
> and thank you all very much, helping me with my ftpd post, last week.
> Actually I'm back from my long weekend journey. Relaxed :)
> 
> Now I noticed, that I have set by mistake the root shell to /nologin on one
> of our backup servers.
> That means, that if I try to su to root, I only get an error and return to
> my user shell.
> Is there any way to get the root account back ?

Well, the only way I can see is to reboot this system single-user,
and then:
mount -a
vipw
to change the root shell.

sudo can probably give a root shell without using the shell defined in
/etc/passwd, but you need a root shell to install sudo ...

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--