cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1703
Views
0
Helpful
3
Replies

Trusted endpoint enrollment script failure

Justin_Brown
Level 1
Level 1

We’ve been using a bash script to run the Duo trusted endpoint python script pushed to Mac endpoints through Work Space One (Airwatch). It has been running as expected until a couple of weeks ago. The bash script works as it should firing off the the Duo enrollment script. The Duo enrollment python script fails, it will not run as root with sudo -u, but it had been.
# get current endpoint user CURRENTUSER=$(/usr/bin/stat -f '%Su' /dev/console) # set download directory DUO_INSTALL="/tmp/Duo" # execute as current endpoint user sudo -u "${CURRENTUSER}" /usr/bin/python "${DUO_INSTALL}"/duo_cert_enrollment-3.5.py
This is the error from the logs:
2020-03-30 11:15:28] /tmp/Duo/Catalina_dng_script_installer_script.sh:29 sudo -u ihtest /usr/bin/python /tmp/Duo/device_cert_script.py Could not switch to audit session 0x186d4: 1: Operation not permitted Could not switch to audit session 0x186d4: 1: Operation not permitted Could not switch to audit session 0x186d4: 1: Operation not permitted Could not switch to audit session 0x186d4: 1: Operation not permitted === Performing preinstall checks... === No keychain password found. Creating... === Generating a password for the duo-auth keychain... === Failed to add new password to keychain with status code: 1 === Failed to create keychain password. === Preinstall checks failed. Exiting
Any insight as to why this is failing? I currently have a ticket open with VMWare to see if they can address this as well.

3 Replies 3

MelMaster
Level 1
Level 1

Hi Justin, Did you get this resolved?

Amy2
Level 5
Level 5

Hi @Justin_Brown, you need to be the local user in order to successfully run the Trusted Endpoints script on macOS. If you are logged in as root, the script will fail. More info can be found in this knowledge article. Sorry it took so long to get you this answer!

@MelMaster, are you running into a similar issue?

Yes, I get this error:
When I sudo to root then issue this command sudo /usr/bin/python duo_cert_enrollment-3.5.py it fails with /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'duo_cert_enrollment-3.5.py': [Errno 2] No such file or directory .

I haven’t tried making the user an admin. I should try that.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links