Forgoing The Console Login!
Posted 07 September 2003 - 05:33 AM
Now to the story, I read the book, and learned this:
If you (, a friend, or whatever) misplaced the root password, I'd say no worries.
If you've got consoleaccess and don't mind rebooting, you could try to login with single user mode.
Simplay, after hitting Ctrl+Alt+Del you wait for the POST, then pass the parameter "single" to the booting kernel. I.e. in an LILO promt:
LILO: linux single
On many systems, this will provide you with a root shell. But on some systems (RedHat for instance) you'll run into the emergencypropmpt..
"Give root passwoed for maintenance
(Or type Control-D for normal startup"
If you knew the root pass, you woudln't be here...
If you're lucky, the initscript will let you hit ^C to get you a root prompt.. But most init processes are smarter than that and will tracp the ^C.
Soo, again from the LILO start, you could do:
LILO: linux init=/bin/bash
This will tell the kernel to give you a shell. No passwords, no filesystemchecks and no starting environment... But a very quick new root prompt.
This will be mounted read only though, networking will be down and none of the usual deamons will be running.. Above all, DONT hit ^D or type Exit!
You little shell (and the kernel) constitutes the entire filesystem in this situation..
Now, if it's read-only what do you do?
# mount -o remount,rw /
It will force the filesystem to be remounted as read-write
You should now be able to type "passwd" to change the actual root password.
When the pass is reset, DO NOT REBOOT!
Since there's ni init running, there'sno process in place to safely taking the system down.
Quickest way to shutdown would be :
#mount -o remount,ro /
Now with the rootpartition readonly, you can confidently hit the Reset button, bring it up in single user mode and begin your actuall work
Hope this helps =)
Formerly known as t0bban.
Posted 08 September 2003 - 07:14 AM
Great Tutorial I fixed linuc for you.
I'll be more active here in the LInux forums nowforth, cause I'm reading the book "Linux Server Hacks". It got 100 tips in different stuff, mostly adminrelated.
But there' probably some goodies, like this one =)
Formerly known as t0bban.
Posted 10 September 2003 - 10:00 AM
Posted 10 September 2003 - 12:35 PM
Posted 10 September 2003 - 01:58 PM
you can always password protect lilo in linuxconf to prevent this
Then all you do is make a new Lilo boot disk on a different computer and bypass that lilo install.... provided you can boot from CD or floppy first, or have BIOS password
Posted 11 September 2003 - 09:21 PM
Posted 11 September 2003 - 09:27 PM
provided you can boot from CD or floppy first, or have BIOS password
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users