We currently have around 5 macs which we cant join to our 2008 domain due to software problems. However users still need to be able to connect to their network drive. We have created this apple script which connect them to their network drive, which works fine, as long as they enter their username correctly. If they don't enter there username correctly, the script wont allow anyone else to connect as it isn't clearing the variables properly. I was wondering if there was a way of clearing these variables or in some other way of checking the user name against the AD. The script is as follows
property username : ""
property pass : ""
property domain : "domain"
property server : "server name"
property share : ""
tell application "Finder"
if username is "" then
set dialog_1 to display dialog "Enter username:" default answer ""
set the username to the text returned of dialog_1
if pass is "" then
set dialog_2 to display dialog "Enter password:" default answer "" with hidden answer
set the pass to the text returned of dialog_2
set share to "smb://" & username & ":" & pass & "@" & server & "/" & username & ""
mount volume share
set username to ""
set pass to ""
There are currently 1 users browsing this thread. (0 members and 1 guests)