How do properly allow all sudo commands on macos?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

How do properly allow all sudo commands on macos?

L1 Bithead

Im trying to simply allow all sudo commands on MacOS. I followed the document located here:

 

https://community.cyberark.com/s/article/macOS-EPM-Create-Sudo-Elevate-All-Commands-Policy

 

Ive even tried adding /usr/bin/* or /usr/bin/sudo but same results. I get the justification prompt in terminal and I enter that but still says that the execution was blocked because the user doesnt have admin rights. Any ideas how to allow Sudo commands?

5 REPLIES 5

Hey @Cody Stevens​ 

The article should do it. Can you try adding the policy from the event management page after executing the sudo on Mac OS. You can refer to this - https://docs.cyberark.com/epm/latest/en/content/epm/server%20user%20guide/eventsmanagement.htm#Moreeventmanagementactions

Hope this helps!

L5 Sessionator

Hi @Cody Stevens​ ,

 

Make sure you selected in the definition type "Sudo Command" (and not Executable).

In general, setting wildcard * should do the work but gave in mind, that it's not very secured.

 

Field_Content_versions_oct20__068Vy00000rTszQIAS.png 

Thanks,

Arik.

 

Thanks Arik. I have it already setup like this though. I even have a couple extra definitions setup. Here's what I have setup (this is for full admin). I know it's not fully secure but I'm at this point just trying to get it to work then I'll try to fine tune it. My user account is in the AD group for this policy.

 

Field_Content_versions_oct20__068Vy00000rYSZkIAO.pngSo you can see here I have multiple ways of doing it added. But when I try to run a sudo command on the mac it does this. Keep in mind this mac is bound to AD as well. I do get the justification message so I know Cyberark is communicating.. but still doesnt allow it.

Field_Content_versions_oct20__068Vy00000rZfGLIA0.pngLet me know any suggestions. This policy has been set for a few days now, so I know it's synced by now as well.

The thing is what shows up in Event management is the command that came after the sudo command. For example I'm running sudo dsconfigad --show so what I see in event management is in the screenshot below. But I want all sudo to be allowed for now. Not just certain commands. Im not sure why doing sudo command matches wildcard * wont accomplish this.

Field_Content_versions_oct20__068Vy00000rZWmZIAW.pngAlso. I went in and added this to the policy just as a test. Did the same command: sudo dsconfigad --show and it's still giving the error that I dont have admin rights. I did it 5 mins ago, not sure how long it takes to sync, but I went and hit request settings but still no go.

Hi @Cody Stevens​ ,

 

The definition seems OK.

 

For the testing purpose I would first remove all the targets (users and groups) from the policy so it will be targeted only to a specific computer and for all users.

If it still doesn't work please open a support case.

If it does work, it means something with the targeting is not set right...

 

Keep us posted,

Arik.

  • 306 Views
  • 5 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!