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

nicoisconfusion

macrumors newbie
Original poster
Sep 27, 2011
15
0
Hi guys i was wondering if anyone knew the command to mount a DFS share in 10.7
I dont mean to get the home drive to automatically map. Just to run a command from terminal to map a location

something like

mount -t dfs://dfsname/foldername/foldername

If any body could let me know i would appreciate it. There is NOTHING on the net about it yet
 
I assume you are talking about Micorsoft's dfs extension to SMB/CIFS. If so then you are looking for 'mount_smbfs'. In 10.7 the SMB/CIFS client can handle resolving DFS shares to the underlying SMB servers. Previously you had to do the resolution yourself.

And there is pleanty out there, you just don't know what to look for.
 
Yeah thanks for that. I found a link for mount_smbfs and it worked a treat..

Th last thing is was wondering is can you use a mounted drive as a variable? In bash?

Eg something like this
mkdir /Volumes/anything
mount_smbfs //dfsshare/folder/folder /Volumes/anything

Mounteddrive="??????"

What can I use in there. Once mounted is /Volumes/anything still valid or is it removed once that path is mounted to it.

I want it as a variable so that I can symlink to it.
Could I do
Mounteddrive="/Volumes/anything"

Then if I want to do a symlink just use
ln -s /Something/Something $Mounteddrive/Something
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.