How To Add, Delete, and Grant Sudo Privileges to Users on a FreeBSD Server
Here's how you can add, delete, and grant sudo privileges to users on a FreeBSD server:
- Add a new user:
pw useradd- Delete a user:
pw userdel- Grant sudo privileges to a user:
pw usermod -G wheelNote: The pw command is used to manage users and groups in FreeBSD. The useradd subcommand creates a new user, userdel deletes a user, and usermod modifies a user account. By default, only users in the wheel group have sudo privileges in FreeBSD. Adding a user to the wheel group grants them the ability to use sudo.
