Kali Linux Auto-Login On Raspberry Pi 3
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.
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.
This is how they should look when you are done.
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.
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.
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.