You are not logged in.
Hi folx
I need to reset the root password. I tried going into GRUB and appending the relevant line with:
(1.) single
(2.) 1
(3.) single init=/bin/bash
Result:
(1.) asked for root password during boot
(2.) asked for root password during boot
(3.) didn't get that far as it went into kernel panic
I downloaded Ubuntu 8.10 desktop to use as a live CD, but that didn't work as the CD just dumped me into an initramfs session.
How am I supposed to reset my root password?
Thank you, wickyd.
Last edited by wickyd (2009-03-19 07:38:14)
Offline
See tip #4 on this page. http://www.ibm.com/developerworks/linux … 9&S_CMP=GR
Offline
chose another live-Distro (e.g. knoppix)
chroot into your system an use
passwd
as usual
Offline
Allan: Thanks but this is exactly my point .. the tips suggested there don't work for Arch Linux.
I never get to a bash shell because Arch asks me for the root password before I can enter single user mode.
lilith2k3: I don't think that will solve the problem as this is very old hardware. I couldn't even install from CD, I had to install via FTP.
Is there any other way to do this?
Offline
How about using an editor instead. init=/usr/bin/nano?
Offline
Use a floppy distro.
Offline
Procyon: This looks very promising, but something isn't working ...
These are the steps I took:
1. Change grub kernel line from ro to rw (or else nano can't write files) and append single init=/usr/bin/nano.
2. nano loads successfully.
3. edit /etc/shadow and remove root password.
4. reboot server and attempt to login, but server claims the login is incorrect.
5. reboot again into nano and discover /etc/shadow is 0k in size.
Repeat steps above with the same result.
Any idea what is going wrong?
Offline
Completely empty? Did you remove the field after the password too? (there is a days since 1970 field right after it) Maybe completely clearing the shadow file is a result of an invalid entry.
Offline
This looks interesting: http://www.cyberciti.biz/tips/recoverin … -file.html
Maybe you can use init=/usr/sbin/pwconv
Offline
Silly question, I know, but do you have sudo permission?
You can reset the root password with your user password, if you've got sudo access.
Offline
Procyon: Yes, it is completely empty. I copy the file shadow- (backup file) to shadow which ends up being 145bytes after editing. However, once I reboot the file is 0bytes. It is as if the write is not permanent.
Procyon: Thank you again for that link, unfortunately that link assumes that init=/bin/bash works but my machine goes into kernel panic when I append that.
Can someone else please confirm if appending single init=/bin/bash works for them.
Is it peculiar to my hardware or do other people also experience a kernel panic while trying that route?
SkonesMickLoud: I know that would seem the obvious route, but I can't use Sudo to fix the problem.
Offline
I see, then the pwconv won't make a difference.
When you do init=/usr/bin/nano, what happens when you quit nano?
Maybe you need to force sync the hard drive using alt+sysrq+s (after you enabled it) or opening /proc/sysrq-trigger with nano, and writing s to it.
BTW if you use vim, can you do :! bash?
Offline
What about single user mode ?
When you get to grub, press e to edit an entry, select the kernel line, press e again and append the word single and then press b to boot. Hopefully that should get you to a root prompt so you can reset the password.
Last edited by moljac024 (2009-03-18 11:34:34)
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
What about single user mode ?
When you get to grub, press e to edit an entry, select the kernel line, press e again and append the word single and then press b to boot. Hopefully that should get you to a root prompt so you can reset the password.
But you did read his first post, didn't you?
Offline
Easiest way would be to download either the USB image for Arch, or the LiveCD.
Boot from it.
Mount your root partition at say /mnt/root.
chroot into it using chroot /mnt/arch /bin/bash
run passwd.
Your root password should now be reset. Hopefully.
Offline
I used the procedure in the wiki: Password Recovery.
Bob
Offline
Offline
init=/usr/bin/passwd?
Offline
Is it possible you edited the /etc/shadow of the initrd?
Offline
-> if you are using an ext2 or 3 (or 4 maybe) or reiserfs
-> if you're dual-booting with windows, there are apps to access the partition/disk with the linux os. access it then change it.
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
I'd have thought a usb boot + chroot or mounting the arch fs would work.
Offline
this has all been discussed before - ad nauseatum
1) boot up with _any_ live cd
2) mount your root filesystem as - say - /mnt/fs
3) vi /mnt/fs/etc/passwd
change the first line to:
root::0:0:root:/root:/bin/bash
4) unmount /mnt/fs and reboot
5) you can now log in as 'root' with no passwd
6) pwconv && passwd (now set new password)
<edit>
With all due respect - chroot is _not_ the way to go.
In order to actually _set_ a new password, you have to run the same kind of
authorization as in your present system - it may be different for different distros.
</edit>
Last edited by perbh (2009-03-18 16:49:01)
Offline
Try to use init=/bin/bash and run single user mode.
Offline
moljac024 wrote:What about single user mode ?
When you get to grub, press e to edit an entry, select the kernel line, press e again and append the word single and then press b to boot. Hopefully that should get you to a root prompt so you can reset the password.But you did read his first post, didn't you?
Ooops..
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline