mount network share on non-AD computer for specific user

totalyscrewedup
New Contributor III

I'm trying to map the network share to over 80 Macs and can't get it to work on my test system.
Here is my setup:
1. Macs aren't bound to AD (have Beta app installed that won't work with mobile accounts)
2. Standard user Account (can't have users with local admin account)
3. Network share is hosted on Windows server that is in AD
4. Have service AD account, so I can use in scripts
If I run following commands first, as local admin with sudo BUT not as root, I can mount the drive. Then as standard user, using the script below, I can get it on the user's desktop:
mkdir /Volume/SOP
mount_smbfs //domainuser:'domainpassword'@server.domain.com/Share/Share%20with%20WhitespaceInPath /Volume/SOP
and I run the script as standard user:


!/bin/bash

theuser=$(/usr/bin/who | awk '/console/{ print $1 }')

/usr/bin/osascript > /dev/null << EOT

try mount volume "smb://server.domain.com/Share/Share%20with%20WhitespaceInPath" end try

EOT

echo $theuser

killall cfprefsd
defaults write com.apple.finder ShowMountedServersOnDesktop true
killall -HUP Finder



Help!

0 REPLIES 0