Sudoers using Ubuntu

The following blog post is a running account of how I am setting up privileges on some new machines. The intention of this post is to serve as a quick reference for myself instead of having to read the really long man pages every time I want to make a small change.

Adding an admin group

This step creates a new group that will have administration members only allowed. Must run this command as root of course.

groupadd administrators

Modifying the user to be part of the new group

This step adds the very trusted and privileged user (let’s say in this case bob) to be a member of the administrators group. Again run this as root.

usermod append -G administrators bob

Editing the sudoers file to allow root access to the administrators group


Then add the following lines

# This is a comment that says the group administrators has full root privileges
%administrators ALL=(ALL) ALL

This is a very simple example but is enough to get started more on this later


2 thoughts on “Sudoers using Ubuntu

  1. Ubuntu is already set up with an admin group. You don’t have to edit the /etc/sudoers file or create a new group.

    You can just add the user to the already-existing admin group:

    sudo adduser username admin

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s