LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Change user password in ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/change-user-password-in-ubuntu-819714/)

digsecurity 07-13-2010 11:53 PM

Change user password in ubuntu
 
hi all,
I have a netbook with ubuntu installed. I lost the user password, so tried to change it in single user mode.

The problem is when I try to change the password with command (passwd user), it says the following error:

Quote:

passwd: Authentication service cannot retrieve authentication info
passwd: password unchanged
Please help what's the problem. Is there anything I am missing..

Mr. Alex 07-14-2010 02:33 AM

Log in.
Type "passwd".
Enter new password, confirm.

Wim Sturkenboom 07-14-2010 02:56 AM

Quote:

Originally Posted by Mr. Alex (Post 4032617)
Log in.
Type "passwd".
Enter new password, confirm.

Difficult if you don't know the password :)

tredegar 07-14-2010 05:49 AM

I just tried this, and the following worked for me:

From the grub boot menu, select "recovery mode"
Then select "Drop to root shell"

You are root (the prompt is '#' )
passwd username
Give the new password, twice.
reboot

falconite 07-14-2010 02:30 PM

Quote:

Originally Posted by Mr. Alex (Post 4032617)
Log in.
Type "passwd".
Enter new password, confirm.

Alex is right. Not sure, how passwd username works in rescue mode

Wim Sturkenboom 07-14-2010 11:55 PM

Quote:

Originally Posted by falconite (Post 4033132)
Alex is right. Not sure, how passwd username works in rescue mode

Please explain to me how one can login if one does not know the password. What am I missing :confused:

Mr. Alex 07-15-2010 12:17 AM

Wim does have a point. :)

http://www.linuxforums.org/forum/lin...-password.html

http://www.linuxquestions.org/questi...ssword-449024/

jay73 07-15-2010 01:34 AM

The old trick: at the grub prompt select "Edit", add single to the kernel line, press boot, change password, reboot.

digsecurity 07-15-2010 03:32 AM

In grub kernel line 'init=/bin/bash' was what I added at last, which let me to log in with root without password.

But, 'passwd username' or 'passwd' never worked for me. Same error I mentioned above.

falconite 07-15-2010 05:30 AM

Quote:

Originally Posted by Wim Sturkenboom (Post 4033525)
Please explain to me how one can login if one does not know the password. What am I missing :confused:

Wim / Alex, what I meant was, when you go to the single user mode, then you just have to enter 'passwd', and not 'passwd username'. When you enter 'passwd', then it will ask for you to confirm this passwd again. And you need to reboot to reflect this change.

Wim Sturkenboom 07-15-2010 10:48 AM

@falconite
I might be mistaken but in single user mode one is root and running passwd without username will therefore change the root password.


All times are GMT -5. The time now is 08:24 PM.