su not working on mac os x?
Solution 1:
No need to make up a root password. Try
sudo su
and type your user password.
Solution 2:
Others have mentioned the details of the root account. However, you don't even need su
. Just use sudo -i
and you get an interactive root console anyway.
Solution 3:
For su
you need to enter root password. For sudo
you have to enter your own password and you should be listed in sudoers list. Since you have not set root password or root password is different then your password, su
is not accepting your password.
Solution 4:
The root password on OS X is disabled; it is not the same as your sudo
password.
Say sudo passwd root
if you want to make a root password, then su
will work as desired. However, make this password differ from your regular user password in the interest of security.
Solution 5:
The su
program expects you to supply the password of the user you become.
The sudo
program expects you to provide your own password. The configuration file for sudo
controls what you can do with it. With su
, knowledge of the other persons password is sufficient.
Using sudo
is much better; it doesn't require shared passwords.