LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   UBUNTU: help with password reset (https://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-help-with-password-reset-4175528251/)

freethemushrooms 12-14-2014 12:15 PM

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?

Didier Spaier 12-14-2014 12:35 PM

In a terminal, to set an new password:
Code:

sudo passwd <kids username>
To know more:
Code:

man passwd

freethemushrooms 12-14-2014 01:43 PM

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?

Didier Spaier 12-14-2014 01:49 PM

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).

Teufel 12-14-2014 02:05 PM

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.

freethemushrooms 12-14-2014 03:09 PM

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.

freethemushrooms 12-14-2014 07:51 PM

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?

Teufel 12-14-2014 11:29 PM

Quote:

Originally Posted by freethemushrooms (Post 5284705)
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


evo2 12-14-2014 11:37 PM

Hi,
Quote:

Originally Posted by Teufel (Post 5284784)
"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.

Teufel 12-14-2014 11:50 PM

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

freethemushrooms 12-15-2014 02:38 PM

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?

evo2 12-15-2014 06:10 PM

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.


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