Here in my department we use a samba shares server as storage space for employees. For the employees that use Apple machines, we are trying to use an AppleScript application that will obtain the users username and password, then using them to mount the drives. The problem arises when a user enters a password that contains escape characters; for example abcdefg/. Here is the dialog code that sets the variables for username and password:
set user_name_dialog to display dialog "Enter your User ID: " default answer "" buttons {"Next"} default button "Next"
set user_name to text returned of user_name_dialog
--this line prompts the user for their password and sets the returned result as the variable "user_password"
set user_password_dialog to display dialog "Enter your 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
And here is the shell script line that is ran for mounting a drive:
do shell script "mount -t smbfs //" & user_name & ":" & user_password & "@SOME IP ADDRESS/SOME FOLDER/ /SOME MOUNT POINT/" & user_name & "-SOME SHARE"
Now I know from a little research that it could be something as simple as an extra pair of quotes somewhere, I've even tried
quoted form of
with no luck whatsoever. The error message I get when entering a string with a escape character is as such:
error "mount_smbfs: server connection failed: No route to host" number 68
Any help would be GREATLY appreciated as my experience with AppleScript is very limited.