Solved

Mount network drive on users desktop based on user name

Posted on 2011-09-20
2
661 Views
1 Endorsement
Last Modified: 2013-11-11
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
1
Comment
Question by:bbayachek
2 Comments
 
LVL 39

Accepted Solution

by:
Eoin OSullivan earned 500 total points
ID: 36581954
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
 
LVL 1

Author Comment

by:bbayachek
ID: 36892034
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

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Firefox freezing mac 10 97
Mac and Windows domain 6 97
Using wd my cloud with a mac to backup 17 50
Load Mac OS 10.12 Sierra within Windows virtual machine 8 70
If you other experts are anything like me you are always looking into and testing out new features. While I was doing some research one day I ran across an app that I installed on my Mac and used as a security system. Mac OS X: SecureHome uses your …
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now