1

In my setup, my aim is to have

  1. A standard user with minimal permissions to use on a daily basis
  2. A superuser account, defined in /etc/sudoers.

Does this second user need a home directory? Both of these users will be created by a tempsudo account, which is created during the installation step. I'll delete this account once account #2 is created with this command:

sudo adduser --no-create-home permsudo

Will I run into problems in a graphical environment, e.g. with gksudo? I'm using Linux Mint Debian, so I will be running a desktop environment.

3
  • 4
    "A user granted all permissions...to perform system maintenance tasks" == root. Creating a user who's privileges match root but isn't root is not safer, if anything, it is probably worse. There is a superuser account, use that. root's home is /root, yes it needs one, and yes root can use a GUI (you may have to configure your display manager, if you use one, to allow this). Just don't use a web browser or other network client there. Commented Feb 24, 2013 at 22:21
  • @goldilocks I edited the question, since I meant a superuser account. Commented Feb 24, 2013 at 23:07
  • 2
    The "superuser" IS root. That's who "root" is. superuser == root. "superuser" and "root" are synonymous. You don't have to create another superuser -- it makes no sense. A user who can do anything cannot be compartmentalized from another user who can also do everything, so (to repeat) having two of them is pointless, confusing, etc. There is inevitably, by necessity a root account, root's home is /root. Have a look (you need superuser permissions to do so...). You can log in as root, use a GUI, do maintenance, etc. The account ALREADY EXISTS. Commented Feb 24, 2013 at 23:27

2 Answers 2

3

You are confused. There is an account on the system, called root, who has an account (and a home, traditionally /root). It is all-powerful, and by analogy to other systems it is also called the "superuser". The command su(1) allows one user to start a shell as another user (substitute), and he command sudo(1) allows an user to run commands with the privileges of another user, in a controlled manner (the file /etc/sudoers contains the configuration, see sudoers(5)). sudo is typically used to allow regular users to run a limited range of commands as root.

1

It is not required for this auxiliary sudo user to have a home directory.

There are no obvious problems from this approach, but you won't have any default GUI settings, so if these are important, you should make a home directory and lock it down. If you are going to login and use this user via GUI, you should probably make sure it looks different from your normal user so it is obvious when you have the tools to break the box.

10
  • There is an obvious problem with this in so far as a non-root account with root privileges can potentially screw with the root -- which will lead to nothing good and has no advantages. Do not do this. If you want to be the superuser, just be the superuser and log in as root. Commented Feb 24, 2013 at 23:34
  • To state this is an obvious problem is equivalent to stating the sudo command should not exist. So, this is not an obvious problem, it is a preference. Commented Feb 24, 2013 at 23:41
  • 3
    The point of sudo is to grant users limited privileges. I'm just pointing all this out because it seems to me the OP is confused or unaware of the purpose of the root account. If not and I look like a loudmouth fool, that's fine -- I'm not trying to criticize your answer beyond raising a caveat. Commented Feb 24, 2013 at 23:50
  • I think it was fairly clear his intention was to make an account to handle routine system maintenance jobs that was not root, so he was not bound to logging in as root to accomplish them. If that was not the intention, your criticism is vastly more appropriate. Commented Feb 24, 2013 at 23:53
  • @goldilocks I appreciate the correction. I don't know too much about Unix at the moment, and I had some terminology mixed up. Commented Feb 25, 2013 at 1:53

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.