[MacTUG] Mapping a Network Drive at Login

Marlon A. Griffith m3griffi at engmail.uwaterloo.ca
Fri Mar 2 15:59:14 EST 2012


Thanks Guillermo

I like that one that gets the N drive from nexus, that is pretty cool.
Hopefully as students migrate to the 'fileu' server (hopefully aliased as
something that does not sound so rude) that will be less needed, but
really neat nonetheless.

Currently I have my golden-triangle mounting their n-drive (with Active
Directory saying where it is and what the credentials need to be and Open
Directory telling the lab mac that it should do this), but I do have an
emergency backup script to remount the drive, and it looks a lot like your
'hardwired' script:

tell application "Finder"
	activate
	set UserName to (do shell script "whoami")
	try
		mount volume "smb://" & UserName & "@envfile.uwaterloo.ca/Accounts"
	end try
	try
		if not (item ("Accounts-" & UserName) of the desktop exists) then make
new alias file to folder UserName of disk "Accounts" at desktop with
properties {name:"Accounts-" & UserName}
	on error
		display dialog "I cannot find your user directory on the Accounts Server
or you typed the incorrect password"
	end try
end tell

One of thing I added as getting it to make an alias of the user's account
on the desktop so that it is easier for theme to save stuff to it.


Don


More information about the MacTUG mailing list