Im hoping to make a Self Service script with OSAscript callouts/dialogs to make it easier for users to sync their FV2 and AD passwords. the script successfully passes the value of the "shortname" to the first command but the add command has 2-3 pop-ups and when run thru self service nothing happens.
#!/bin/sh
!/bin/bash
USERNAME=osascript -e 'set T to text returned of (display dialog " Enter shortname of User to Sync FV2" buttons {"Cancel", "OK"} default button "OK" default answer "")'
fdesetup remove -user $USERNAME
sleep 5
fdesetup add -usertoadd $USERNAME