Wheel group for FreeBSD visudo

Despite my pronounced departure from CentOS to Debian for most system tasks, FreeBSD is still my primary server OS of choice. Partly because I’ve loved the OS since at least 2006, partly as a hedge for when that ridiculous systemd takes down Debian with Jessie.

No, really, systemd really is that bad.

But I digress, as I always do. One of the first tasks I perform when setting up a FreeBSD box from scratch is install sudo, and enable access for my separated administration account.

If you read forum discussions, Stack Exchange answers and blog posts, its likely you’ve been told to use visudo, and add the following line:

username ALL=(ALL) ALL

While that works, FreeBSD has had the wheel user for this specific task for as long as I can remember. Much like Debian’s sudo user, just adding yourself to this:

# pw groupmod wheel -m username

Then you can run visudo, and uncomment the first %wheel line.

For finer grain permissions and control, you’ll want to configure for individual users. At least to start though, this is the simplest way to go.


This is one of about 5000 posts on Rubénerd. View the home page for the latest, or related posts also tagged with:

If you liked this post, feel free to buy me a coffee, leave me a comment on Twitter, or email me at weblog2017@rubenschade.com. Thanks :).