Adding a user to the Sudoers group on Freebsd

How To?
Share

On Unix/Linux like Operating systems, users need some privileges to execute some admin tasks. You therefore need to grant the right privileges to users in need. Here is how you do so for freeBSD:

You first need to ensure that the the “sudo” package is installed on your system. If not there, install using the command:

# pkg install sudo

You then need to add the user to the “wheel” group as follows:

#pw group mod wheel -m <username>

Finally you need to edit the file /etc/sudo using the command “visudo” with the following command:

#visudo

Ensure the entry for “wheel” group is uncommented as below:

## Allows people in group wheel to run all commands

%wheel ALL=(ALL) ALL

Note that is the user is connected, they will have to logout and login again for the changes to apply.

Author: honlue

Leave a Reply

Your email address will not be published. Required fields are marked *