FileVault2_Scripts icon indicating copy to clipboard operation
FileVault2_Scripts copied to clipboard

"No user interaction allowed" on Mojave

Open ghost opened this issue 7 years ago • 5 comments

the reissueKey.sh is not working in 10.14.x Mojave, completing with an error:

Script result: Prompting <user> for their login password.
8:364: execution error: No user interaction allowed. (-1713)
User Canceled

I attempted to add sudo -u ${userName} before the osascript call https://github.com/jamf/FileVault2_Scripts/blob/master/reissueKey.sh#L139 but that did not work.

ghost avatar Jan 25 '19 20:01 ghost

I would like to know the resolution as well

salisfy avatar Feb 23 '19 02:02 salisfy

JAMF support recommended using this script: https://github.com/homebysix/jss-filevault-reissue. I made a couple of changes, one was to remove the LOGO because I didn't want to send out an image to all our users. Ultimately, the script worked fine and requires two inventory updates. You can have the users run sudo jamf recon to force a second inventory update otherwise you will have to wait until the next day as JAMF doesn't allow setting an inventory update period of less than 1 day.

ghost avatar Feb 25 '19 16:02 ghost

This can be fixed by adding "/bin/launchctl asuser $userName" before the oascripts calls. I''d make a pull request but there's some other issues I want to work out first.

trice81384 avatar Mar 08 '19 17:03 trice81384

This can be fixed by adding "/bin/launchctl asuser $userName" before the oascripts calls. I''d make a pull request but there's some other issues I want to work out first.

Where exactly do you add "/bin/launchctl asuser $userName".

I added it before https://github.com/jamf/FileVault2_Scripts/blob/master/reissueKey.sh#L139 and it still didn't work.

ooshnoo avatar Jul 08 '20 18:07 ooshnoo

@ooshnoo I added it before all of the AppleScript calls. Basically before anything that starts with "/usr/bin/osascript" I did find that I got better results by using the User's id instead of the user name but you just have to get that first. Something like userID=$(id -u "$userName") Then just change userName to userID

trice81384 avatar Jul 13 '20 13:07 trice81384