hey all,
i'm trying to utilize: /System/Library/CoreServices/ManagedClient.app/Contents/Resources/createmobileaccount -n
to prompt the user for the said parameter "-n" by using Self Service.
Currently what i have is:
#!/bin/sh
un=`/usr/bin/osascript <<EOT
tell application "System Events"
activate
with timeout of 600 seconds
set un to text returned of (display dialog "Please type in your mobile username" default answer "" with icon 2)
end timeout
end tell
EOT`
/System/Library/CoreServices/ManagedClient.app/Contents/Resources/createmobileaccount -n "$un"
i've also tried to use a simple bash script to prompt via Terminal
#!/bin/bash
# Ask the user for login details
username=$(read -r -p "Enter your Mobile Account Username: ")
/System/Library/CoreServices/ManagedClient.app/Contents/Resources/createmobileaccount -n "$username"
but get the error: Enter your Username: test *user name "" was not found: 0 ((null))
