Hi,
I've been trying to auto-mount CIFS/SMB shares using connected.sh but the script failed. Then I started this script manually from Terminal, and it asked me for the password for my CIFS account, even though I previously saved in in Keychain.
Turns out, to be able to access Keychain, we need to use Apple Scripts. Here's a way to do so:
# connected.sh
su <USERNAME> -c '
osascript -e "mount volume \"smb://<DOMAIN>\<USER>@<SERVER>/<SHARE>\""
'
# open /Volumes/<NAME>
Note that there is no need to use mkdir or specify a mount point, as the Mac will automatically do that for us.
Cheers!
--
You received this message because you are subscribed to the Google Groups "tunnelblick-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/tunnelblick-discuss/-/5IE9SUUXJRQJ.
To post to this group, send email to tunnelbli...@googlegroups.com.
To unsubscribe from this group, send email to tunnelblick-dis...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tunnelblick-discuss?hl=en.
To unsubscribe from this group, send email to tunnelblick-discuss+unsub...@googlegroups.com.
echo "something" >> /tmp/connected.sh.log.txt