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
Hi all,
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
end if
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
end if
set share to "smb://" & username & ":" & pass & "@" & server & "/" & username & ""
mount volume share
end tell
set username to ""
set pass to ""
Many Thanks
Jamie
-
-
IDG Tech News
SHARE: 
Similar Threads
-
By ChrisCole in forum Windows
Replies: 9
Last Post: 1st December 2009, 05:03 PM
-
By techie08 in forum Windows
Replies: 10
Last Post: 16th July 2009, 01:27 PM
-
By Geek_of_HeathMount in forum Mac
Replies: 0
Last Post: 5th June 2009, 09:22 AM
-
Replies: 2
Last Post: 20th September 2008, 01:40 PM
-
Replies: 45
Last Post: 14th February 2008, 09:18 AM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules