I am fairly new to the Mac and I was trying to figure out how to become su when using the Mac terminal. Apparently Mac does not come with su enabled by default. When I tried the command “su”, it prompted me for a password, but I don’t remember setting a password before. So in order to get super user access, you have to set the password for root first. All you need to do is issue this command and you will be able to “su”
>sudo passwd root
Enter your user account password and then enter the new root password twice. After that issue the “su” command and enter the password you just created. You have super user access now.