Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Sep 30 '12 at 11:42

This question came from our site for professional and enthusiast programmers.

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

3 Answers 3

up vote 2 down vote accepted

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

share|improve this answer
    
Perfect! Exactly what I needed. –  Fred Kline Sep 30 '12 at 18:24

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.

share|improve this answer
    
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

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.
share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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