Ubuntu Forums Archive Viewer

how does OS X (IE: apple's Unix) implement root?

Archived thread 1042211 from Mac OSX. Markdown source: Mac_OSX/thread_1042211_how_does_OS_X_(IE_apple's_Unix)_implement_root.md

Original URL About this archive
#1

yeah... title says it all.

google results confuse me as (i suppose) they are written from the point of view of a current OS X user... i am a current Ubuntu user, so that is the wrong POV.

from an _Ubuntu point of view_, can anyone satisfy my curiosity and tell me how OS X implements the root concept (if it does at all)?

thanks :guitar:

#2

erm... su? :-|

#3

Grant A. said: erm... su? :-|

well, that was easy enough lol.

is it the same as ubuntu? user with admin rights enters password and is temporarily root?

#4

yes, same as ubuntu - enter password for admin tasks, root account disabled

#5

It works exactly the same: Root is disabled for GUI login by default, but can be enabled, Same as Ubuntu. 'su' logs into a root shell, same as Ubuntu. 'sudo' gives a user (in the 'admin' group) administrative rights, same as Ubuntu. there is a graphical sudo also for any GUI application needing root access, same as gksudo.

#6

i've never used a mac for more than like 5 minutes (that 5 min was drunk, at a party, changing the song in itunes, and trying to find a terminal to see how similar the commands where :) ), but everything i see/read seems to indicate that the end-user experience is about the same as ubuntu except:

-nothing as awesome as ubuntuforums.org. -better hardware support.

yes/no?

#7

I suppose so, sure. The main difference is that OS X has a much greater range of commercial software like Adobe and Microsoft Products.

#8

earthpigg said: i've never used a mac for more than like 5 minutes (that 5 min was drunk, at a party, changing the song in itunes, and trying to find a terminal to see how similar the commands where :) ), but everything i see/read seems to indicate that the end-user experience is about the same as ubuntu except:

-nothing as awesome as ubuntuforums.org. -better hardware support.

yes/no?

Better hardware support for the 6 models Apple makes, but really poor hardware support for every other computer ever made.

#9

OS X is my primary OS. Its sudo policy is basically the same as Ubuntu's, and many of the command are the same. One of the biggest differences is that it's BSD based, so a lot of the differences between Linux and BSD apply to Linux and OS X.

#10

EDavidBurg said: OS X is my primary OS. Its sudo policy is basically the same as Ubuntu's, and many of the command are the same. One of the biggest differences is that it's BSD based, so a lot of the differences between Linux and BSD apply to Linux and OS X.

Apart from the first part, this is what I've noticed. I don't think you can enable root logins on the desktop version of OS X, but you can enable it on OS X Server :)

If you install macports you also have an apt-get like feature ;) ``` sudo port install $package


Also - moved to Mac OS X forum :)
#11

Joeb454 said: Apart from the first part, this is what I've noticed. I don't think you can enable root logins on the desktop version of OS X, but you can enable it on OS X Server :)

http://support.apple.com/kb/HT1528

It's enabled by default on Server, but you can enable it on the consumer version.

#12

earthpigg said: is it the same as ubuntu? user with admin rights enters password and is temporarily root?

Yes, but if you're not in the sudoers file or can't remember your password you can still get to root:

osascript -e 'tell application "ARDAgent" to do shell script "whoami"'

Replace "whoami" with whatever command you want to run as root.