[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Mount network drive on users desktop based on user name

Posted on 2011-09-20
2
Medium Priority
?
710 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 41

Accepted Solution

by:
Eoin OSullivan earned 1500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
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 …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

656 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