1

I have a dual boot, win 7 and the latest lts 12.xx. I tried logging into my regular account but it keeps refusing to open. There is no message saying anything was incorrect, but that message still comes up if I type in gibberish as a password.

I initially thought that changing password would help, even though I could access my files by using the correct one in shell through recovery mode. So I did change using 'passwd'. But the result is the same. I cannot open my desktop, just shell which I dont know too much about when it comes to transferring files between partitions

SIDE NOTE: I made a guest account for people to use when I am not around without a password. But decided to put in a simple password later through the 'users'(i think thats the name) program in the settings menu. But the changes did not take place and I am still unable to add the password even though everything runs fine while adding and adjusting priveleges. Maybe the two things are related???

1 Answers1

0

Go back to recovery mode, and choose to drop to root shell.

# cat /etc/passwd

you should see a return like this:

root@TOSHIBA:~# cat /etc/passwd

root:x:0:0:root:/root:/bin/bash

if you get that x after root, then shadow file contains the root password.

do:

# nano /etc/shadow

scroll to your user account, and remove everything between the first set of ":"

change this:

denis:$6$9eL.6v0I$Ze6X0970H/DC5vlH/9tOMWtSoHpqHXzbUX1v7Z.Nozf/p5SriiRU12WPzBsGJ4SsxRhl.6uSHdcbtAAnWCTyb0:15680:0:99999:7:::

to this:

denis::15680:0:99999:7:::

Hit CTRL + O to save

and

Hit CTRL + X to exit

Reboot.

den4uk
  • 432
  • I do see an X in front of root, but the lines in nano looks like- username:x:1000:1000:username,,,:/home/username:/bin/hash - this is the only line with the username, so should it look like it does? And how should I modify it? Thanks a lot! – user117693 Dec 31 '12 at 01:15
  • Sorry, made a mistake. Second command is "sudo nano /etc/shadow" – den4uk Jan 05 '13 at 10:17
  • This did not work for me. The effect of deleting the long string after the username (denis in the example) in /etc/shadow is that the user gets logged in without having a password asked. Like a guest user. I think this is undesirable in most cases. – XavierStuvw Sep 02 '16 at 18:50