OSX su command issue
So I cant get su
command to work on a terminal. All I do is type "su" and press enter, it asks for the password and I enter my currently 开发者_StackOverflow中文版logged in user password. It always gives this error. I swear this used to work earlier, not sure what happened.
su: Sorry
I am running a Mac OSX 10.7.1 (Lion). Anyone know what could be wrong? I am entering the right password.
sudo su
will do the trick in Mac Os X terminal :)
There is no root account on mac osx. Just go sudo bash
then type the command or commands you want as root.
If sudo stops working because permission to read sudoers is missing, this solution from kahisv.com solves the problem:
Check if the permissions are still correct, that's how it should be:
$ ls -lad / /private /private/etc
d--xrwxr-t+ 36 root wheel 1292 25 sty 12:34 /
If this is wrong in your case, boot in Single-User Mode (hold cmd+s while booting) and enter theese commands:
# /sbin/fsck -fy
# /sbin/mount -wu /
# /bin/chmod 1775 /
# /bin/sync
# exit
精彩评论