LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 12-14-2014, 01:15 PM   #1
freethemushrooms
Member
 
Registered: May 2014
Posts: 30

Rep: Reputation: Disabled
UBUNTU: help with password reset


Hi, my kids have been using my old ubuntu laptop for games, and the "N" key stopped working, God knows why - kids. So when I tried to change the password to something without an "N" the computer got stuck at that screen. And when I tried again to change the password, it wouldn't let me. And so I tried the "new" password and that wouldn't work either. Is there a way I can use the terminal to change the password without knowing the password? Or a way to find out at least what the password is? Now my kids are bummed cause they can't download games. Help?
 
Old 12-14-2014, 01:35 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2beta3 on Lenovo Thinkpad W520
Posts: 6,785

Rep: Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122
In a terminal, to set an new password:
Code:
sudo passwd <kids username>
To know more:
Code:
man passwd
 
Old 12-14-2014, 02:43 PM   #3
freethemushrooms
Member
 
Registered: May 2014
Posts: 30

Original Poster
Rep: Reputation: Disabled
i put in sudo passwd, but it just asked me for the password, which i don't know . . . did i do something wrong? what do i do next?
 
Old 12-14-2014, 02:49 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2beta3 on Lenovo Thinkpad W520
Posts: 6,785

Rep: Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122
Le'ts assume the kids login name be just "kids".

Type
Code:
sudo passwd kids
Then when asked type the new password.

Of course, when writing the commands replace "kids" by the actual login name(s).

Last edited by Didier Spaier; 12-14-2014 at 03:30 PM.
 
Old 12-14-2014, 03:05 PM   #5
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 510

Rep: Reputation: 120Reputation: 120
Quote:
i put in sudo passwd, but it just asked me for the password, which i don't know . . .
it asks for new password, not for the old one. So just type new password and confirm it.

If you can't reset password (for some reasons) and you still have an old password unchanged (with "N" letter) you could attach any external USB keyboard and reset password.

Last edited by Teufel; 12-14-2014 at 03:06 PM.
 
Old 12-14-2014, 04:09 PM   #6
freethemushrooms
Member
 
Registered: May 2014
Posts: 30

Original Poster
Rep: Reputation: Disabled
oh, ok. I put in those sideways carrots around the username. I'll try it without them and get back to you, thanks for your patience.
 
Old 12-14-2014, 08:51 PM   #7
freethemushrooms
Member
 
Registered: May 2014
Posts: 30

Original Poster
Rep: Reputation: Disabled
ok. plugged in usb board, did sudo passwd username (my username), typed new password - just keeps saying "Sorry, try again". tried old, new, no go. What now?
 
Old 12-15-2014, 12:29 AM   #8
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 510

Rep: Reputation: 120Reputation: 120
Quote:
Originally Posted by freethemushrooms View Post
ok. plugged in usb board, did sudo passwd username (my username), typed new password - just keeps saying "Sorry, try again". tried old, new, no go. What now?
"sudo passwd username" doesn't ask for old password. Only for confirmation (retype new password).
So, either your new password doesn't match following confirmation, or you tried to change password as regular user (most likely).
Could you copy from terminal and paste here what do you exactly typed and command output?
it should be like this:
Code:
user@localhost ~ $ sudo passwd user
New password: 
Retype new password: 
passwd: password updated successfully

Last edited by Teufel; 12-15-2014 at 12:31 AM.
 
Old 12-15-2014, 12:37 AM   #9
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by Teufel View Post
"sudo passwd username" doesn't ask for old password. Only for confirmation (retype new password).
Indeed, if invoked that way the passwd command would not ask for the old password, but depending on how sudo is configured, sudo may ask for the password of the current user.

Evo2.
 
Old 12-15-2014, 12:50 AM   #10
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 510

Rep: Reputation: 120Reputation: 120
Yes, if he has no NOPASSWD option in sudoers file sudo will ask for user password. As far as I remember, NOPASSWD should be set there.
However if NOPASSWD is not set, password can't be changed with sudo.
This case it might be changed by root directly.
To get real root priveleges (not via sudo) you have to boot into single mode, remount "/" as read-write (by default it will be mounted as read-only) and run:
Code:
# passwd username
 
Old 12-15-2014, 03:38 PM   #11
freethemushrooms
Member
 
Registered: May 2014
Posts: 30

Original Poster
Rep: Reputation: Disabled
Hi, sorry for the delay in responding. I homeschool 5 kids, one's 6 months, and I got caught up in baths and dinner and then passed out.

I can't copy and paste since this is a different computer, but here's exactly what happened:

john@john-Inspiron-1520:~$ sudo passwd john
[sudo] password for john:
Sorry, try again.


more info, the system is 12.04

I did a search online and came up with these:
http://askubuntu.com/questions/37163...admin-password

http://askubuntu.com/questions/55056...login-was-enab

If I do this do I have the potential of really messing up my comp since I obviously have no idea what I'm doing?
Should I just try it anyway?

Last edited by freethemushrooms; 12-15-2014 at 03:55 PM.
 
Old 12-15-2014, 07:10 PM   #12
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

the methods you linked to should in principle work. Please try and post back if you have problems. See also https://wiki.ubuntu.com/RecoveryMode

Cheers,

Evo2.
 
  


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
ubuntu 13.10 - reset root password unclesamcrazy Linux - Newbie 17 06-02-2014 12:52 AM
Can I Use Ubuntu LiveCD to reset my Mac's Password? xmrkite Linux - Software 4 04-13-2011 02:44 PM
lost password in ubuntu 9,04 how do I reset? brojer Linux - Newbie 1 03-21-2010 11:06 AM
how to get username and reset password on Ubuntu Bestwes Ubuntu 1 06-11-2009 10:41 PM
How to reset root password in Ubuntu? concoran Linux - Newbie 7 12-13-2007 04:04 PM


All times are GMT -5. The time now is 10:40 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