View Full Version : No password, stuck at boot logo

4th October 2017, 03:42 PM
Hey guys,

A customer brought in a laptop from a employee that was fired to get it checked for viruses. Turns out the laptop has Fedora 25. No one knew what the password was to log in.
So long story short I attempted to change the password by pressing "e" when at boot menu and adding
rw init=/bin/bash to the line that ended in UTP=8. Username at login was "Admin", however:
sudo passwd Admin turned up with Username invalid. So, I tried the same for root, and it allowed me to change it. But, when I tired signing in as root it said password invalid.
Lastly, I tried creating a user
useradd John then
passwd John it sent me through the usual prompts. But after
sudo reboot -f it gets stuck at boot logo. If I press escape. This is what I get. See image "FailedServices".
And, if I boot into single user mode I get this. See image "SingleUser"

Can anyone help me out? Please let me know if you need anymore information and how to get it.'

UPDATE: Just tried to boot into emergency mode, same as single user mode. It will not boot into emergency mode. What would be causing this?

4th October 2017, 05:14 PM

Does that help? There may have been a relabel command that you overlooked. (Haven't had to do this myself in a long time, so not sure if it is necessary or not.

4th October 2017, 05:24 PM
I'll try that but I need to get it to boot at the very least before worrying about the password again. I appreciate you taking your time to help me.
Is there anyway to restore linux from a livecd?

4th October 2017, 10:09 PM
You might be able to boot from a live cd, then mount the / partition somewhere and try to make your changes there.

https://fedoraproject.org/wiki/How_to_reset_a_root_password#Reset_Password_Using_ a_Fedora_CD.2FDVD

I see the other link I gave was outdated, sorry about that.

4th October 2017, 10:53 PM
I had a not dissimilar job about 18 months ago (CentOS related) and ended up removing the HDD to a USB caddy to recover the data from /home (and more importantly a precious mysql db) then wiping the HDD and reinstalling.

Quicker than trying to hack the password or reassemble a mangled / :D

5th October 2017, 06:22 AM
If the machine HDD is encrypted, then fuhgeddaboudit. You can re-install, but you cannot get the data off it.

If it is not encrypted, then you can boot with install media (any Linux version) and fix it, or copy the data off it to other media.

5th October 2017, 08:18 AM
If it is not encrypted, then you can boot with install media (any Linux version) and fix it, or copy the data off it to other media.

Yup encryption would indeed throw a whole new box of frogs into the mix

5th October 2017, 11:22 AM
A customer brought in a laptop from a employee that was fired to get it checked for viruses.

Nowhere do you mention that the customer wants the data that was on the laptop, if all they want is to make sure its safe to give to another employee then just wipe/reinstall.

5th October 2017, 11:32 AM
And if it has Fedora on it the virii if there are any are more likely to be in the data ;)

5th October 2017, 03:08 PM
I really appreciate all the responses.

Honestly, I'm not sure if the customer is aware what Fedora is. She didn't acknowledge it when we spoke.

Also, I'm not sure how much is actually on the hard drive. This is the results of "df -h"
(Filesystem; Size; Used; Avail; Use%; Mounted on):
devtmpfs; 3.9G; 0 ; 3.9G; 0%; /dev
tmpfs; 3.9G; 4.0k; 3.9G; 1%; /dev/shm
tmpfs; 3.9G; 0.1M; 3.9G; 1%; /run
tmpfs; 3.9G; 0; 3.9G; 0%; /sys/fs/cgroup
/dev/mapper/fedora-root; 50GB; 4.2G; 43G; 9%; /

**The drive is 1TB**

When I open the /etc/passwd. I can see the account "Admin" located at /home/admin
and I can see the account I made "John" located at /home/John

I can navigate to /home/John but when I try cd /home/admin I get no such file or directory found.

I accessed these by pressing e on the version at boot and then adding rw init=/bin/bash seems to be the only way into the system, at the moment. Would this contribute to the weird results from df -h?

Is that proof that it is indeed encrypted?

6th October 2017, 06:46 AM
/home/admin would still have to be linked in to the filesysten tree. If it is not there the guy probably removed it before ( or just after ) being fired.

If he's suss enough to install Fedora he is probably smart enough to have seen this coming and done some house cleaning before being pushed out of the door.

Nothing "weird" about df , just that only 50 GB was partitioned and loaded by Fedora. My Fedora root is less than that.

Maybe you want to explore what is on the rest of that TB disk ;)

6th October 2017, 01:34 PM
Thank you for taking your time to reply.
I'm sorry but I'm not that familiar with Linux. How would I load the rest of the HD to see what else is on it?

6th October 2017, 01:58 PM
If you are not familiar with linux you are probably not well placed to server your customer.

As far as the rest of the disk goes, that is probably not a linux question. Just use the tools of whatever system you are familiar with.