Solved

Mount network drive on users desktop based on user name

Posted on 2011-09-20
2
678 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 40

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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
address book on outlook 2016 mac 7 74
Do I Really Need to “Eject” USB Drives? 10 82
2010 MacBook Pro super slow with software problems 5 58
pdf to excel 8 69
If you are using Mac OS X and have a large number of login items set up in accounts, under system preferences, you may find that your computer is sluggish and unresponsive during startup until everything is done launching. Another problem that a…
Syslogd is a utility that traps and logs messages sent by running processes. It is configured with the syslog.conf file, which consists of lines containing a pair of fields: "the selector field which specifies the types of messages and priorities to…
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 …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 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