4

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 :(.

2 Answers2

4

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

Malcolm
  • 56
1

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.

Oyibo
  • 1,919