2

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.)

3

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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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