How could normal user obtain root password or change root password
well, i am running Debian as a normal user.
i need to obtain root password so that i can mount my Win XP drive and make new directory, shuting down my system.....etc. Anyway i can obtain the root password or change the root password. I heard i may do it in single user mode. 1. edit the inittab file, make the default run level as single user mode, which is 1. 2. press the hardware button, shutdown the pc .... 3. turn on the pc again.. 4. it will enter the single user mode 5. type passwd command on the shell, and change the root password... Is this way workable????????? Please advice..Thanks... |
yeah that'll work. bit overkill though, don't edit inittab, instead just temporarily add "1" to the boot command in lilo or grub when it loads up.
|
How to edit the lilo file by adding "1" to the boot command...can anyone show me the sample lilo file ???
btw, why shouldn't i edit the inittab file?? i will change it back to multiuser mode once the root password is changed successfully. Please advice. thanks. |
no, you don't edit enything permanently, just hit x or whatever in lilo to edit it instantly.
|
oh no........
normal user won't be able to edit inittab and lilo.conf....... please advice.... |
am i asking a stupid question here...
hahaha....i think so.... sorry for that... |
i've said twice now you don't edit ANY files... please read what i'm saying
|
at lilo type
linux single then u can boot as root without asking for a passwd, and u can change it then. |
Debian uses grub by default, not lilo. When the grub menu appears, hit "e" for edit, then add the runlevel you want.
Peace, JimBass |
I must not be understanding the question. It sounds to me like you want to somehow gain root privileges without knowing the current root password. Hopefully it's not nearly as simple as the suggestions above. I usually get to single user mode in Debian by typing "telinit 1" at a command prompt. But you still need the root password to go any further.
|
You can always reset the root password with physical access to the box. You just boot into runlevel 1, which can only be blocked if you password protect your grub/lilo screen. Over a network, even a LAN you can't do anything without knowing the root pass, but it is trivially easy to get around if you can be there while it is booting.
Peace, JimBass |
I must be dense, but I can't figure out how to do it. I can boot to runlevel 1 (single user mode), no problem, but once there I have to enter the root password, or hit Control-D, which simply returns me to a normal boot sequence.
I will try again later today. |
With Debian you must supply the root password if you boot with "single" in GRUB. Instead, boot with "-s". This will bring up a shell before it brings up init. You can change your root password that way.
|
Quote:
|
Nice to see that debian is secure against such easy attacks.
You could use a Live CD, log into the live CD as root, mount you're harddrive, chroot into the hard drive, then change you're password. If debian is installed on hda2 I think this would do it. Code:
mount /dev/hda2 /mnt |
Quote:
|
I just now remembered because I had to do it... But I _knew_ there was a way to get into a Debian box from grub.. Instead of booting with 'single' or '-s' which asks for a password, boot with this:
Code:
init=/bin/bash Simple. |
root reset without single user mode
at the grub prompt, edit the boot option line to include
Code:
init=/bin/sh Code:
mount -o remount,rw / Code:
passwd root Code:
sync&&reboot |
Did you realize this was originally from 2005 and most recently from 2007?
|
All times are GMT -5. The time now is 05:51 PM. |