Just getting up to speed on freebsd, loving it, but have the following roadblock:
I am trying to mount a windows network share via fstab so I can auto mount on boot. I can do this via the command line and fstab, but can only get proper read/write permissions from the mount_smbfs command via the -f and -d parameters. I need help applying these permissions via fstab.
As a first pass, this command works:
with password prompt. I can accomplish this through fstab via by adding the following to /etc/fstab:
and this in /etc/nsmb.conf:
and then mount it simply via:
which can be used in an /etc/rc.d script on boot.
The problem is that non-root users can't write to the contents of /mnt/share as implemented above. I can fix this when mounting manually via:
but can't figure out a way to do this through fstab. If I try adding options like
or
to /etc/fstab, I get errors that these options are unsupported (this is the suggestion I've seen for linux smb).
How can I pass the
I am trying to mount a windows network share via fstab so I can auto mount on boot. I can do this via the command line and fstab, but can only get proper read/write permissions from the mount_smbfs command via the -f and -d parameters. I need help applying these permissions via fstab.
As a first pass, this command works:
# mount_smbfs -I <serverIP> //USER@SERVER/SHARE /mnt/myshare
with password prompt. I can accomplish this through fstab via by adding the following to /etc/fstab:
Code:
//USER@SERVER/SHARE /mnt/myshare smbfs rw,noauto 0 0
Code:
[SERVER]
<serverIP>
[SERVER]
password=<myPassword>
# mount /mnt/myshare
which can be used in an /etc/rc.d script on boot.
The problem is that non-root users can't write to the contents of /mnt/share as implemented above. I can fix this when mounting manually via:
# mount_smbfs -I <serverIP> -f 774 -d 774 //USER@SERVER/SHARE /mnt/myshare
but can't figure out a way to do this through fstab. If I try adding options like
Code:
//USER@SERVER/SHARE /mnt/myshare smbfs rw,noauto,fmask=744,dmask=744 0 0
Code:
//USER@SERVER/SHARE /mnt/myshare smbfs rw,noauto,uid=jim,gid=wheel 0 0
How can I pass the
Code:
-f, -d [\CODE] arguments via fstab? I've also tried
[CMD=#]mount -f 744 -d 744 /mnt/bear[/CMD]
which I could put in my startup script, but this doesn't work either.
Any help greatly appreciated.
Jim