can log in as root, can't su

iyc


Joined
Jan 28, 2011
Messages
2
Reaction score
0
Points
1
I've recently had to install an application on my macbook air that required root. I didn't really want to enable root to do so. My current user is listed as Admin. I can enable root, and log in as it, and I can then "su" successfully. However, if I disable root on the MBA, I can no longer "su" - it prompts me for my password, but then when I type the root password it comes back "Sorry". When I type my own password: same thing - "Sorry". Queue "waahh waahhhh....." music.

Does "su" require a password that's different than both the current user and root?

Thanks, in advance, for any help.

`iyc

PS - I can do the above behavior with no problem on my macbook pro. same os version.
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Actually, you want to use 'sudo'. Doesn't require root, just your admin password. Works the same.
 
OP
I

iyc


Joined
Jan 28, 2011
Messages
2
Reaction score
0
Points
1
Thanks! That works. Just a follow-up, out of curiosity: if I enable root and sudo su I can sudo su. If I disable root and sudo su, I cannot sudo su. However, it's possible on my other machine. My question is: is it possible to set up a superuser without enabling root?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
superuser = root. When you use sudo to execute something, you are executing it with root privileges. Therefore, you shouldn't need to enable the root user. Instead, stick with sudo.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top