Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Whenever I try to issue su I get this:
$ su
Password:
su: Sorry

Needless to say, I'm entering the correct admin password which does work with sudo. What I want is not having to enter sudo each time.

share|improve this question

2 Answers 2

up vote 7 down vote accepted

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.

If you must enable the root user, see Apple's technote: Enabling and using the "root" user in Mac OS X.

share|improve this answer
1  
sudo su still works, so it is not really disabled. It just has no password. –  Fake Name May 23 '11 at 9:34

You have two options. The first is to use sudo -s - this will give you superuser access, but you will still remain 'yourself' (so to speak), so things like ~ will still be your home directory. Alternatively, you can use sudo su, which gives you a shell as the actual root user of your Mac.

share|improve this answer
5  
The Apple Way(tm) is to use sudo to run commands that require elevated privileges, not to switch to a root shell and work from that. –  Ian C. May 23 '11 at 1:04
    
@Ian C. - No, that's actually the unix way. Apple just uses it because it is *nix based too. –  Fake Name May 23 '11 at 9:34
    
@Fake Name: Apple goes through great pains to never talk or expose the root shell to users. You could say they take the sudo ethos to the extreme. But whatever: semantics. Don't use root shells in OS X. –  Ian C. May 23 '11 at 13:05
    
@Ian C - Apple doesn't do much more than the *nix designers do, Apple just doesn't talk about it much. In both cases, it's there, only with things like linux, they tell you how to use it easily. If that makes it more widely used, it doesn't indicate an underlying architecture difference. –  Fake Name May 23 '11 at 18:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.