Jump to content

Recommended Posts

Posted

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • 12 When would you like EduGeek EDIT 2025 to be held?

    1. 1. Select a time period you can attend


      • I can make it in June\July
      • I can make it in August\Sept
      • Other time period. Please comment in the thread what works for you
      • Either time

×
×
  • Create New...