Exclude default root or local admin user from block command policy on macOS

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

Exclude default root or local admin user from block command policy on macOS

I created a policy to block certain command, its blocking for all user even if we run the command from MDM, is there any way to exclude root use from the block policy so the MDM can run the command

1 accepted solution

Accepted Solutions

L5 Sessionator

I've never done this before but used a few AI to get this response - not sure if it helps you - To exclude the root user from your block command policy on macOS in CyberArk Endpoint Privilege Manager (EPM), you can follow these steps:

  1. Create an Advanced Policy:
  • Go to Policies and select Create Advanced Policy.
  • Choose macOS as the platform.
  • Name your policy and select the appropriate action (e.g., Allow or Elevate).
  1. Define the Scope:
  • Under Scope, add the application group or application definition that you want to manage with this policy.
  1. Target Users and Groups:
  • Under Targets, click on Edit for Users and Groups.
  • Add the specific users or groups you want to target. Since you want to exclude the root user, you should target all other users explicitly.
  • For your local account, you can add 
  • shrisiva

 

  •  and for your IDP account, add 
  • siva.kumaran

 

  1. Exclude Computers:
  • Unfortunately, CyberArk EPM currently does not support excluding specific users directly from policies21. You can only exclude computers. Therefore, you need to ensure that the root user is not included in the targeted users.

By targeting specific users and not including the root user, you can effectively exclude the root user from the policy. This way, the MDM can run commands as the root user without being blocked by the policy.

If you need more detailed guidance, you can refer to the CyberArk documentation

1.Would you like any further assistance with this setup?

2:CyberArk Community1:CyberArk Documentation

but then i get this response below.

 

2:CyberArk Community1:CyberArk Documentation

Based on the knowledge sources provided, I understand you're trying to exclude the root user from a block command policy on macOS in CyberArk Endpoint Privilege Manager (EPM).

Currently, EPM's macOS policies have a limitation - you can only include users in policies, not exclude them. The exclusion option is only available for computers, not for users or groups. This is evident in the policy configuration structure where under Targets, you can specify users to include, but the exclusion options only apply to computers.

According to the documentation, for macOS policies:

"Currently, users and groups can only be included in macOS policies, not excluded." macOS policies

To work around this limitation, you have two potential approaches:

  1. Create an Allow policy for root user: Create a higher priority Allow policy that specifically targets the same commands but is scoped to the root user. This policy would override your block policy for the root user.
  2. Target specific users in your Block policy: Instead of trying to exclude the root user, modify your Block policy to only target specific users (not including root). This way, the root user won't be affected by the policy.

For your specific scenario with local accounts, you would need to specify the local username in the policy targeting. If you're using both local accounts and IdP accounts, you can target both types in your policies.

For more information on targeting users in macOS policies, you can refer to the macOS policies documentation.

 

View solution in original post

15 REPLIES 15

L5 Sessionator

I believe you would need to go to Policies - select Create Advanced policy and select MACOS, decide on the name of the policy and select Allow or Elevate depending on your needs, then you can add users or devices, then I assume you have already created an application and link it to this advanced policy. You have now targeted the policy -https://docs.cyberark.com/epm/25.3.0/en/content/policies/macospolicies-newui.htm.

L4 Transporter

I believe you would need to go to Policies - select Create Advanced policy and select MACOS, decide on the name of the policy and select Allow or Elevate depending on your needs, then you can add users or devices, then I assume you have already created an application and link it to this advanced policy. You have now targeted the policy -https://docs.cyberark.com/epm/25.3.0/en/content/policies/macospolicies-newui.htm.

L5 Sessionator

Field_Content_versions_oct20__068Vy00000NTmdVIAT.pngField_Content_versions_oct20__068Vy00000NTfdfIAD.pngField_Content_versions_oct20__068Vy00000NTnt2IAD.png

L4 Transporter

Field_Content_versions_oct20__068Vy00000NTmdVIAT.pngField_Content_versions_oct20__068Vy00000NTfdfIAD.pngField_Content_versions_oct20__068Vy00000NTnt2IAD.png

