1

I originally set up my Raspberry Pi to start up without requiring a login username and password, but some friends (still friends in spite of it all) did something so that it now requires a login. Unfortunately I did not make a note of whatever the username and password were, and trying all the obvious ones doesn't work. I have read of safe mode, and now have a command line after shorting pins 5 and 6. What I need to know now is to find out what usernames are available, or stored, and then I can set a password. Please can someone tell me how?

Alternatively, is there a way, at this safe mode command line, to set it back to the state where no login is needed?

1
  • The superuser (root) can set the passwords for other users. If you look at /home there will be a directory for each created user. This is more of a general Unix/Linux question and is not specific to the Raspberry Pi.
    – joan
    Oct 14 '15 at 22:10
2

cut -d: -f1 /etc/passwd will list all users.


To Change Password

sudo su [USER] and then you could use raspi-config to change the password, as it does not require the current password to be entered.

1
  • Another possibility to do this en masse for a number of users, if you have root access or can edit /etc/passwd with sudo, is to just remove the x in the second field so you are left with, e.g., pi::1001 instead of pi:x:1001. This leaves that user with no password; when asked, just hit enter. You can then set a password with passwd. The autologin stuff can be configured via raspi-config (see the choices under "Boot Options").
    – goldilocks
    Oct 15 '15 at 0:21

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.