Versions
- CentOS 6.5
Install
Note
|
must be logged in as superuser |
1 |
yum install sudo |
Configure
- Add write access to /etc/sudoers before edit:
1chmod u+w /etc/sudoers
- Edit /etc/sudoers and uncomment this line:
12## Allows people in group wheel to run all commands%wheel ALL=(ALL) ALL
- Remove write access otherwise sudo won’t run:
1 |
chmod u-w /etc/sudoers |
+ NOTE: user must have primary group as wheel to sudo. See CentOS 6: Change existing user group
You should not change the rights of /etc/sudoers – instead, use the program visudo. It takes care of the rights, and makes sanity checks to ensure that sudoers is not screwed up.