Hello,
For time to time we might ask user to prompt his password if no workaround is available depending on scenarios.
When deploying below script, user is not forced to type his password. He can just drag the prompt windows aside and continue working.
Is there a way to:
1) display the prompt windows on full screen
or/&
2) if not answered, user cannot continue working as per mac software installer "when admin pwd must be put"
#!/bin/bash
user=$(ls -l /dev/console | awk '{ print $3 }')
PROMPT_TITLE="Authentication Needed"
Logo="/Users/Shared/loreal.jpeg"
echo "Prompting $user for their Mac password..."
USER_PASS=$(sudo -u $user /usr/bin/osascript -e 'display dialog "Please, type your Password to start the xxxx operation:" default answer "" with hidden answer buttons {"OK"} default button 1' -e 'text returned of result')
exit 0