Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSX su command issue

Tags:

macos

osx-lion

su

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 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.

like image 692
kapso Avatar asked Sep 27 '11 06:09

kapso


People also ask

Does su work on Mac?

In MacOS X, the root user is disabled by default, therefore su will not work. As others have stated, it's best to use sudo .

What is su command in Mac?

If a command requires it, you can use su to switch to the root user. Under normal circumstances, you shouldn't log in as the root user. Important: If you use su to log in as the root user, be especially careful because you have sufficient privileges to make changes that can cause your computer to stop working.

How do I enable su command?

To provide sudo access, the user has to be added to the sudo group. The su command lets you switch the current user to any other user. If you need to run a command as a different (non-root) user, use the –l [username] option to specify the user account.

How do I switch to superuser on my Mac?

Click Open Directory Utility. in the Directory Utility window, then enter an administrator name and password. From the menu bar in Directory Utility: Choose Edit > Enable Root User, then enter the password that you want to use for the root user.


1 Answers

sudo su 

will do the trick in Mac Os X terminal :)

like image 140
Nehemias Herrera Avatar answered Sep 23 '22 03:09

Nehemias Herrera