Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a (home) Ubuntu machine; upon installation I created the "x" user during the installation (who is not the root) so often when I want to run apt-get or other things that require write access to /usr or /var I need to sudo.

My question is is there a safe way to setup the "x" user in such a way that he has more rights so that I don't have to sudo or su?

What would be the optimal way to do the user account management? (On a home machine - so no production.)

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Not on Linux. On Solaris you can use RBAC (Role Based Access Control) and provide additional permissions.

On Linux the proper way to do this is to use sudo.

We all do it.
That is the way of things.
The way of the Force.

share|improve this answer
    
love the ending quote :) so you should have a normal account to run X and normal stuff, and when it comes to system stuff you sudo. What about /var/www/ if you want to have a website and edit the .html or .php files without sudo-ing? –  George Katsanos Oct 18 '12 at 9:33
    
@GeorgeKatsanos Change the ownership (or the group) of /var/www. –  Alex Chamberlain Oct 18 '12 at 11:54
    
with the chown command I image? So I should put the ownership to the simple user? would that open 'holes' in case someone wanted to 'hack' the website? (sorry if this sounds silly) –  George Katsanos Oct 18 '12 at 16:38
3  
@GeorgeKatsanos: On the contrary. It's more secure to have /var/www owned by an unprivileged user. Having it owned by root or www-data is unsafe. –  bahamat Oct 18 '12 at 17:42
    
This is basically right, but should note that sudo can be configured to not prompt for a password for specific (or even all) commands. –  mattdm Nov 20 '12 at 15:21
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.