LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   forgot my user password (https://www.linuxquestions.org/questions/linux-general-1/forgot-my-user-password-281699/)

Avatar 01-24-2005 01:26 PM

forgot my user password
 
Hi Linux experts.

I know this question has been asked several times and I did to a search. But I didn't forget root's password, only my user password. There is only the one user created.

I'm using Mandrake 10.0 with no X. (Just command line). I get the login: prompt screen and I definitely don't remember the password. (I only log in once every 45 days or so)

I canNOT log in as root to change the password since there is some sort of security setting that prevents root from logging in at the log in screen. (I can only do "su" to become root).

How can I recover/reset my password without logging in? I don't want to re-install as I have some databases and settings on there.

Also is there any way to prevent my passwords from expiring? That way I don't have to remember a new password each time. Thanks!!!

secesh 01-24-2005 01:29 PM

whoops... didn't read all of that... just a sec...

not being familiar with mandrake, and whatever would block root from being able to log in, i'd say you need to treat this as though you forgot root's password and attempt to recover the system.

there's a number of different ways of going about this... the basic idea is booting to a stripped version of your system and rewriting root's password. i suppose that while you're there you could rewrite your user password, too.

but... this is something i've only had to do once (recover root password on a linux box)... and that was a long time ago, so i'm not much use here...

Blinker_Fluid 01-24-2005 01:59 PM

boot into single user mode and then change it.

I think you can either append 'single' or '-S' on the end of your load line in Grub or LILO and it will boot the system single user mode and allow you to change the pasword with the typical 'passwd username'

Avatar 01-24-2005 03:48 PM

Thanks Blinker, that was the solution. But I needed more information and I was able to find it on google.

For other newbies out there this is what I needed to do.

Reboot the computer (CTRL+ALT+DEL)
As the computer was booting up, press the ESC key at the LILO boot options screen. This takes you to a text -based screen with the list of boot options (linux, failsafe, etc) and a boot: prompt.
At the boot: prompt, type "linux single" and press Enter.
The computer then continues to boot up, halfway through booting it says something like "Enter root password for maintenance: (or press Ctrl+D to enter normal mode)" at which point I enter root password.
Then I get a command prompt:
[root@localhost root]$
where I can type "passwd username" and change my users' password! Yay! :)


Unfortunately after I did that, and rebooted, I couldn't "su" ebcause my root password account was expired. So I had to do the linux single thing again to reset my root password. What a pain.

Thanks.

--A


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