MacOS – OS X 10.10.5 – root user suddenly activated

macosrootsettings

As far as I know, the root-user is deactivated by default in OS X. And I remember trying the command "su" some time (a few weeks) ago and it stated something like "su: sorry" which it should state. I googled how to activate the root user and followed the steps, just to know it if it would be necessary, but DID NOT activate or change anything in the settings at that point.

Just for fun, I tried a few minutes ago and it DID let me login as root, i. e.:

➜  ~  su                                                               23:46:28
Password:
sh-3.2# ls -l

Does anyone have an idea why that change occured?

P.S.: The attempt a few weeks ago was under OS X 10.10.4, the attempt a few minutes ago was under OS X 10.10.5 – does anyone know if they changed that setting within this update?

EDIT: A few months ago, I just recall, there appeared a new user displayed as "Others…" at the login screen when booting up. It is still here, but I didn't do anything about this user. In the system preferences it just states the 3 users (my user, backup with admin rights (called "test") and guest) I created, but in the terminal it states:

➜  /Users  ls -lah                                                     00:13:41
total 0
drwxr-xr-x   7 root   admin    238B 17 Okt  2014 .
drwxr-xr-x  35 root   wheel    1,2K 11 Jul 15:19 ..
-rw-r--r--   1 root   wheel      0B 10 Sep  2014 .localized
drwxr-xr-x+ 11 Guest  _guest   374B 25 Sep  2013 Guest
drwxr-xr-x+ 64 MyName staff    2,1K 30 Aug 00:13 MyName
drwxrwxrwt   9 root   wheel    306B 16 Aug 22:30 Shared
drwxr-xr-x+ 12 test   staff    408B  6 Aug 14:54 test

What is this "shared" user? This will probably correspond to the user "Others…" displayed at the login screen. That's the content of "Shared":

➜  Shared  ls -al                                                      00:23:57
total 16
drwxrwxrwt  9 root  wheel   306 16 Aug 22:30 .
drwxr-xr-x  7 root  admin   238 17 Okt  2014 ..
-rw-r--r--@ 1 MyName wheel  6148 16 Aug 22:30 .DS_Store
-rw-r--r--  1 root  wheel     0 10 Sep  2014 .localized
drwxrwxrwx  4 MyName wheel   136 27 Jun  2014 Battle.net
drwxrwxrwx  5 MyName wheel   170 25 Apr 12:22 Blizzard
drwxrwxrwx  3 MyName wheel   102 11 Sep  2014 Latexian
drwxrwxrwx@ 6 MyName wheel   204 27 Okt  2013 SC Info
drwxrwxrwx@ 2 MyName wheel    68 25 Sep  2013 adi

EDIT: Just looked it up and found that root is indeed activated. I think i will deactivate it again. But why did it even change?

EDIT: Just deactivated root. Responds "su: sorry" as desired when trying to login as root in the terminal and furthermore the "Others…" user at the login screen disappeared. Still clueless why and how root got activated.

Best Answer

The "Shared" folder is - depending on your system - automatically created or created by the system after establishing a second user account on your Mac (in your case probably the test user). Its purpose is the sharing of files between several user accounts.

Those files (and folders) may be personal data, Application Support files for all users or registration/licensing data.

Therefore the read and write bits are set for all users (BTW t is a sticky bit):

drwxrwxrwt   9 root   wheel    306B 16 Aug 22:30 Shared

The user folder of the root account is /var/root and contains the same default folders as a normal account.


After enabling the root user, the "new" user "Others" will be displayed in the login screen. This was done a "few months ago" as mentioned in your first EDIT section. There is no relation to the Update 10.10.5. You probably have done it yourself in the past or someone else who has admin access to your Mac.

The reason to be able to use your standard password with su is the identity of your password and the root password. If you change the password for root, you would have to enter this instead. If you then would like to su your admin user without knowing the root password, you would have to enter sudo su and your admin's password.