MDS Script not working

Hi All,

I’m trying to run this script but its not running:

–get a domain admin user name and password which will be used to bind

set user_name_dialog to display dialog "Enter a domain admin account name: " default answer “” buttons {“Next”} default button “Next”

set user_name to text returned of user_name_dialog

set user_password_dialog to display dialog "Enter the domain admin password. " & return & return & “WARNING: If you are running Panther (MacOS 10.3), your input will be displayed in this box as clear text.” default answer “” buttons {“Next”} default button “Next” with hidden answer

set user_password to text returned of user_password_dialog

–We want to verify the computer name is proper before we bind

set currentName to ( do shell script “scutil --get ComputerName”)

set computerName to text returned of ( display dialog “Verify the computer name is correct” default answer currentName)

–Start binding

– Change AD.DOMAIN.COM to your AD domain

– Also change DC=ad,DC=domain,DC=com

do shell script "dsconfigad -f -a " & computerName & space & “-domain domain.ca -u " & user_name & " -p " & user_password & " -ou “CN=Computers,DC=domain,DC=com”” with administrator privileges

display dialog ( do shell script “dsconfigad -show” with administrator privileges)

I ran the script and works like a charm, but when adding it to MDS it doesn’t run.
I changed it to be executable (using chmod +x) but still not working.

any ideas? because I’m trying to use MDS as my company MAC deploy server and this is kind of a deal breaker!

Thanks

This appears to be an applescript that shows a UI. It would be better to prompt the user using variables in the MDS workflow, then pass the results of those prompts to a shell script. If you have a support contact, I can write the script up for you.

tim