Go to folder /System/Library/CoreServices/Applications/ Open Directory Utility..
To enable the root user: Click the lock lock icon, then enter an admin user and password. Choose Edit > Enable Root User. Then enter the password that you want to use for root.
To disable the root user: Choose Edit > Disable Root User. If you log in as root, you have root privileges. Don't do this unless it is essential!
To log in as root: Get to the login window (log out, restart, or change user) Log in with the user name “root” and the password you created. If the login window is a list, click "Other" then log in. Remember to disable the root user if you don't need it any more.