Skip to main content

Configuring sudo

For administrators. The sudo command is preferable to su but often your shell account is not configured to use this command. Typical error message: [name] is not in the sudoers file. This incident will be reported You need to:
  1. Configure sudo to allow the wheel group to use sudo.
  2. Add the desired accounts to the wheel group.
Here's how:
  1. Log in as the super user: su -
  2. visudo
  3. Type: i
  4. Uncomment the specified line (see below)
  5. Save and quit: [Esc] :wq
Uncomment the wheel group line as follows (or paste this in, if it's not in /etc/sudoers)
# Uncomment to allow people in group wheel to run all commands %wheel ALL=(ALL) ALL
Then, add the accounts to the group wheel to give them sudo access. gpasswd -a [name] wheel Adding user [name] to group wheel Then, after you've added your account name,
  1. exit
  2. Try sudo. You must enter your password (not root!) once per session.
You're done!

Comments