network home folder script

catfeetstop
Contributor II

We're having a lot of permissions issues on our Windows server that hosts our network home folders. This is causing many issues with mounting the network homes through the AD plugin on our Macs. Also, because of the folder structure we use on our Windows server, an annoying folder called "user" gets mounted on the desktop instead of the actual network home. I don't exactly know if that makes sense but at this point I just want to turn off the "Use UNC path from AD to derive network home location" option in the AD plugin and make a policy that will mount the user's network home upon login. I know it's weird but the path to our user's network home folder is smb://facstaff/user/users/$shareuser. Here's one of the scripts I tried:

#!/bin/sh
shareuser="$3"
server="facstaff"
mkdir /Volumes/$shareuser
jamf mount -server $server -share user/users/$shareuser -type smb -username $shareuser -password

Obviously, I'm still pretty new to scripting. This script seems so close to working! I think the problem is that the jamf mount command tries to mount the drive at /Volumes/user/users/$shareuser. How can I get it to mount the drive at /Volumes/$shareuser? I've also tried using the mount_smbfs command but have had even more issues with that.

Hopefully this isn't too confusing. I just need a script that will mount smb://facstaff/user/users/$shareuser upon login. Any ideas?

Jamie Bell
Apple Technology Administrator
The Westminster Schools
Ph: 404-609-6345

3 REPLIES 3

bentoms
Release Candidate Programs Tester

i've got this most of this working.. but not through the JAMF binary.. in an applescript app instead..  http://macmule.com/2011/08/07/how-to-map-drives-printers-based-on-ad-group-membership-on-osx/

i think the below isn't mapping as the user as it's not got the users pass?

justinrummel
Contributor III

Is this something new with your Lion clients? see:
http://support.apple.com/kb/HT4829
On Tue, Aug 30, 2011 at 8:43 AM, Jamie Bell <JamieBell at westminster.net>wrote:

- Justin

catfeetstop
Contributor II

Sorry for not responding to this, Justin. We're actually still using Snow Leopard.

Ben Toms, your Applescript is awesome! It's exactly what I need and works perfectly, thank you so much!

Jamie Bell
Apple Technology Administrator
The Westminster Schools
Ph: 404-609-6345