Hey. As I'm not all too good with this linux security stuff, I read the book "Linux Server Hacks" by Bob Flickenger. It's great for admins..
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?
Try this:
# 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 =)
|
Page 1 of 1
Forgoing The Console Login! Yeah that's correct, get your root passw
#3
|
Our Sponsors: |

Sign In
Register
Help
MultiQuote