Fiddling with FreeNAS for a while now it was bothering me to have to
su before running a command that requires root.
This sound simple but there is one caveat: If you just edit
/usr/local/etc/sudoers, your changes will be lost when your box reboots.
FreeNAS stores some of its base files in
/conf/base. To modify it you have to make it writable first, ssh into your box and run:
su mount -uw /
Now you can
nano /conf/base/etc/local/sudoers and add the following line:
%wheel ALL=(ALL) ALL
Make sure that the users that require
sudo will be on the
wheel group (you can change this from the web gui).
Reboot your FreeNAS and the system will apply this setting. That’s it!
Update 2013-10-26: Trying to apply this to FreeNAS 9.1.1 I noticed that the correct path to the persistent sudoers file is