In this article, you will find a detailed guide for removing the password from Raspberry Pi system login to removing the password for VNC access.
This guide will cover:
- How to Remove Password from Raspberry Pi System Login
- How to Remove Password from Raspberry Pi Using passwd Command
- How to Remove Password from Raspberry Pi SSH Login
- How to Remove Password from Raspberry Pi in sudo Command
- How to Remove Password from Raspberry Pi VNC Access
- Conclusion
How to Remove Password from Raspberry Pi Login
By default, Raspberry Pi has disabled the password login, allowing you to auto-login the system without entering the username or password. However, if you have accidentally disabled the auto-login option, you have to provide username and password to enter the system.
If you want to remove the password option from Raspberry Pi login page, you can follow the below-given steps:
Step 1: First, access Raspberry Pi terminal and use the following command to open Raspberry Pi configuration:
Step 2: Navigate to “System Options” on the Raspberry Pi configuration menu:
Step 3: Go to “Boot/Auto Login” option:
Step 4: In the Boot/Auto Login menu, choose Console Autologin if you want to access Raspberry Pi terminal without password. While, if you want to access Raspberry Pi desktop without password, you can simply choose the Desktop Autologin option:
Note: To make the changes, you must reboot Raspberry Pi device using the reboot command.
You can also enable auto-login on Raspberry Pi from GUI as well using the following steps:
Step 1: Navigate to the Raspberry Pi system menu, go to Preferences and select the Raspberry Pi Configuration option to open it:
Step 2: Turn on the toggle button for Auto login to right to enable it on your Raspberry Pi system:
How to Remove Password from Raspberry Pi Using passwd Command
Besides removing the password from Raspberry Pi system login, you can also remove it from the following command:
Note: You must specify the username so that the above command will remove the password for that specific user on Raspberry Pi.
How to Remove Password from Raspberry Pi SSH Login
By default, Raspberry Pi requires a password if you want to access the system from a remote location using another computer. However, if you regularly access your device remotely, you can remove the password for SSH login. This requires you creating SSH keys on the Raspberry Pi system and transferring it to the computer through which you are accessing the Raspberry Pi device. A complete guide to enable password less SSH login can be found here. This method is useful since it will secure your system from unauthorized login. Only those users will be able to access your Raspberry Pi device that does have an SSH key file.
How to Remove Password from Raspberry Pi in sudo Command
By default, Raspberry Pi does not require a password if you type command with the sudo mode. This is done for ease since only those are able to type commands without password that have access to Raspberry Pi system. However, if you have accidentally enabled the password for sudo command, you can remove it by using the following steps:
Step 1: Open Sudoers File
The sudoers file in Raspberry Pi system is used to allocate system rights to the users. You can only edit this file if you login in it as a root user. To login Raspberry Pi terminal as a root user, use the following command:
Step 2: Edit Sudoers File
Then open the sudoers file in nano editor using the following command:
You may find a line “pi ALL=(ALL) PASSWD: ALL” inside the file. This line could be set by you accidentally or by someone who does have access to your system. With the presence of this line, all users who are login to Raspberry Pi system as a pi user will have to enter the password every time whenever they want to execute commands.
You can edit this file by simply removing this line from the file or replacing the PASSWD with NOPASSWD, and save the file using CTRL+X, add Y and press Enter. This will remove the password from your Raspberry Pi system and you can freely execute the commands with sudo without typing the password.
Note: The above method is useful if you have set the password accidentally.
How to Remove Password from Raspberry Pi VNC Access
VNC is a widely used software that allows you to remotely access the Raspberry Pi device. By default, it uses the password that could be the default username password or the password you set on your own (UNIX password) after creating an account on VNC.
To remove password from VNC on Raspberry Pi, follow these steps:
Step 1: Open VNC Connect on Raspberry Pi from desktop, navigate to hamburger button (three horizontal lines), then choose Options:
Step 2: Now, navigate to Expert section, type Authentication in the filter box:
Step 3: Change the value from InteractiveSystemAuth to None:
After replacing the value, save it using the OK button:
This will remove the password from VNC access on Raspberry Pi either it is UNIX password or VNC password.
Note: The method presented above is not recommended since it will compromise your Raspberry Pi security. However, if you still want to remove the password for ease, you can do it at your own risk.
Conclusion
A password less Raspberry Pi system may not be an ideal choice since it can compromise the device security. However, it can save time typing the password again and again for different activities. This guide has covered the necessary steps needed to remove password from Raspberry Pi system. We have covered removing the password for system login, passwd command, SSH login, sudo command and VNC access. Doing these methods will ensure a password less Raspberry Pi system and can help you in case you forget your Raspberry Pi password.