Hey Guys, I'm trying to silently mount a network share on login without the user having to authenticate. Our computers are bound to AD and use mobile accounts (with all syncing disabled). I'm using a LaunchAgent which runs a script.
Here's what's happening:
Everything works reasonably well on the first login. It creates the account and when I reach the desktop I get a pop-up that says "you are attempting to connect to the server "server.name.com", and I click the blue "connect" button and the share mounts. Sweet! Here's a screenshot of this:
However, every login afterwards prompts for a password... Here's another screenshot:
So, I don't know why it's authenticating the first time and then not authenticating for all subseqent logins. Here is the script that I'm using:
#!/bin/bash
# this script was written to determine the currently logged in user and then determine
# the path to their network home folder
# it will then mount the home folder
## Get Current User
currentUser=$(stat -f %Su /dev/console)
## Determine path to network share
homeLoc=$( dscl . -read /Users/$currentUser SMBHome | cut -c 10- | sed 's.\\./.g' )
## mount the share
/usr/bin/osascript -e "mount volume "smb:$homeLoc""
exit
I tried using mount -t smbfs as well, but it just silently fails to mount the share. When I run it in terminal (as the user) it prompts for a password...
I've also noticed that it prompts for a password when I try to connect via Finder (using the "connect to server" dialogue).
I tried using the "mountNetworkShare" script from the "resource kit" and does the same as when I use mount -t smbfs (it just silently fails).
I used the ticket viewer app to verify that the user has a kerberos ticket.
I'm wondering if this might be a 10.13 issue?
Any help or suggestions would be appreciated. I don't know what I'm doing wrong.