Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wish for a user to have root privileges, but editing the /etc/sudoers file to allow no password still requires me to use the sudo command before a program I wish to run with elevated privileges .

I do I effectively make a normal user root without being root so I have a structured home folder?

share|improve this question
Why not have the user SU to root instead of using sudo? – SpacemanSpiff Dec 27 '10 at 3:22
@Tom, will not all files I save be written under root (root's ownership) then and not the current user? – Robert Renu. Dec 27 '10 at 3:26
The real answer here is don't do that. – mattdm Dec 27 '10 at 5:45
up vote 3 down vote accepted

In general, this is a bad idea, however if you really require this, then modify the following in /etc/sudoers:

## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
<username>    ALL=(ALL)       ALL

## Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL
<username>      ALL=(ALL)       NOPASSWD: ALL

Or you can just use vipw and set the uid to be 0 for that username.

share|improve this answer

If you do:

sudo su -

you will run 'su' with root permissions (elevated via sudo) and the trailing - means that you will use root's environmental variables, not your own.

share|improve this answer

Your Answer


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.