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.

Author bio and support


Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person in bios. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.