1

I want to enable auto-logon with root user for some specific purpose. It's so boring that every time I power on my PC to study, I have to input user and password.

2

2 Answers 2

2

I think you just need to edit this file (/etc/lightdm/lightdm.conf) and add the following line:

autologin-user = root
6
  • 4
    Please note, this is a gigantic hole in the security of your system!
    – Braiam
    Commented Aug 1, 2013 at 12:30
  • @Braiam - in general yes. It kind of goes without saying that you wouldn't do this on a server. But if it's a desktop system running Fedora and it's for personal use then user's can do as they wish.
    – slm
    Commented Aug 1, 2013 at 12:32
  • My comment wasn't for you, but for anyone who read the answer ;). But I can't mention @readers.
    – Braiam
    Commented Aug 1, 2013 at 12:38
  • @Braiam - I figured, I was just qualifying your comment.
    – slm
    Commented Aug 1, 2013 at 12:50
  • Thank you, slm. And thank for your recommend, Braiam, i'm system administration and your caution is the fisst lesson :)
    – Tien Quan
    Commented Aug 1, 2013 at 13:49
2

I'd recommend you to still use a regular user, but to configure sudo without password. Anytime you need to do a root command, you can just do:

# sudo command

If you want to have a terminal opened with sudo shell, do

# sudo bash

Note this is still giantic hole in the security of your system :-) As root do:

# visudo

and add this line:

yourusername ALL=NOPASSWD: ALL

If you like this solution, you can maybe slightly increase the security by configuring long timeout for passwords. So you only will be asked one an hour/day or week.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .