PDA

View Full Version : Auto root login - how to?



MaxTroy
2020-01-21, 15:09
Hi Forum I am trying to figure out how to auto login with root on my kali install.

I have tried this:

gedit /etc/gdm3/daemon.conf

[daemon]
# Enabling automatic login
AutomaticLoginEnable = true
AutomaticLogin = root

But it doesn't auto login. I didn't think it would anyway as I havent told it what password to use anywhere.

Can someone advise me what I am missing please?

CodeX-
2020-02-17, 09:43
After "researching" for half a day here is how to auto login in 2020.1 version

nano/etc/lightdm/lightdm.conf # and add these lines in [Seat:*] section

autologin-user=root
autologin-user-timeout=o

nano/etc/pam.d/lightdm-autologin #Comment out below line
#authrequired pam_succeed_if.so user != root quiet_success

Hash30
2020-03-20, 15:47
How to login as root? I'm not able to login as root on my machine as there was not any option to create an account as root instead i had to create an account with my name during the installation. Please help me. It's very frustrating to use sudo again & again and then enter the passwd evertime! See image what i'm talking about!3902

Thunderdome
2020-04-15, 07:29
After "researching" for half a day here is how to auto login in 2020.1 version

nano/etc/lightdm/lightdm.conf # and add these lines in [Seat:*] section

autologin-user=root
autologin-user-timeout=o

nano/etc/pam.d/lightdm-autologin #Comment out below line
#authrequired pam_succeed_if.so user != root quiet_success

Thanks a lot, you saved my day!!!

Thunderdome
2020-04-15, 07:35
How to login as root? I'm not able to login as root on my machine as there was not any option to create an account as root instead i had to create an account with my name during the installation. Please help me. It's very frustrating to use sudo again & again and then enter the passwd evertime! See image what i'm talking about!3902

I get your point, here 2 options:
1) Activate root user (not recommended if you are going to use it day by day):

Issue command ?sudo su?
<Enter the password for kali user account>
Issue command ?passwd root?
<Enter new password and retype that password>
At this point you can log-off and re log-in or you can just switch the user
and log in as root.

2) Give your user privileges to avoid enter the passwrd every time (strongly recommended, the option I use):

sudo su
pass for kali
dpkg-reconfigure kali-grant-root

This way you only have to write "sudo su" and won't ask you for passwrd.

I hope this helps.

Thunderdome
2020-04-15, 12:54
After "researching" for half a day here is how to auto login in 2020.1 version

nano/etc/lightdm/lightdm.conf # and add these lines in [Seat:*] section

autologin-user=root
autologin-user-timeout=o

nano/etc/pam.d/lightdm-autologin #Comment out below line
#authrequired pam_succeed_if.so user != root quiet_success

Thanks! You saved my day with this :D

latentlust214
2020-04-19, 14:08
root@kali:~# gedit/etc/
bash: gedit/etc/: No such file or directory
root@kali:~# gedit/etc/gdm3/daemon.conf
bash: gedit/etc/gdm3/daemon.conf: No such file or directory
root@kali:~# gedit /etc/gdm3/daemon.conf
bash: gedit: command not found
root@kali:~# nano/etc/lightdm/lightdm.conf
bash: nano/etc/lightdm/lightdm.conf: No such file or directory
root@kali:~# gedit /etc/gdm3/daemon.conf
bash: gedit: command not found
root@kali:~#
root@kali:~# [daemon]
bash: [daemon]: command not found
root@kali:~# # Enabling automatic login
root@kali:~# AutomaticLoginEnable = true
bash: AutomaticLoginEnable: command not found
root@kali:~# AutomaticLogin = root
bash: AutomaticLogin: command not found
root@kali:~# AutomaticLogin = root
bash: AutomaticLogin: command not found
root@kali:~# gedit usr/etc
bash: gedit: command not found
root@kali:~# gedit usr/etc/
bash: gedit: command not found
root@kali:~# gedit/ usr/etc/
bash: gedit/: No such file or directory
root@kali:~# gedit
bash: gedit: command not found
root@kali:~# nano
root@kali:~# nano/etc/lightdm/lightdm.conf # and add these lines in [Seat:*] section
bash: nano/etc/lightdm/lightdm.conf: No such file or directory
root@kali:~# nano
root@kali:~# nano/etc/pam.d/lightdm-autologin
bash: nano/etc/pam.d/lightdm-autologin: No such file or directory
root@kali:~# ^C
root@kali:~#


------i have tried, gedit, leafpad, etc
i cant still find that daemon.conf T_T

re4son
2020-04-20, 01:53
root@kali:~#gedit/etc/gdm3/daemon.conf
bash: gedit/etc/gdm3/daemon.conf: No such file or directory
You are missing a space between "gedit" and "/etc/..."



AutomaticLoginEnable = true
bash: AutomaticLoginEnable: command not found
I suppose you accidently copied and pasted something into your terminal window?




root@kali:~# nano/etc/pam.d/lightdm-autologin
bash: nano/etc/pam.d/lightdm-autologin: No such file or directory
Missing space again

Linux can be frustrating at times when you cut and paste random strings in a command line. The error messages aren't much of a help then.
I recommend to:

1. Follow this installation guide to install Kali Linux (https://www.kali.org/docs/installation/kali-linux-hard-disk-install/)
2. Complete this free "Kali Linux Revealed Online Course" (https://kali.training/lessons/introduction/)

That will make life so much easier for you and might even open doors to amazing careers.

Once you are done with those, you might even be keen on doing the
https://www.offensive-security.com/pwk-oscp/

jvantuno
2020-11-05, 15:58
After "researching" for half a day here is how to auto login in 2020.1 version

nano/etc/lightdm/lightdm.conf # and add these lines in [Seat:*] section

autologin-user=root
autologin-user-timeout=o

nano/etc/pam.d/lightdm-autologin #Comment out below line
#authrequired pam_succeed_if.so user != root quiet_success

I don't have the line referenced above in my lightdm-autologin (see screen shot). I only have auth required pam_permit.so. I tried commenting that but it didn't work. Any ideas?

4344