Getting "Not Authorized" when trying to send a UNIX command as root to macOS Sierra machine

I am running Apple Remote Desktop version 3.9 (382A110) and am managing two machines:


Machine #1: a MacBook Pro with El Capitan 10.11.6 (15G19009) installed running ARD version 3.9.3.


Machine #2: a MacBook Pro with macOS Sierra 10.12.6 (16G1212) installed running ARD version 3.9.4.


I can Observe, Control, Curtain, Copy and Install packages to both machines but Machine #2 cannot be sent a UNIX command as root. The request fails and I immediately get "Not Authorized" under the 'Task Status' column.


Specifically, I am trying to do the following:


Reset the machine's sole admin account using 'passwd'. For this example, the account is simply named 'admin'.


From inside of Apple Remote Desktop, I select Machine #2 and click the UNIX button (ie, Manage > Send UNIX Command).


Here is exactly what I try to run:


passwd admin

AdminPassword

AdminPassword


For the 'Run command as' option, I select User: and enter "root". Then I click "Send". Immediately fails. ARD returns with "Not Authorized".


This exact same process works on Machine #1 but not on Machine #2. Both machines have been restarted, are fully patched and up-to-date.


Does anyone have any clues?

MacBook Pro, macOS Sierra (10.12.6)

Posted on Jan 29, 2018 1:24 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 29, 2018 11:21 PM

I don’t mean to be obtuse here, but is it possible that you have not enabled the root user on machine #2?

Also, try the same command locally as root via terminal. Just to ensure that root can execute the command you desire, then you’ll know which side of the system is faulty. Just using the 50/50 split rule.

Similar questions

8 replies

Feb 24, 2018 7:42 AM in response to atom_bomb

Thanks A Bomb,

This worked for us.

Same problem here, Open Directory ard_admin accounts stopped working (running Unix Commands) after the last security update on Sierra and High Sierra, but continue to work on El-Cap. Changing the ARD access account from an ard_admin member to the Local Admin solved the problem, but I hope this is something that Apple will address because it sort of kills the domain management model.

Mar 1, 2018 1:04 PM in response to FallenGuard

Same problem here... Sierra machine rejects unix commands run as root from an ard_admin user with 'Not Authorized'...


I can still run unix commands authenticated as my ard_admin user specifying another admin user on the system, but with access restricted to their privileges. Maybe this was broken all along and apple just plugged a hole, but it puts a wrinkle in many management scripts I have written to execute via unix command.


This change breaks two important things:

1. Domain Managed Authentication

Now I have to have a specific account on each Mac for this.

2. Domain Managed Privileges

I can no longer apply privileges at the domain level... via ard_admin... etc. I now have to specify these privileges on each machine and give them to a local user account.


This should be no surprise I guess seeing as how Open Directory is hidden by default in High Sierra Server...

Feb 8, 2018 12:44 PM in response to FallenGuard

Make sure root is enabled on the target system, if you need it.


IIRC, there was a security update recently that disabled root access for High Sierra systems, though I don't know if that change also ended up getting applied to earlier releases. With High Sierra at least, all systems saw root disabled as part of the remediation, irrespective of the original intended setting of root.


Try it from an ssh login and see if this is something with ARD or something more generic?


Also see if the following command works any better than the passwd command, as a potential alternative:

sudo dscl . -passwd /Users/admin newadminpassword


Or (guessing at what you might be working to resolve) if you have no other admin users available, there are sequences available to more directly reset a lost or forgotten or otherwise hosed admin password.


Consider having a second admin login available as a backdoor, rather than enabling and using root, too.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Getting "Not Authorized" when trying to send a UNIX command as root to macOS Sierra machine

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.