I'm in the same boat.... so far I've got close but not quite there...
This command will mount a samba share, prompting for a password...
Nas = name of server
media = user
Code:
mount_smbfs -I 192.168.1.80 //media@Nas/Multimedia /mnt/SSD/mounts/Multimedia-qnap
the -I flag overrides the lookup of Nas
if you use a -N flag as well then it does't prompt for a password but the problem is that you need to edit a ~/
.nsmbrc file, which resides in the root home folder... which is obviously not writable... a cool way around this is to create a folder in a zfs pool and use an init/shutdown script to join them as shown below.. it needs to be a type: command + post-init
Code:
mount -t unionfs -o noatime /mnt/SSD/root /root
with that done create a .nsmbrc file in ~/ with the contents shown below. the computer:user MUST BE IN CAPS
[NAS:MEDIA]
# use persistent password cache for user 'joe'
password=xyz
Save the file... now when you run you mount_smbfs command with the -N it should mount without the password prompt.. mine works.
Now technically if this is run as a post-init command in freenas it should auto mount the share... mine does not though so not sure why.
any other ideas appreciated..
cheers