LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-14-2010, 12:53 AM   #1
digsecurity
Member
 
Registered: Apr 2010
Posts: 54

Rep: Reputation: 18
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..
 
Old 07-14-2010, 03:33 AM   #2
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Log in.
Type "passwd".
Enter new password, confirm.
 
Old 07-14-2010, 03:56 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by Mr. Alex View Post
Log in.
Type "passwd".
Enter new password, confirm.
Difficult if you don't know the password
 
Old 07-14-2010, 06:49 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
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
 
Old 07-14-2010, 03:30 PM   #5
falconite
Member
 
Registered: Jul 2010
Posts: 39
Blog Entries: 1

Rep: Reputation: 16
Quote:
Originally Posted by Mr. Alex View Post
Log in.
Type "passwd".
Enter new password, confirm.
Alex is right. Not sure, how passwd username works in rescue mode
 
Old 07-15-2010, 12:55 AM   #6
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by falconite View Post
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
 
Old 07-15-2010, 01:17 AM   #7
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Wim does have a point.

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

http://www.linuxquestions.org/questi...ssword-449024/
 
Old 07-15-2010, 02:34 AM   #8
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
The old trick: at the grub prompt select "Edit", add single to the kernel line, press boot, change password, reboot.
 
Old 07-15-2010, 04:32 AM   #9
digsecurity
Member
 
Registered: Apr 2010
Posts: 54

Original Poster
Rep: Reputation: 18
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.
 
Old 07-15-2010, 06:30 AM   #10
falconite
Member
 
Registered: Jul 2010
Posts: 39
Blog Entries: 1

Rep: Reputation: 16
Quote:
Originally Posted by Wim Sturkenboom View Post
Please explain to me how one can login if one does not know the password. What am I missing
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.
 
Old 07-15-2010, 11:48 AM   #11
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Create user add file with default password and force user to change it? Morgandy Linux - Newbie 3 02-02-2010 06:06 PM
Locking out a user when password expires, but allowing them to change their password kaplan71 Linux - Security 5 06-27-2008 08:12 PM
How to Change Password of Domain User on Ubuntu Box darknight1726 Linux - Newbie 2 06-11-2008 04:38 AM
samba(global security=user) useful tools for client.ex: user change password. hocheetiong Linux - Newbie 1 03-18-2008 10:20 AM
what is the command to make a user change their password after creating a new user? naweenio Linux - Newbie 7 01-05-2005 08:07 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration