LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   recover login and password (https://www.linuxquestions.org/questions/linux-newbie-8/recover-login-and-password-691184/)

gawain 12-17-2008 05:48 AM

recover login and password
 
Hi everybody

I-ve got a PC with a dual boot Ubuntu and slackware. Since I-ve been using ubuntu for the past few months I forgot slackware login and password. I tried to recover them using ophcrack but I didn-t manage.

How can I do? Can I try with a live cd? If so, where canI look fot the login and password?

Thanks for any help

eco 12-17-2008 08:29 AM

Hi,

You say it's a dual boot so all you have to do is chroot into the slackware OS from the Ubuntu OS.

In short (but check before doing this blindly):

say Slackware's root (/) is on sda2

In ubuntu do:

# mount /dev/sda2 /mnt
# chroot /mnt /bin/bash

(now you are in your slack environment)
# source /etc/profile
(change your password)
# passwd
# exit
(now you are back in ubuntu)

# exit

reboot into slack and use your password.

Remember, this is done of the top of my head, check it first.

Hope this helps

gawain 12-20-2008 09:04 AM

Thanks and sorry for my replying so late. I really coldn't get to my PC before now.
I'll try to put into work what you suggested me

I'll start off looking for mount. (???)

Thanks again

jschiwal 12-20-2008 09:11 AM

Running "bash -l" is a good idea after chrooting. A login shell will run the .profile, setting up the PATH variable.

I had a situation where zeroing out the password wouldn't work. Somehow I never set the root password when I installed it that time. So I simply copied my regular user's password hash for root's, and then rebooted. I could log in with my regular users password, and use "passwd" to set it again.

eco 12-21-2008 11:46 AM

Thanks for that... will remember for future use. My advice came directly from Gentoo user manual. ;)

Did you end up fixing your problem gawain?

gawain 12-24-2008 09:22 AM

Sorry, but really I had no time to try to solve the problem seriously. For a couple of days, I think, I'll be "working" on something else.

Just I want to take the chance to wish merry Christmas to everybody


All times are GMT -5. The time now is 12:12 AM.