Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am logged in with imp user. And when I am trying to login via root user on terminal:

impuser@machine:~$ su - root

it gives:

setgid:Operation not permitted

any idea,How to resolve this issue?

share|improve this question
    
You're using ubuntu, so you want sudo, not su. –  Wug Aug 20 '12 at 13:00
add comment

migrated from stackoverflow.com Aug 20 '12 at 13:12

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

4 Answers

up vote 1 down vote accepted

Ubuntu only allows sudo to increase privilege level, not su (unlike other distros). To get a root shell, try this:

sudo su
share|improve this answer
    
The canonical way is to use sudo bash or whatever shell is your favorite –  Wug Aug 20 '12 at 20:55
add comment

This depends on the configuration, but try:

sudo su - root
share|improve this answer
add comment

If "impuser" is allowed to get root ( that means that he is not excluded from sudo rights in the /etc/sudoers file ) Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo su
share|improve this answer
add comment
sudo -i

For an interactive root shell. This has the benefit of also processing the .login and .profile scripts.

sudo -s

Will also give you a root shell but it will not process the root login scripts.

share|improve this answer
add comment

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.