Date: Mon, 22 Dec 1997 23:27:43 -0500 (EST) From: "Joe \"Marcus\" Clarke" <jmcla@ocala.cs.miami.edu> To: "Matthew D. Fuller" <fullermd@futuresouth.com> Cc: Javier Henderson <javier@Kjsl.com>, freebsd-questions@freebsd.org Subject: Re: Shooting yourself in the foot Message-ID: <Pine.SGI.3.96.971222232643.16691A-100000@ocala.cs.miami.edu> In-Reply-To: <Pine.BSF.3.96.971222214741.11353C-100000@shell.futuresouth.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I agree, this works great...but if you didn't add /bin/false to /etc/shells, then not even su -m can save you. This was my mistake a while back with the mshell port. Joe Clarke On Mon, 22 Dec 1997, Matthew D. Fuller wrote: > On Mon, 22 Dec 1997, Joe "Marcus" Clarke wrote: > > > The way I fixed this when I did something similar was to take the system > > down to single user mode, `shutdown now`, then remount / as read/write, > > mount -u /, then edit /etc/shells to allow for /bin/false as a valid > > shell. Bring the system back up to multi-user and login as a user > > allowed to su to root. Then su to root using su -m, you should be able > > to issue a chsh root then. If you have no ther users in wheel, then > > instaed of editing /etc/shells, use vipw to edit the password file and > > change roots shell back to something else. > No need to shutdown. > Just do a su -m, then use vipw to set root's shell back to sh (or csh if > you're REALLY perverse ;). > > > > > Joe Clarke > > > > On Mon, 22 Dec 1997, Javier Henderson wrote: > > > > > So, let's say that you changed the root shell to > > > /bin/false, which I successfully did. > > > > > > How do you fix this? Doing "su", of course, does > > > nothing useful right now... > > > > > > > *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* > | FreeBSD; the way computers were meant to be | > * "The only reason I'm burning my candle at both ends, is * > | that I haven't figured out how to light the middle yet."| > * fullermd@futuresouth.com :-} MAtthew Fuller * > | http://keystone.westminster.edu/~fullermd | > *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SGI.3.96.971222232643.16691A-100000>