SMB 10.4 and 10.5 -- How To
SMB 10.4 and 10.5 -- How To
- Subject: SMB 10.4 and 10.5 -- How To
- From: email@hidden
- Date: Wed, 25 Jun 2008 11:48:21 -0400
Hello all:After an initial operator head space
error on my part I have not completed the logon script for mounting Windows
Server 2003 shares (both public shares and home directory shares). I have
been asked by a few members of the list to post my final scripts. Please
feel free to let me know if there is a better way to do this. I have about
four days of Apple scripting experience spread out over four months so
my skills are not the greatest.Logon Script:(*
This script mounts the faculty and student shares for Mac
clients connecting to Active
Directory servers. The script does not prompt users for
their login information and makes
an alias on the desktop
Added Home Mount for 10.4 clients on June 2008
Written by Charles Profitt June 2008
Tested Platform OS X 10.5.2*)set current_user to
(do shell script "whoami") as textset current_os to (do
shell script "uname -r") as texttell application "Finder"
if current_os = "8.11.0" then
try
do shell script ("mkdir /Volumes/UNCHome")
end try
try
do shell script ("mount_smbfs -N //<servername>/'"
& current_user & "'$ /Volumes/UNCHome")
end try
try
do shell script ("ln -s /Volumes/UNCHome /Users/'"
& current_user & "'/Desktop/Home")
end try
end if
try
do shell script ("mkdir
/Volumes/FacShare")
end try
try
do shell script ("mount_smbfs
-N //<servername>/<sharename> /Volumes/FacShare")
end try
try
do shell script ("ln
-s /Volumes/FacShare /Users/'" & current_user & "'/Desktop/FacShare")
end try
try
do shell script ("mkdir
/Volumes/StudentShare")
end try
try
do shell script ("mount_smbfs
-N //<servername>/<sharename> /Volumes/StudentShare")
end try
try
do shell script ("ln
-s /Volumes/StudentShare /Users/'" & current_user & "'/Desktop/StudentShare")
end try
end tell(*
This script mounts the faculty and student shares for Mac
clients connecting to Active
Directory servers. The script does not prompt users for
their login information and makes
an alias on the desktop
Added Home Mount for 10.4 clients on June 2008
Written by Charles Profitt June 2008
Tested Platform OS X 10.5.2*)I have also created a script to
delete the link files placed on the desktop on logout.set current_user to
(do shell script "whoami") as texttell application "Finder"
try
do shell script ("rm
/Users/'" & current_user & "'/Desktop/Home")
end try
try
do shell script ("rm
/Users/'" & current_user & "'/Desktop/StudentShare")
end try
try
do shell script ("rm
/Users/'" & current_user & "'/Desktop/FacShare")
end tryend tellI have also created a logoff script
that deletes the links from the desktopNotes: We are currently running
only one version of 10.4 so the 8.11.0 version number is valid currently...
you may need to change it or add multiple values. Also I am not familiar
enough with OS X to know if some patches increment the version number...
if they do then the script would need to be adjusted.Thanks again to everyone who offered
assistance.I hope the script will help some of
you faced with the same or similar challenge.
Charles Profitt
Sr. Network Technician
BrainBench Certified - (Master)Microsoft Security | (Master)Storage Area
Networks Concepts | (Master)Microsoft Vista Desktop Administration
75 Barker Road
Pittsford, NY 14534
Important Notice:
This communication, including any attachments, is intended only for the
use of the individual(s) or entity(s) to which it is addressed and may
contain information that is privileged, confidential and exempt from disclosure
under applicable law. If the reader of this communication is not the intended
recipient, you are hereby notified that any dissemination, distribution
or reproduction of any part of this communication in any format is strictly
prohibited. If you have received this communication in error, please notify
us immediately by replying to this communication and deleting the original
and any automatically generated copies. Thank-you for your co-operation. _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden