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

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
    Aug 1 '13 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
    Aug 1 '13 at 12:32
  • My comment wasn't for you, but for anyone who read the answer ;). But I can't mention @readers.
    – Braiam
    Aug 1 '13 at 12:38
  • @Braiam - I figured, I was just qualifying your comment.
    – slm
    Aug 1 '13 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
    Aug 1 '13 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.