Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rolfharris

macrumors newbie
Original poster
Sep 17, 2008
7
0
Hi guys

Can somebody help me out here. I am totally new to to Macworld so be nice.

I have successfully binded the machines to Active directory and students are able to login to the active directory domain.

The problem that i am having is, i want to be able to map 2 drives (as they would see when they login to a windows machine)

Under windows the syntax is net use H: \\servername\%username%$

What i want to know is, what is the osx equivalent and where to put it. Also what extension should the script be saved as.

Any help is much appreciated.

Doing a certification course at the end of the month so hopefully this will be last noob request

Cheers
 

walnuts

macrumors 6502a
Nov 8, 2007
598
357
Brooklyn, NY
Did you try this?

In finder, select Go -> Connect to Server (command-K)

Then type in "smb://[address of networked drive]/server name"

You will be prompted for login and password.
 

rolfharris

macrumors newbie
Original poster
Sep 17, 2008
7
0
Hi Walnuts,

I have done that alright, only problem is that they will be students logging in so i need it to be done automatically.

Any ideas, i was thinking of a script that runs each time a student logs in, similar to the way it is on the windows machine.
 

walnuts

macrumors 6502a
Nov 8, 2007
598
357
Brooklyn, NY
Well, I have really almost no knowledge of applescript, but I did tool around with something like this:

set mountedvolumes to list disks

if mountedvolumes contains "<Servername>" then
else
mount volume "smb://xxx.xxx.xx.x/<Servername>"

end if


First it checks if the drive is already mounted (this is for my laptop that I bring back and forth, so it isn't a startup script, and sometimes I mount individual drives first, and then run my script to mount all of the drives). I'm not even sure if the checking bit works.

However, I know the second bit does- the "mount volume" command does the trick.

Good luck!
 

plinden

macrumors 601
Apr 8, 2004
4,029
142
You can add the smb://... as a Login Item, but you have to connect manually the first time.

So, using the Go -> Connect to Server option in Finder, get the share mounted on your Desktop. Then open Accounts, select the logged in account, Login Items, and drag the mounted share from the Desktop.

As long as the share is accessible, it will be automounted on login.

It would have to be added for all accounts, but you may be able to work with the Login Items Preferences file, which lives in ~/Library/Preferences/com.apple.loginitems.plist ... I haven't tried that though so I'm not sure if you can just copy the plist file across.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.