In the past, Debian presented an action menu upon initial boot after install where you could confirm "login as root." When that option disappeared, I stopped defining the root user.

However I now need to be root user in gdm to use tools that work better graphically.

This is what I want to do:

1) Open the root terminal and enter my password.
2) Login as root
3) Exit the root terminal and do my thing as root.
4) Use the normal login to get back to my account.

My current work-around is to launch the apps from the root terminal. I have to do this for BOINC-Client to access the AMD gpu driver for some openCL apps.

When I try to do the same with Mathematica, I have to authenticate each time. I prefer not to do this.

The plan is to run BOINC as I am currently doing and shutting it down before I switch to root. After I switch back, I will relaunch it. It uses the same resources (the gpu) as the Mathematica project.

How can I do this?

  • 1
    Look at setting the suid for those apps – slashmais Sep 30 '12 at 10:57
  • @slashmais, suid did not fix it. Nice idea, though! – Fred Kline Sep 30 '12 at 11:56
  • look at superuser.com/questions/481080/… - I just answered a similar question 'how two run sudo under X'. Sorry for self-promoting) – Serge Sep 30 '12 at 14:58

Assuming you are on Debian 6, edit /etc/gdm3/daemon.conf and add the following line


under the security options. Then comment out the following line in /etc/pam.d/gdm3

auth   required        pam_succeed_if.so user != root

You should then be able to login

  • Perfect! Exactly what I needed. – Fred Kline Sep 30 '12 at 18:24
  • 1
    From user th.sigit: On Debian 8, I do not have /etc/pam.d/gdm3 file but I have /etc/pam.d/gdm-password, so I edited that file instead. – fixer1234 Jan 5 '16 at 6:33

You really don't want to be running X as root. But this might fix it for you:

The root account probably doesn't have a password; if the security settings on the Linux box (you should investigate PAM, some time) are such that accounts with no password cannot log in, root login is blocked. To fix this, do the following:

  1. Log in to X as your normal user.
  2. Open a terminal window.
  3. Run sudo su -. You will be prompted for your password.
  4. You should now be logged in as root (in the console session running in the terminal window, that is).
  5. You can now set a password for root by running passwd.
  6. Run exit twice (to log you out first as root then as you, which will close the terminal window) or just kill the terminal window.
  7. Logout of your GUI session, try.
  • Tried it. Still no root login. It set the password, however I think the "no root login" setting is still set somewhere. I don't have a clue. – Fred Kline Sep 30 '12 at 13:58

You shouldn't have to run applications as root that you use often. There are nicer ways to sort this.

But take a look at gksu or kdesu, you might find that useful. You could even set up your shortcuts to use it automatically.

  • Currently, the only way to access the AMD openCL libraries is to be root user. I have tried those two commands without success. – Fred Daniel Kline Sep 30 '12 at 10:54
  • You should not need to be root to run OpenCL. If you need to be root for that, some permissions are wrong when OpenCL was installed. – Basile Starynkevitch Sep 30 '12 at 11:05
  • 1
    @BasileStarynkevitch, something in the AMD package is wrong. The work-around is to run as root. See this post. – Fred Daniel Kline Sep 30 '12 at 11:09

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.