Reboot to a lilo 'boot:' prompt (first exit any graphical lilo screen to get the text prompt as above). Then type 'linux 1' so it looks like :
boot: linux 1
press enter and the system will stop at runlevel 1. You will have a root prompt (you are root without logging in). Change the root password with 'passwd' and then do 'sync' a few types and 'init 6' to shutdown .. & reboot.
The only problem might be if the admin was crafty enought to set a password within lilo in which case you could have a few problems. If so try to find a boot floppy that may not have lilo password protected.
The admin deleted the root account??
I didn't know that could be done.
I had admin privileges once on a Linux box, and I used to access it as 'root2', another super user account created for me.
I've read the posts answering to you in this trhead and I can't see if the root account can be deleted.
Anyway, there's a group called root, any user within that group has superuser privileges.
See my FAQ in this forum under the "Security" heading. d3funct
zimmer.jon@cfwy.com
The software required `Windows 95 or better', so I installed Linux.
Just for clarification 'linux single' at the boot prompt is functionally identical to 'linux 1' in my prior post...
Anyway, it's not too clear exactly what you mean when you say that 'root' was deleted. root is an inbuilt account (id 0 group 0) and cannot be deleted as such. However, I suppose it would be possible to delete the root user from /etc/passwd, /etc/shadow et al. Even so, you can still recover the situation in single-user maintenance mode as previously described (subject to lilo having a password set in which case you need a 'clean' boot disk).
If it still doesn't work let us have more detail as to what errors you get...
Hello,
The Root user uid is established by the Linux Kernel and cannot be deleted. The active account associated with uid 0 (root) can be removed but can be added just as easily.
1) Boot linux to single user mode as previously described (boot: linux 1)
2) useradd -u 0 -g 0 root
3) passwd root
This should re-establish the root account with the proper UID and GID.
If that doesn't work, you can try adding the correct information into /etc/passwd
root:x:0:0:root:/root:/bin/bash
Don't forget to run passwd to assigna password in /etc/shadow.
When I go to lilo prompt: I type linux single then I got the prompt the message is "old-password", so I forgot the password, so how can I type the old password when the purpose is to reset it?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.