0

My initial problem was that my computer wouldn't let me login to my account. It seems to shut down after I enter my password. I can login as a guest.

I found fixes but I can't remember / figure out my login for access after I hit Ctrl+Alt+F1 and most of the fixes for finding your login username depend on you having access to your account.

I thought the login was the name which appears on the screen when I start the computer normally, but this has not worked, is there another way to find out my username while being effectively locked out of my root-user profile?

I am also assuming that the password is the same one I always use.

Conversely, if the name which appears on the screen at startup and my normal password should have worked, is there another explanation for why I am not able to login on the black command screen.

4

All the users in the system are listed into the /etc/passwd file:

cut -d ':' -f 1 /etc/passwd | less

Since UIDs by default range from 1000 to 60000, you may narrow down the list using this:

grep '[^:]*:[^:]*:\([1-9]\|[1-6][0-9]\)[0-9][0-9][0-9]' /etc/passwd | cut -d ':' -f 1 | less

However by default the user created during the installation process has UID 1000, so if that's the user you're looking for you may simply run this without going through any list:

grep '[^:]*:[^:]*:1000' /etc/passwd | cut -d ':' -f 1
  • Thanks kos, but my problem is that I can only login as a guest because of the initial glitch so I don't have permission to run the /etc/passwd command. – Kermit C. Playfoot Sep 1 '15 at 14:11
  • 1
    @KermitC.Playfoot /etc/passwd is 0644, so any user is able to read it: just run one of these in a terminal in your guest session – kos Sep 1 '15 at 14:14
  • But when I type /etc/passwd into the guest terminal screen it says "permission denied" what am I missing? I was traveling yesterday and wants able to try this again and reply sooner. – Kermit C. Playfoot Sep 3 '15 at 16:17
  • @KermitC.Playfoot You don't have to type /etc/passwd. Who stated you have to type /etc/passwd? If you type /etc/passwd bash interprets the command as you're trying to execute /etc/passwd, which you can't (hence the "permission denied" message). Use one of the commands I listed above: start with the third one, which should directly output the username you're looking for. If it doesn't, try the second one or the first one and just go through the list until you find it. – kos Sep 3 '15 at 16:34
  • Found it. The first one I tried worked (meaning the third one) As is probably evident I have little to no experience with the conventions of code / using the terminal function. thanks so much! – Kermit C. Playfoot Sep 4 '15 at 6:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.