Mount network drive on users desktop based on user name

I need to give users access to their network folder on their desktops. Currently the users share folder is mounted to their dock when they log in, although I am not sure how it got there. I did not setup this network and according to WGM this dock item is not being controlled by it. The users authenticate to an AD server, which has executes a bat file for the users who log into the windows machines to mount there users network folder. This should not effect the apple computers tho.

So basically what I need is that dock item to end up on the desktop. Unfortunately programs, such as photoshop, will not allow you to save directly to that mounted drive since it is in the dock. It requires you to click the server name then the navigate through all the sub folders (around all the other users folder) to find your own folder.

So basically I need a folder that belongs to USER1 mounted on the desktop of USER1 when logged in and a folder for USER2 to be mounted on the desktop of USER2 when logged in etc....


Thanks


o and the server is 10.5.8 the clients in question are 10.6.8
LVL 1
bbayachekAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Eoin OSullivanConsultantCommented:
Sounds like you need an AppleScript to auto mount the network share .. you could prompt for the details to test it first .. the following AppleScript should mount the user_name folder.
Edit the following code in Script Editor in OSX to replace the SERVERNAME/PATH with the correct path to your network folder containing the user home folders.

set user_name to ""
set Dialog_1 to display dialog "Please enter your user name" default answer "abc0001"
set the user_name to the text returned of Dialog_1
end
set pass_word to ""
set Dialog_2 to display dialog "Please enter your password" default answer "" with hidden answer
set pass_word to the text returned of Dialog_2
end

tell application "Finder"
try
mount volume "smb://" & user_name & ":" & pass_word & "@SERVERNAME/PATH/" & user_name & ""
end try
end tell

Open in new window


Then you could replace the 2 dialogs that prompt for the username & password and either just pass the user_name (in which case the user would have to re-enter the password to complete the mounting of their drive on logon) or hard-code the password for that user.

To get the user_name of the currently logged in user use the following line
set user_name to do shell script "whoami"

Open in new window

Unfortunately you cannot get the pass_word this way.

Save the AppleScript as an Application or Automator Script and put it in the login items or set as a startup script using a tool such as Lingon

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bbayachekAuthor Commented:
Hmm, that may not be a horrific idea. Turns out apple is telling me I need to have the sharepoints setup up in order for work group manager to do this for me. Unfortunately our windows server is already setup and our current user folders are on a windows server. I am not sure if I can setup the windows folders to the mac server as sharepoints. I am going to look further into this. Ofcourse apple would not touch that with me since it is windows. I will try that script tho, It may be a good interim solution or the solution. I will get back to you with what I find.


THANKS!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Mac OS X

From novice to tech pro — start learning today.