1

I've tried everything listed in the "How do I reset a lost administrative password" thread and still have had no success. Are there any other techniques to try with Ubuntu 15.10?

I've put the Ubuntu install disk (is that the same as an Ubuntu Live disk?) in and tried to repair it, but it just says there is no operating system installed. Is there another way to repair it?

I can log in as Guest (like now) and have access to everything without the Ubuntu DVD in, so it's still there, just that nothing gets back the password- even the relatively dangerous technique of deleting the password with pico.

Also tried this.

Any help?

user483118
  • 11
  • 5
  • What happens exactly with the grub method? did you manage to successfully enter the password or did you get some error? – Julen Larrucea Feb 29 '16 at 21:01
  • @Julen-Larrucea: Grub gets me to a terminal, and I have been able to "change" the password successfully; however, I get the same error when I try to log in- that the password isn't valid. I've done this half a dozen times with half a dozen password changes, and none seem to "take". I've also done the "superuser" edit (nano -B /etc/shadow) with deleting the password; no dice. When it looked like "username::14920:0:99999:7:::" the screen just... blinked... and started over. When I put an asterisk in there (username:*:)like other lines, it didn't work. – user483118 Feb 29 '16 at 22:08
  • @mchid: yes, I have tried literally everything in the "How do I reset a lost administrative password" thread, as above, including remounting multiple times and multiple attempts to change the password. – user483118 Mar 01 '16 at 16:12
  • How about you just create a new administrative user and delete the offending account from the root prompt after you remount the partition of course. – mchid Mar 01 '16 at 19:15
  • I tried resetting the password using the Ubuntu Live DVD, using these instructions. The 'sudo mount /dev/sda1 /mnt -o rw' command works, but when I type 'sudo chroot /mnt' I get the error "chroot: failed to run command '/bin/bash': No such file or directory' I get a little lost because I'm not good at Ubuntu, but the command ls -di / returns '189,' and I should get '2' because... I have no chroot? I don't understand what to try next. – user483118 Mar 01 '16 at 19:21
  • @mchid - I have been unable to enter the user account in that fashion- it says the password is incorrect. When I try to create a new user (adduser sudo) it says "adduser: Only root may add a user or group to the system" (using a terminal on a Live CD). No driver updates or downloads. This all started after I tried to put the hard drive into a new laptop; no changes made, but I put it back in the old laptop because of a bad keyboard. – user483118 Mar 01 '16 at 19:28
  • @mchid - Already tried the root shell prompt thing half a dozen times or more. No dice. It's like the password isn't "sticking." And when I edit the 'shadow' file using nano, I can delete the password, and it still doesn't let me log in. Then, when I go to the root shell and put in ANOTHER password, the string in the password line has changed. But the new password still doesn't work. Done that 2-3 times each way. – user483118 Mar 01 '16 at 19:33

1 Answers1

1

From the grub menu, select advanced options and then select recovery mode.

Then, select **"root Drop to root shell prompt. **

Now, run the following command:

mount -rw -o remount /

Next, create a new user using the following command:

adduser newusername

Finally, add the newuser to the sudoers group:

adduser newusername sudo

Now you should be able to log in as newusername and you will have sudo permission and everything.

If you want to, transfer all your personal files from your old user account to the new one and then delete the old user account using the sudo deluser command.

mchid
  • 43,546
  • 8
  • 97
  • 150
  • THANK YOU. I can't upvote you because I don't have 15 points, so my apologies. Now I can 'see' my old user account, but when I attempt to access it I am told "You do not have the permissions necessary to view the contents of 'username.'" When I attempt to change the permissions with 'sudo chmod -R ug+rw ' I am still unable to access the folder. – user483118 Mar 01 '16 at 20:06
  • @user483118 Awesome. Run gksudo nautilus to open nautilus with root permission. That should give you access. – mchid Mar 01 '16 at 20:08
  • @user483118 Alternatively, you can gain ownership of the files using the following command: sudo chown -r $USER:$USER /home/<olduername> where "" is the user name from the old account. – mchid Mar 01 '16 at 20:10
  • @user483118 Or, if you only have these two user accounts, you could run this: sudo chown -R $USER:$USER /home/*. If you feel like using chmod, you could use sudo chmod -R 644 /home/<username> where, again, replace with the old user name of course. – mchid Mar 01 '16 at 20:16
  • @user483118 Finally, if this worked, you don't need to upvote. Just click the icon to the left to mark this as the accepted answer to your problem. – mchid Mar 01 '16 at 20:17
  • Ugh. Well, it worked, but when I rebooted and tried to enter my password, it did the blank screen thing. I enter the correct password, and the screen flickers a few times, and goes back into the login screen. When I enter the wrong password, it tells me so, but I don't get that message with the correct password- just the mini-seizure and back to the login screen. I think reinstalling is the only way to fix this. I've wasted two days trying to repair this in order to get four files that just aren't worth it. – user483118 Mar 01 '16 at 21:45
  • @user483118 Okay then, this is clearly not a password problem then. This is a problem with your graphics drivers and/or configuration. What type of GPU CPU does the laptop have? – mchid Mar 02 '16 at 05:18
  • Intel Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller rev. 03. – user483118 Mar 02 '16 at 16:28