[vox-tech] Not able to log into root.
Peter Jay Salzman
vox-tech@lists.lugod.org
Tue, 23 Apr 2002 12:07:54 -0700
as mike pointed out to me in email, it's just better to use a pager like
less. it's a good habit to get into.
begin nbs <nbs@sonic.net>
> On Tue, Apr 23, 2002 at 11:58:33AM -0700, Rusty Minden wrote:
> > Dohh! Yes I do I flubbed when doing a search using vim sorry. Still can't use
> > su to log into root.
>
> You'll probably need to boot into single user mode (err.. if you CAN
not quite -- you still need to enter a password in single user mode.
> with a botched /etc/passwd), or (more likely) use a rescue disk.
you need to boot a rescue disk (the linux BBC or linuxcare cd's are
perfect for this sort of thing. debian rescue disks will work too).
then you need to manually mount the root partition read/write.
then you need to change the permission on /mnt/bin/su (not on /bin/su,
if that makes sense).
it's just like when you forget the root password, except you'll be using
chmod to change permissions instead of vim to change text between the
2nd and 3rd ":" in /etc/shadow.
pete
> BTW - use "vipw", not "vim"... It will, as the man page says,
> "set the appropriate locks to prevent file corruption." I seem to
> recall it also complaining and not saving/quitting if the file got
> botched up. (eg, it syntax checks it before committing to disk)
>
> I could be wrong about that last part, unfortunately... :)
> In that case, I guess VIM is good enough. Just be CAREFUL! ;)
>
> -bill!