I have a bit of a peculiar situation regarding how to mount our users home shares. We have a bit of an odd setup where there is no data passed with the SMBhome field from AD. Our windows machines have a rather extensive login script that maps various drives based on group membership. I've been slowly replicating this in the JSS, for most shares I haven't had a problem. I am having an issue with mounting the users home directories. In this example for this group all the users are stored at a share that looks like the following.
smb://xxxx.xxx.xx.edu/akaltsas$
They are on on a file server, directly off the SAN, with hidden directories at the root of the share. If only we used ABE this wouldn't be an issue. Just mount the share, and they only see the directories they have access to. I've asked and there is no chance we will migrate to using ABE instead of these hidden directories. The networking team is pretty entrenched in using hidden directories.
I've been trying to modify the mountNetworkShare.sh script to poll the username and append the $ for the hidden share with little success. I'm sure it's just an issue of syntax, but i'm not sure. I thought if I put the shareUsername variable in quotes it would expand the variable and then just put the $ after the fact, but it's obviously not that easy. I will note that if I hardcode a username$ into the share variable the drive does mount fine. I'm sure I'm missing some easy way to insert the username variable into the share string but I'm at a loss as to what it is. Here is a sample of the modification I've made to the mountNetworkShare script
# HARDCODED VALUES SET HERE
shareUsername="$3" #The username of the user to be used to mount the share - leaving this to $3 will mount the share as the currently logged in user
authType="kerberos" #Valid values are "kerberos" (default) or "password"
password="" #Note this only needs to be set if authentication type is "password"
mountType="smb" #The type of file share. Valid types are "afp", "smb", or "dfs". DFS only supports the "kerberos" authentication method
share='smb://xxxx.xxx.xx.edu/"shareUsername"$' #The address of the share you are mounting - if left blank, the script will search for the "SMBHome" attribute in the user record
This is an example of what the script looks like for the AD bound Windows machines.
IF INGROUP("xxxx-Users")
USE H: "\\xxxx.xxx.xx.edu" + @USERID + "$"