Coding Thread, Apple Script and user auth in Coding and Web Development; Hi all,
We currently have around 5 macs which we cant join to our 2008 domain due to software problems. ...
31st March 2010, 04:01 PM #1
Apple Script and user auth
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 ""
IDG Tech News
By ChrisCole in forum Windows
Last Post: 1st December 2009, 05:03 PM
By techie08 in forum Windows
Last Post: 16th July 2009, 01:27 PM
By Geek_of_HeathMount in forum Mac
Last Post: 5th June 2009, 09:22 AM
Last Post: 20th September 2008, 01:40 PM
Last Post: 14th February 2008, 09:18 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)