Is there any way to create a user with partial root permissions on a GNU/Linux system?

For example: A user who can use the useradd and userdel tools, but nothing else besides regular user permissions. (Don't ask me why, I'm just curious as to if it's possible at all.)

  • Maybe something like a superuser?? – 50-3 Sep 14 '13 at 13:15
  • No, because a superuser usually has all permissions. I want a user with only a part of those. – mid_kid Sep 14 '13 at 13:20
  • Note How you added usually... a superuser will commonly have elevated privileges compared to that of a regular user. Elevated doesn't equal all it can include all but isn't equal to. – 50-3 Sep 14 '13 at 13:28
  • Exactly, and I'm asking how to create a superuser or user (I don't care which, as long as it's separate from the system's "root" user) which has some of those elevated permissions, but not all. – mid_kid Sep 14 '13 at 13:33

If you use sudo, you can specify by-command rights to users :

As an example, adding this line in your sudoers file :

bob localhost=/sbin/halt

Will grant user bob the right to run halt on local system via sudo halt, but no other right.

For more informations about sudoers syntax, you can take a look to its man page.

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.