Raspbian Buster: Short user password (or no password at all!)
11/11/2019 (4969x read)
The Raspberry Pi usually comes with a standard password for logging in. However, this should be changed quickly as it is a security risk: Anyone else can log in with the same password. Since mid-2019 Raspbian does not allow short passwords anymore: They must contain at least six letters.
If you still want a shorter password (or no password at all), you can use a trick to set it up: To do this, you don’t change it directly your your own user, usually Pi: instead, you assign it with super-user rights. This not only makes it possible to enter a short password, you can also delete the password. The user can then log in automatically and without password.
Raspberry Pi: Set short password
With the command „sudo“ before the actual command you get root rights: So you have much more possibilities than the Pi user usually has. It is also possible to assign a password to another user – or to yourself: Raspbian then also accepts shorter passwords:
sudo passwd pi
Now the Raspberry asks for the new password, which you have to confirm again: So you can give the Pi user a short password.
Raspberry Pi: No password at all
If the user Pi (or another user) should not have a password at all, you can delete it as a super-user or with „sudo“: The user then no longer needs a password to log in to the Raspberry Pi. Like a very short password, however, this is a security risk: You should only set it for computers that are not used by others or can be reached from the Internet.
sudo passwd pi -d
With this command you delete the password for the user Pi: After that you don’t need to enter it anymore to log in to Raspberry Pi.