0

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?

3 Answers3

3

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.
Indrek
  • 24,874
itsbruce
  • 161
3

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

AllowRoot=true

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

fpmurphy
  • 1,661
2

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.

Derecho
  • 211