MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Adding user to sudoers

with one comment

Somebody asked why adding a user to the wheel group in Oracle Enterprise Linux didn’t enable them as a sudoer, as qualified in my earlier Fedora post. The reason is that you also need to modify the /etc/sudoers file to specify users allowed that privilege (and the file differs from it’s Fedora cousin). If you have the root user privileges, you can do the following:

  1. Change to the root user account with su, and provide the password when prompted. The syntax is:
su - root
  1. You can find the line you need to change with this command:
cat /etc/sudoers | grep %wheel

You should see the following two lines. If you want authorized sudoers to provide a password (recommended), then modify the first line by removing the # comment. If you don’t want authorized sudoers to provide a password, modify the second line by removing the # comment. Open the /etc/sudoers file with vi or gedit if you’d like a GUI editor.

# %wheel     ALL=(ALL)      ALL
# %wheel     ALL=(ALL)      NOPASSWD: ALL

Hope this helps, I’m off to Oracle Open World 2011 tomorrow.

Quick update for Fedora 20, you su to root and add your user to the sudoers list with the following syntax:

usermod someusername -a -G wheel

By the way, don’t forget to log off and then back on to the account.

Written by maclochlainn

October 1st, 2011 at 8:22 pm

Posted in Linux,Oracle Linux

One Response to 'Adding user to sudoers'

Subscribe to comments with RSS or TrackBack to 'Adding user to sudoers'.

  1. […] installing MySQL 5.6 on Fedora, Version 20 […]

Leave a Reply