On a default installation of FreeBSD you will find that you can’t SSH into the server using the root account, and any accounts that you have added, can’t run the ‘su’ command to elevate to root. To enable ‘su’ access, the user needs to be part of the ‘wheel’ group.
Note: These commands must be run from an account that has root privileges.
To add a user (in this example, a user called ‘administrator’) to the wheel group, run the following command:
# pw group mod -n wheel -m administrator
If you wish to remove a user from the wheel group, replace -m with -d as follows:
# pw group mod -n wheel -d administrator
To view the members of the wheel group, run the following command:
# pw group show -n wheel
The ‘administrator’ user should now be able to run the ‘su’ command and run commands as root.