in root shell, password changed successfully but still not accepting at login

Asked by sangharsh

i changed the password in root shell. (with : passwd : and also with : mount -rw -o remount / : command) but now when i start adminstrater account n try to log in with changed passwd. it doesnt works. it says that still its not authentic!!
pl help

Question information

English Edit question
Ubuntu shadow Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :

Hi ,
try to reset your password through "recovery mode"

see here how :


Revision history for this message
sangharsh (sangharshbyss) said :

i did that. its not working.
thanks for reply. pl help me furthur.

Revision history for this message
actionparsnip (andrew-woodhead666) said :

If you make a new user, can you log in as that?

Revision history for this message
sangharsh (sangharshbyss) said :

k will chk n tell u

Revision history for this message
sangharsh (sangharshbyss) said :

i can not. it ask d passwd of admin. n so cannt log in

Revision history for this message
actionparsnip (andrew-woodhead666) said :

you use the password of the account you made. When you use sudo and set the password too, you will not get any feedback on the screen.

Revision history for this message
sangharsh (sangharshbyss) said :

actionparsnip, sory but m not gettin u.
i changed d passwd through root shell (recovery mode), it was successfull. but as i entered new passwd for login it failed. as u asked, i tried to open new ac. but that too ask for passwd of admin ac. n after typein newly set passwd even their, it doesnt accept. pl help furthur.

Revision history for this message
Warren Hill (warren-hill) said :

1. When you boot your computer, does it ask for a password and if so does it work.

2. If you can get it either because it does not want a password or because the password is accepted
open a terminal (CTRL+ALT+T) and enter the following commands.

lsb_release -a; uname -a; id

Copy and paste all results back here.

3. Try to change your password again following the instructions here

Note passwords are case sensitive so make a mental note of if caps lock is on or not.

Does this appear to work, if not what error messages do you get.

4. If it does not give any errors reboot and login again. Can you?

5, If you can then open a terminal (CTRL+ALT+T) and enter the following command

sudo fdisk -l

When asked for your password enter it and press enter. There is no feedback when you enter your password not even * but it should be accepted. Do you get any error message?

Sorry for asking such simple questions but its important for us to understand where this is going wrong.

Revision history for this message
sangharsh (sangharshbyss) said :

Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
uid=1000(janarth) gid=1000(janarth) groups=1000(janarth),4(adm),20(dialout),24(cdrom),46(plugdev),109(nopasswdlogin),116(lpadmin),118(admin),124(sambashare)

Revision history for this message
sangharsh (sangharshbyss) said :

thank you very much for such detailed information.
1. yes, at the time of reboot, it asks for the passwd and newly set passwd works well here
2. in terminal after running a command given by you, above was the output.

Revision history for this message
Gary (gary+ubuntu) said :

One trick I do after setting a password is log in safely using a shell. If I mess up too much I can lock myself out (has happened) so now, after changing passwords (or some shell stuff) I use"ssh -l my_userID localhost". That should come back with a prompt for the password. Type what you think you set it for and if there is success then you will be able to log in using that account/password. If the SSH fails, something went wrong.

Worst case (very drastic) is to remove the password field completely in the /etc/shadow file. This requires root (recovery should work fine) and you remove the text between the second and third colon ":" characters. This is VERY RISKY and you should feel comfortable with what you do and know how much you can mess things up if you make a mistake. You might want to copy the line and change the first field (user name) until you figure out what is happening and then put back the original line. Also, the second field will change as a result of a successful passwd command (if the password is different).

Revision history for this message
Warren Hill (warren-hill) said :

You still do not appear to be part of the sudo group

Go back into a recovery shell (as if you were resetting the password).

Make the file system read write with

mount -o rw,remount /

Now Enter the following commamd

usermod -a -G sudo janarth; id

This should now you are a member of sudo i.e.

uid=1000(janarth) gid=1000(janarth) groups=1000(janarth),4(adm),20(dialout),24(cdrom),27(sudo), 46(plugdev),109(nopasswdlogin),116(lpadmin),118(admin),124(sambashare)

If not let us know what error you get. If it works it should be fixed reboot to test

Can you help with this problem?

Provide an answer of your own, or ask sangharsh for more information if necessary.

To post a message you must log in.