Disable Auto-login in Raspberry Pi OS

0

This guide explains how to disable auto-login on Raspberry Pi OS. By default when you install the Raspberry Pi OS with the desktop it will auto-login when you power-up the Pi. This is really convenient for lots of projects as it gets you straight to the desktop. If you are using your Pi as a desktop computer this starts to become more of a security/privacy risk.

If someone breaks into my house and steals my Pi 400 they could power it up elsewhere and potentially run my browser full of saved passwords and bookmarks. Or gain access to any files I had been working on. Hobby projects are of no interest to a thief but personal files, bookmarks, save passwords etc are a bit more of a problem.

So I decided it would be best to disable auto-login and require a password when it was booted up. I only re-boot the Pi 400 every other week so this wasn’t going to be a major inconvenience. That way if someone stole it they would at least be faced with a password.

Before proceeding please check that you remember the password to your Pi. Consider changing it now to something sensible and definitely change it if it is still set to the default of “raspberry”.

Security 101

If you need to change your password then take a look at the How to Change the Raspberry Pi Password guide.

To disable auto-login follow these steps:

Step 1: Run Raspberry Pi Configuration from the main menu

  • Clicking on the Raspberry Pi logo in the top-left hand side of the screen will bring up the main menu.
  • Select “Preferences”.
  • Select “Raspberry Pi Configuration”.
Raspberry Pi Configuration menu option

Step 2: Disable Auto-login

Under the “System” tab set “Auto Login” to “Disabled”.

Click “OK”.

Raspberry Pi Configuration "System" options

Step 3: Reboot Pi for changes to take effect

Finally you’ll need to reboot the Pi for the changes to take effect.

You can do this by:

  • Clicking on the Raspberry Pi logo in the top-left hand side of the screen will bring up the main menu.
  • Select “Shutdown”.
  • Select “Shutdown” or “Restart”.

If you selected “Shutdown” you will need to re-apply power to the Pi to reboot.

You should now be presented with the username/password login box.

If you want to re-enable auto-login you can run the Raspberry Pi Configuration utility and set “Auto Login” to “As current user”.

Share.

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.