I'm running the following script by hand in Terminal which works successfully to mount our user's homedrive:
filteredLDAP=$(ldapsearch -LLL -x -h our.domain -b "OU=People,DC=mds,DC=ad,DC=dur,DC=ac,DC=uk" "(sAMAccountName=$USER)" homeDirectory | sed 's/[^:]*: //;2q;d' | sed 's////g')
connTYPE=$"smb:"
connCONCAT=$"$connTYPE$filteredLDAP"
open $connCONCAT
When I add the script to self-service, nothing happens - I think it's because the script is being run as root and not the current user. Is that the case, and if so, how can I amend to run successfully?
Thanks.