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.

Please understand that I've migrated to a Ubuntu Desktop from Win7 some months ago and while I have been reading about sudoers and Linux in general my understanding is still limited.

This is how I have my Users setup:

  1. A standard user (not in the sudoers) which I log into and use for all daily operations, running all my programs, browsing, designing, mailing, etc.

  2. An administrator user which I only switch into using the terminal by means of "su [user]" whenever I need to do something that requires privileges. (just so I can "sudo" a command that requires it - basically doing what needs to be done and then switching back to the standard user)

My question is: Is this a good security practice or does it make no sense at all to have it set up like this? From what I can tell so far I don't seem to need administrator privileges that often anyway.

The reason I'm asking is that I've only recently learned that there is a difference between the root account and my administrator account :). I'm still partially confused about it but from what I can gather you "tap" into the root account using something like "sudo" in the terminal while being logged in as a user that is in the sudoers (an administrator). The strangeness of it is that in order to "sudo" something I basically enter the same password my administrator account has. Doesn't this mean that if my administrator account is compromised then so is the root account? I'm all too terribly confused by this :(.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

I don't see anything wrong with your added layer of security. By adding in the additional user, it keeps a false command from being executed under the normal user that would affect the entire system. That was the point with a root login in the past. Is it overkill, perhaps, but that's one of the great things with a GNU/Linux system. It is your system to set as you like.

Remember, asking questions is never wrong, as long as you ask the right question...

share|improve this answer
1  
Thank you for the quick response Malcom. I can sleep better tonight :). –  Octavian Jan 5 '13 at 20:33
add comment

I migrated to Ubuntu a similar time ago to you and the way I see it (although might be innacurate) neither of your accounts are permanently logged in as sudo or su. This is logical for the Standard User, but might seem less so for the Administrator User.

In both cases you need your Administrator password to run the super-user commands, the benefit however is that your commands launched by the Standard User won't affect the whole system, therefore if anything goes wrong you'll have no worries to sort it out using the Administrator account.

I'm not very knowledgeable on the issue but I've found reading questions such as: Why is it bad to run as root helped me understand a bit better the difference between root and sudo I'd give the answers a read as they're quite informative.

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.