Page 1 of 1

Root password does not work

Posted: 19. Jun 2011, 15:13
by macondo
After reinstalling and using salix for an hour, my root password does not work.
How can i change my password? Thank you!

Re: Root password does not work

Posted: 19. Jun 2011, 15:26
by Shador

Re: Root password does not work

Posted: 19. Jun 2011, 15:31
by gapan
macondo wrote:my root password does not work
That's not possible. You either forgot your root password, or you're not being careful and you have your capslock on (or had when setting the password) or your numlock on if you're on a laptop.

You can set a new password if you chroot from a live cd (or the installation disc).

Re: Root password does not work

Posted: 19. Jun 2011, 15:47
by macondo
gapan wrote:
macondo wrote:my root password does not work
That's not possible. You either forgot your root password, or you're not being careful and you have your capslock on (or had when setting the password) or your numlock on if you're on a laptop.

You can set a new password if you chroot from a live cd (or the installation disc).
I introduced my Salix 1337 Fluxbox installation cd, i exited the installation, at the root prompt i typed:

Code: Select all

# passwd
Entered the new password twice, rebooted got the installation cd out and booted, still does not recognized the new password.
Thanks anyway.

Re: Root password does not work

Posted: 19. Jun 2011, 15:48
by gapan
You missed the chroot part.

Re: Root password does not work

Posted: 20. Jun 2011, 14:21
by macondo
gapan wrote:You missed the chroot part.
The link i followed never mentioned the chroot part, could you explain how to chroot and where in the process is it applied?

Re: Root password does not work

Posted: 20. Jun 2011, 16:07
by gapan

Code: Select all

mkdir /foo
mount /dev/sdxX /foo
chroot /foo
passwd
replace sdxX with your root partition.

Re: Root password does not work

Posted: 20. Jun 2011, 16:13
by mimosa
chroot was gapan's suggestion, that link points to some different ways of doing it with instructions.

However, something like this ought to work:

1 Boot the CD

2 Open a terminal and become root

3 Mount the / partition of your installation, perhaps creating a mount point for it, e.g.

#mkdir /tmp/mainlinux
#mount /dev/sda1 /tmp/mainlinux

4 Use chroot to change the password

#chroot /tmp/mainlinux passwd


... it will prompt you to choose a new password

5 Try booting your main linux installation with the new password

Good luck! :)