So I have this computer Hp pavilion dv5220 and I can't use it it's stuck with one user and I don't have that password all I can use is the guest account and I can basically do nothing as a guest it's on 14.04 software and I can't run and updates or anything without an actual account and I no wifi
-
So, what exactly seems to be the problem? – misha Apr 07 '17 at 00:06
-
1This is strikingly similar to a question asked less than an hour ago: https://askubuntu.com/q/900990/615414 – zondo Apr 07 '17 at 00:06
-
I wanna use it for newer software but I'm stuck on old software and when I try to update it goes into "install now" so I click then it just disappears I can't seem to do anything all I have access to is a guest account and I can't access wifi or internet with the 14.04 software what can I do? – KiddKutz Apr 07 '17 at 00:14
-
Perhaps reinstalling is a good idea. Do your backups you haven't already. – Apr 07 '17 at 00:44
-
It didn't work for me I need to either creat a new user witch I can't or wipe the memory and it's hard I'm operating off of a guest account which is very limited and difficult – KiddKutz Apr 07 '17 at 01:00
-
If I could get internet connection I'd be ok – KiddKutz Apr 07 '17 at 01:00
-
What's your question? – Organic Marble Apr 07 '17 at 01:19
-
You could use a live usb to back up your data(if not encrypted) and reinstall Ubuntu – lamino Apr 07 '17 at 01:22
-
Nothing is working like that I've tried everything at this point I'm looking for a way to wipe my computer clean or add a new user – KiddKutz Apr 07 '17 at 01:23
-
Boot from a live USB, do your backups if needed, then install: http://askubuntu.com/questions/6328/how-do-i-install-ubuntu . There's no point trying to work from an OS for which you have no admin rights because you don't know the password. You can try to reset the password: http://askubuntu.com/questions/24006/how-do-i-reset-a-lost-administrative-password but I'm afraid it's more involved than reinstalling. Now please understand your options, decide what to do and then do it. If any problem either update or ask a new question. – Apr 07 '17 at 02:23
1 Answers
Assuming you didn't encrypt your home directory...
You should be able to
- boot from a live ubuntu CD/USB (with architecture matching your local install)
- mount your local HD installation in /mnt
- chroot to /mnt (this will give you a root shell)
- perform password reset with the passwd command.
If your user directory is encrypted, this will not work!
Here's what this looks like for me
After booting into the LiveOS, I open a terminal and issue the following commands
sudo mount /dev/sda1 /mnt
# mount the root partition on /mnt; yours may or may not be /dev/sda1sudo chroot /mnt
# if this command fails, you mounted the wrong partition in the last steppasswd $username
# where$username
is the account that needs the password reset
Enter a new password when prompted and confirm. Then you should be able to reboot and log in with the new password.
Some free unsolicited security advice
For anyone wondering how to protect himself/herself against others who might use my answer for harm, I feel it imperative that I also provide some security advice.
Encrypt your entire install (FDE) or at the very least, encrypt your home directory. FDE (full-disk encryption) will prevent access to the file where password hashes are stored. On a system using FDE, the steps I provide above would not work!
Home directory encryption will not prevent password changes using this approach, but even if someone were to change your password, they still would not be able to log into your account because the password used to encrypt your home directory would remain unchanged. It would be a pain though because you'd have to change your login password back to match your encryption password.

- 4,660
- 4
- 25
- 46