Posted on 10-31-2013 06:08 PM
Hello,
I've downloaded the mountNetworkShare.sh and set it up as a login policy for users but it doesn't seem to be mounting the share so I checked the logs and it seems to run without failing, this is the log message:
***
Executing Policy Map MacShares...
Running script mountNetworkShare.sh...
Script exit code: 0
Script result: Volume name will be created as Students... Removing Empty Directory: /Volumes/Stuents... Attempting to mount afp dsc-macsrv/Students using test2008's kerberos ticket... - 206 com.jamfsoftware.mapdrive.Students Unloading com.jamfsoftware.mapdrive.Students... Loading com.jamfsoftware.mapdrive.Students...
***
These are the variables I've set
# HARDCODED VALUES SET HERE
shareUsername="$3"
authType="kerberos"
password=""
mountType="afp"
share='afp://dsc-macsrv/Students'
I am currently using Casper 9.12 and my mac labs are running OSX 10.8.5
Has anyone come across this issue and found a solution to it?
Any help would be greatly appreciated
Posted on 10-31-2013 06:51 PM
is kerberos working correctly?
Posted on 10-31-2013 07:18 PM
I believe so. I can manually mount that share once I am logged on as the user
Posted on 10-31-2013 11:07 PM
@SMC if you run the script manually as a student, does it work then?
Posted on 11-01-2013 02:26 AM
To be honest, I never had much joy with that script. I gave up and massively rewrote it to something far simpler. (It works in our environment due to how we segregate the departments out).
Posted on 11-05-2013 02:07 PM
@franton I ran your script but noticed that it failed upon logon so I tried to run it manually logged in as a student and got the following message:
"<username> is not in the sudoers file. This incident will be reported"
I also tried to run it without the sudo -u and got:
"Mounting to /Volumes/Students 1...
There was an error mounting the file server . Will attempt again.
Mounting to /Volumes/Students 1...
There was an error mounting the file server . Giving up."
Posted on 11-05-2013 02:13 PM
That's because you have spaces in your share name. You'll probably have to "quote" those out.
Posted on 11-05-2013 02:13 PM
This is where I usually start to flog my AppleScript alternative: http://macmule.com/2011/09/08/how-to-map-drives-printers-based-on-ad-group-membership-on-osx/
Posted on 11-05-2013 02:17 PM
There's definitely no spaces in my server or share name:
sudo -u test2008 /usr/sbin/jamf mount -server "dsc-macsrv.smc.local" -share "Students" -type "afp"
Posted on 11-05-2013 02:43 PM
You got issues. The script is meant to be run from your Casper management account (root level) but taking the current logged in user from Casper and running the mount command as that.
It gets round having to run the jamf command as root but needing the volume mount for a specific user. I'd check to see if your computer has your management account present and it has admin rights.
Posted on 11-05-2013 02:46 PM
Is there already a share called "Students" mounted?
Posted on 11-05-2013 02:51 PM
I found in 10.7 and above using a configuration profile was better for share mounts than the script.
Posted on 11-05-2013 02:57 PM
@franton - All casper managed devices have an admin account which they get managed by and I even tried to sudo run it with that account but got the same error.
@bentoms I haven't already mounted that 'Students' share yet but it does work when I manually mount it
@pblake I'm unable to user config profiles yet due to network restrictions so that why I'm trying to find another way of mapping these shares
Posted on 11-05-2013 03:01 PM
SMC, I was wondering as it seemed to be mounting "Students 1."
Posted on 11-05-2013 03:48 PM
@bentoms It tried to create 'Students 1' because there was an existing 'Students' folder in /Volumes so I deleted it.
I have the /Volumes location opened so when I ran that mount command I could see for a brief second the 'Students' folder get created but then disappears.
Posted on 11-06-2013 08:49 PM
@bentoms on that link you posted it says :To create the LaunchAgent, copy the below. Replace APPLICATIONNAME with the name of your AppleScript application & save as com.APPLICATIONNAME.plist in /Library/LaunchAgents/ with 755 permissions. NOTE: Replace [ with .
Shouldn't [] be replaced with <> instead?
Posted on 11-07-2013 01:40 AM
Correct. It'd just the rubbish way wordpress handles code.
Posted on 11-07-2013 01:41 AM
Correct. It's just the rubbish way wordpress handles code.