Using Applescript to Mount a Share With a Specific Username and Password
Many applications for schools, such as Renlearn's
Accelerated Reader and Scholastic's
Reading Counts, use network-based databases to record student progress. Depending on how you configure the permissions for that data, you may want to have a share point mount with a specific username and password at login. This funtion was built into Mac Manager. However, with the increased security conciousness in Mac OS X, this is not a built in function of Workgroup Manager.
But, take heart, as with skinning cats, there are other ways to mount a share point.
Step 1:
Download this Applescript template.
Open it with "Script Editor" (in the applications folder).
It should look like the image to the right. |
 |
Step 2:Modify the script to work with your server and sharepoint. Change "your.servername.com" to the DNS name or IP address of your server. Change "sharepoint" to the name of the AFP sharepoint that contains your database. Also change "username" and "password" to match an account that has the appropriate access to your database.
Step 3:
Save the script as an Application.
Select "Save As..." from the "File menu.
Name the application.
Select "Application" from the "File Format" menu.
Check the "Run Only" option.
Click the "Save" button. |

|
Step 4:
Test your application. It should mount the desired sharepoint on your desktop.
Step 5:
If the application ran successfully, copy it to the client computers that you wish to have access the database
(I recommend using Apple Remote Desktop for this).
I generally put the application in /Library/Scripts/Custom. Then, I configure a group in Workgroup Manager to run the Application at login
(add it as a login item in the "Login" Preferences)
You could also put it in the "Applications" folder, and have the students run it manually, before they launch the application that needs access to the database.