I was doing some browsing online about Kali Linux on the Raspberry Pi 3 and how to get it to allow SSH after a reboot. Right now, I have to connect a USB dongle to the device locally and type the username and password to login to Kali Linux . Once logged in it will connect to Wi-Fi and I can SSH in.

The reason is, Kali Linux doesn’t start Wi-Fi services until a user has logged in. So, we need to enable a user to login automatically upon boot to ensure that Wi-Fi will be enabled, connect to our access point and we can then SSH to the machine.

Enable auto-login for user root.

The user root is used by default with Kali Linux but we could technically use any user that we have added to our instillation for this step. We will be editing lightdm.conf found at /etc/lightdm/lightdm.conf.

nano /etc/lightdm/lightdm.conf

Locate the section in lightdm.conf labeled [Seat:*] and then #autologin-user= and #autologin-user-timeout=0 within it. We will be removing the comments and adding the user root. There is two sections that look similar so make sure that you are working with the right lines.

autologin-user=root
autologin-user-timeout=0

This is how they should look when you are done.

kaliautologin

Update: 8/12/17 – In a recent release something changes and you have to change an additional file.

Next navigate here and you will need to comment out a line in lightdm-autologin.

nano /etc/pam.d/lightdm-autologin

Locate the following line and comment it out with a #.

auth     required pam_succeed_if.so user != root quiet_success

To look like this:

#auth     required pam_succeed_if.so user != root quiet_success

Now you  just need to reboot and user root will login automatically.

reboot

Conclusion

I like this setup because I do a lot of my configurations via SSH. Having my Kali Linux instillation auto-login on my Raspberry Pi 3’s Wi-Fi makes it easier for me.

You can easily create a different user and use it for the auto-login or reverse this configuration in the future.

Let me know if you have any questions in the comments section below.

8 thoughts on “Kali Linux Auto-Login On Raspberry Pi 3

    • Thank you for bringing this to my attention. I think a recent release changed the way auto login worked. I’ve updated the guide if you are still looking for this info.

    • Hi Lerner,

      I just went through the process again on a fresh install of Kali linux on my RPI3 and it looks like it’s working for me.

      I’ve read a few posts about the lock screen still showing and usually they added or adjusted the wrong section in lightdm.conf. You can test if it was setup properly by trying to SSH to the RPI3 once it boots up. If you can SSH then it was setup properly and if you cant, it needs to be fixed.

      If you can SSH then you need to double check the lightdm-autologin file.

      Can you also share the version of kali that you installed? Incase I’m using a different version?

    • Lastly, the lines you need to update in lightdm.conf are in the section under [Seat:*]. There are other sections that say Seat but the specific ones you are looking for are under [Seat:*] and will be read differently than the other sections.

Leave comment

Your email address will not be published. Required fields are marked with *.