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?

link|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
5  
The real answer here is don't do that. – mattdm Dec 27 '10 at 5:45
feedback

2 Answers

up vote 1 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.

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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