su -m only works when you have a bad shell, if your uid is 0 su(1) -m Leave the environment unmodified. The invoked shell is your login shell, and no directory changes are made. As a security precaution, if the target user's shell is a non-standard shell (as defined by getusershell(3)) and the caller's real uid is non- zero, su will fail.
But otherwise, yours would be the right answer, I believe. Mark -- On 20 Dec 2003 at 23:32, Scott I. Remick wrote: {Re: bad root shell...}: > On Sat, 20 Dec 2003 09:44:17 -0800, Mark McConnell wrote: > > > An error in a pw* script inserted a non-existent shell into the password > > database, effectively locking out root. > > > > I used a fixit disk to correct the problem, using this procedure: > > Unless I'm missing something, seems like the long way to do this. Last > time I did this to myself, I did the following: > > 1) Log in as a user who can su to root. > 2) Use su -m to su to root without changing your current shell > 3) As root, use chpass -s to change your shell to a working one. > > Of course, this won't work if your only account is "root" or you don't > have anyone else in the wheel group, so maybe it doesn't apply to you. > > _______________________________________________ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > Mark McConnell - Portland, OR Technical Imaging Systems [EMAIL PROTECTED] 503-546-0517 [EMAIL PROTECTED] 503-257-7591 _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"