Thank @Touseef-ur rehman​ , I have created Application group and added it to policy, I want to Exclude particular (root user) from the policy.

In policy, there is no option to exclude "user". I want to exclude certain user account which is common on all devices.

Field_Content_versions_oct20__068Vy00000NTTuKIAX.png

L5 Sessionator

Im assuming you got a block policy already working but its blocking everyone right so i guess you would want to go into Exclude from Policy section in the Advanced Policy and click on Add for Computers in this Set and add the computers by clicking on the Add Computers button - apologies if that is not what your question was - if it's a a Intune/Jamf policy I think this will only work if the cyberark is picking up the events in the first place. Field_Content_versions_oct20__068Vy00000NTvImIAL.pngField_Content_versions_oct20__068Vy00000NTqh8IAD.png

L4 Transporter

Im assuming you got a block policy already working but its blocking everyone right so i guess you would want to go into Exclude from Policy section in the Advanced Policy and click on Add for Computers in this Set and add the computers by clicking on the Add Computers button - apologies if that is not what your question was - if it's a a Intune/Jamf policy I think this will only work if the cyberark is picking up the events in the first place. Field_Content_versions_oct20__068Vy00000NTvImIAL.pngField_Content_versions_oct20__068Vy00000NTqh8IAD.png

Is there any way to exclude a user account instead of computer?

I have added below executable command to block. CyberArk have Target as Computers and Users, but in Exclude it have only Computer. I need to allow the same executable command from Jamf policy (in script which will un as roo)In this case how I can achieve my goal?Field_Content_versions_oct20__068Vy00000NULwEIAX.png 

L5 Sessionator

Sorry just had to rethink this - If you target the policy by clicking on Edit for Users and Groups under Targets then by definition you're applying the policy to the users you want so [email protected] that means everyone else with epm is excluded from getting the policy. so you don't need to add users to the exlcude part, usually you do that when you have a policy you want to apply to all but exclude some users Field_Content_versions_oct20__068Vy00000NTiCOIA1.pngField_Content_versions_oct20__068Vy00000NTyGXIA1.png

L4 Transporter

Sorry just had to rethink this - If you target the policy by clicking on Edit for Users and Groups under Targets then by definition you're applying the policy to the users you want so [email protected] that means everyone else with epm is excluded from getting the policy. so you don't need to add users to the exlcude part, usually you do that when you have a policy you want to apply to all but exclude some users Field_Content_versions_oct20__068Vy00000NTiCOIA1.pngField_Content_versions_oct20__068Vy00000NTyGXIA1.png

L4 Transporter

Hi @Shri Sivakumaran C​ 

 

It seems that @Touseef-ur rehman​ provided an answer to your question. Could you kindly let us know if this solution helped?

If so, please mark the answer as 'Select as Best' to assist other community members.

 

Thank you, Liad

Hi @Touseef-ur rehman​ 

Thanks for your reply, We are using Mac device with local user account it not binded with AD or ldp. Also the "root" account is part of the local account. in this case if I use ./Username it will impact root account also right?

 

on my device local account is created as shrisiva but my idp account is siva.kumaran, what I have to mentioned for scope/target user?

L5 Sessionator

I've never done this before but used a few AI to get this response - not sure if it helps you - To exclude the root user from your block command policy on macOS in CyberArk Endpoint Privilege Manager (EPM), you can follow these steps:

  1. Create an Advanced Policy:
  • Go to Policies and select Create Advanced Policy.
  • Choose macOS as the platform.
  • Name your policy and select the appropriate action (e.g., Allow or Elevate).
  1. Define the Scope:
  • Under Scope, add the application group or application definition that you want to manage with this policy.
  1. Target Users and Groups:
  • Under Targets, click on Edit for Users and Groups.
  • Add the specific users or groups you want to target. Since you want to exclude the root user, you should target all other users explicitly.
  • For your local account, you can add 
  • shrisiva

 

  •  and for your IDP account, add 
  • siva.kumaran

 

  1. Exclude Computers:
  • Unfortunately, CyberArk EPM currently does not support excluding specific users directly from policies21. You can only exclude computers. Therefore, you need to ensure that the root user is not included in the targeted users.

