Loading...
 

How to add a group to sudo on ClearOS

sudo is a program for Unix-like computer operating systems that allows users to run programs with the security privileges of another user, by default the superuser. It originally stood for "superuser do" as the older versions of sudo were designed to run commands only as the superuser. However, the later versions added support for running commands not only as the superuser but also as other (restricted) users, and thus it is also commonly expanded as "substitute user do". Although the latter case reflects its current functionality more accurately, sudo is still often called "superuser do" since it is so often used for administrative tasks.

1. Create a group

System -> Accounts -> Group-> Add/edit a group

For example, sudogroup

2. Set this group as sudo

nano /etc/sudoers



Replace

!# Allows people in group wheel to run all commands
%wheel        ALL=(ALL)       ALL


with

## Allows people in group wheel to run all commands
# %wheel        ALL=(ALL)       ALL
%sudogroup   ALL=(ALL)       ALL

In effect, this comments out the wheel group, and adds sudogroup

3. Provide access to a user

  • System -> Accounts -> Users -> Add/edit a user -> Login Shell -> Shell bin/bash
  • System -> Accounts -> Users -> Add/edit a user -> Groups -> Add user to that group