I have just created a new Rackspace cloud server and I need to set it up.

I created a new user with the adduser command and currently the user is only in a group with the same name. For the sudo privileges what should I do:

  • use visudo to edit /etc/sudoers file

  • add the user to the sudo group

  • create a new admin group, add it to sudoers, and then add the user to this group

I can not decide what's the right way to do this. Why should I choose one over other?

marked as duplicate by Eliah Kagan, Rinzwind, Warren Hill, Mitch Aug 3 '14 at 9:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


It's generally a bad idea to edit the sudoers file. Creating a new admin group is redundant. Adding the user to the sudo group is the best idea. See here: How do I grant sudo privileges to an existing user?

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