Normally it isn’t very secure to disable the login feature in operating systems but it can become rather handy depending on the device you’re using, what the purpose of that device is, and how that device will be used. If you just happen to be using a Raspberry Pi with Kali Linux installed then we will show you how to enable Raspberry Pi 3 Kali Linux auto login feature.
Enabling the Raspberry Pi 3 Kali Linux auto login feature is a different process depending on what version of Kali Linux you have installed. This tutorial assumes that you downloaded the Kali Linux ARM image for installation onto an SD card. These images are built using the “kali-rolling” repositories and are based on the XFCE desktop environment rather than the Gnome or Unity desktop environment. This means that the process for enabling the Raspberry Pi 3 Kali Linux auto login feature is different depending on what type of Kali Linux installation you have.
If you have a different version of Kali Linux and wish to install the version that we are using then please see Install Kali Linux on Raspberry Pi 3 with 3.5 inch LCD Screen.
PURPOSE OF RASPBERRY PI 3 KALI LINUX AUTO LOGIN FEATURE

If you are reading this you obviously already know the purpose of the Raspberry Pi 3 Kali Linux auto login feature. If you are worried about security then it isn’t recommended to enabled the auto login feature. If you’re using the Raspberry Pi as a disposable “ethical hacking” device then this feature could be beneficial.
One way to utilize this feature would be if you wanted to test the security of a network. First you could install VNC Viewer on Raspberry Pi with Kali Linux and you could strategically place the Raspberry Pi device in a hidden location. You could then plug your power source into the Raspberry Pi and turn it on. You could then leave that location and use a different computer in another location to access the Raspberry Pi remotely via VNC Viewer. Disabling the auto login feature ensures that you don’t have to ever login to Kali at the location where you’re testing the network. You wouldn’t be able to access the Raspberry Pi remotely until you were logged in first.
auto login could be beneficial for a disposable ethical hacking device
If you already have an organized plan or an idea of how you will be using Raspberry Pi 3 Kali Linux auto login then let us dive into the procedure.
The first thing that you want to do is log into your Kali Linux installation. For the purposes of this tutorial it is advised that you login as root. After you login you need to open up a terminal. When your terminal is open you need to navigate to a specific file that we will be editing. Type in the following to navigate to the desired file:
cd /etc/lightdm
To see the files in this location type:
ls
The file that we want to edit is lightdm.conf and we will use nano to edit it so type:
nano lightdm.conf
RASPBERRY PI 3 KALI LINUX AUTO LOGIN-EDITING THE LIGHTDM.CONF FILE
When you open up the lightdm.conf file you need to scroll down until you see the two lines:
#autologin-user=
#autologin-user-timeout=0
You need to edit these two lines so that they read:
autologin-user=root
autologin-user-timeout=0
When you have finished editing this file press “Ctrl+x”, then press “y” to save, and then “Enter” to exit the file.
Now we need to navigate to another file so that we can edit it’s contents.
RASPBERRY PI 3 KALI LINUX AUTO LOGIN-EDITING THE LIGHTDM-AUTOLOGIN FILE
Let’s navigate to the file that we need to edit by typing:
cd /etc/pam.d
To see the files in this location type in:
ls
We will be editing the lightdm-autologin file so we need to open it. To open this file type the command:
nano lightdm-autologin
The line that we need to edit is:auth required pam_succeed_if.so user != root quiet_success
We need to hash out or comment out that line by editing it to look like this:
#auth required pam_succeed_if.so user != root quiet_success
After you have made this change go ahead and save the file by pressing “Ctrl+x“, then press “y“, then “Enter” to exit.
RASPBERRY PI 3 KALI LINUX AUTO LOGIN-ENABLED
Now that you have the two required files edited you can now test out the Raspberry Pi 3 Kali Linux auto login feature by rebooting the system.
After you reboot the system you will notice that it will boot straight to the desktop rather than prompting you to login with your username and password.