By targeting specific users and not including the root user, you can effectively exclude the root user from the policy. This way, the MDM can run commands as the root user without being blocked by the policy.

If you need more detailed guidance, you can refer to the CyberArk documentation

1.Would you like any further assistance with this setup?

2:CyberArk Community1:CyberArk Documentation

but then i get this response below.

 

2:CyberArk Community1:CyberArk Documentation

Based on the knowledge sources provided, I understand you're trying to exclude the root user from a block command policy on macOS in CyberArk Endpoint Privilege Manager (EPM).

Currently, EPM's macOS policies have a limitation - you can only include users in policies, not exclude them. The exclusion option is only available for computers, not for users or groups. This is evident in the policy configuration structure where under Targets, you can specify users to include, but the exclusion options only apply to computers.

According to the documentation, for macOS policies:

"Currently, users and groups can only be included in macOS policies, not excluded." macOS policies

To work around this limitation, you have two potential approaches:

  1. Create an Allow policy for root user: Create a higher priority Allow policy that specifically targets the same commands but is scoped to the root user. This policy would override your block policy for the root user.
  2. Target specific users in your Block policy: Instead of trying to exclude the root user, modify your Block policy to only target specific users (not including root). This way, the root user won't be affected by the policy.

For your specific scenario with local accounts, you would need to specify the local username in the policy targeting. If you're using both local accounts and IdP accounts, you can target both types in your policies.

For more information on targeting users in macOS policies, you can refer to the macOS policies documentation.

 

L4 Transporter

I've never done this before but used a few AI to get this response - not sure if it helps you - To exclude the root user from your block command policy on macOS in CyberArk Endpoint Privilege Manager (EPM), you can follow these steps:

  1. Create an Advanced Policy:
  • Go to Policies and select Create Advanced Policy.
  • Choose macOS as the platform.
  • Name your policy and select the appropriate action (e.g., Allow or Elevate).
  1. Define the Scope:
  • Under Scope, add the application group or application definition that you want to manage with this policy.
  1. Target Users and Groups:
  • Under Targets, click on Edit for Users and Groups.
  • Add the specific users or groups you want to target. Since you want to exclude the root user, you should target all other users explicitly.
  • For your local account, you can add 
  • shrisiva

 

  •  and for your IDP account, add 
  • siva.kumaran

 

  1. Exclude Computers:
  • Unfortunately, CyberArk EPM currently does not support excluding specific users directly from policies21. You can only exclude computers. Therefore, you need to ensure that the root user is not included in the targeted users.

By targeting specific users and not including the root user, you can effectively exclude the root user from the policy. This way, the MDM can run commands as the root user without being blocked by the policy.

If you need more detailed guidance, you can refer to the CyberArk documentation

1.Would you like any further assistance with this setup?

2:CyberArk Community1:CyberArk Documentation

but then i get this response below.

 

2:CyberArk Community1:CyberArk Documentation

Based on the knowledge sources provided, I understand you're trying to exclude the root user from a block command policy on macOS in CyberArk Endpoint Privilege Manager (EPM).

Currently, EPM's macOS policies have a limitation - you can only include users in policies, not exclude them. The exclusion option is only available for computers, not for users or groups. This is evident in the policy configuration structure where under Targets, you can specify users to include, but the exclusion options only apply to computers.

According to the documentation, for macOS policies:

"Currently, users and groups can only be included in macOS policies, not excluded." macOS policies

To work around this limitation, you have two potential approaches:

  1. Create an Allow policy for root user: Create a higher priority Allow policy that specifically targets the same commands but is scoped to the root user. This policy would override your block policy for the root user.
  2. Target specific users in your Block policy: Instead of trying to exclude the root user, modify your Block policy to only target specific users (not including root). This way, the root user won't be affected by the policy.

For your specific scenario with local accounts, you would need to specify the local username in the policy targeting. If you're using both local accounts and IdP accounts, you can target both types in your policies.

For more information on targeting users in macOS policies, you can refer to the macOS policies documentation.

 

  • 1 accepted solution
  • 216 Views
  • 15 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!