I tried to do this a while back and ran into the same problems that you 

I eventually gave up and wrote a shell script to mount the smb share.  I put 
this in the /usr/home/etc/rc.d directory.

It isn't fstab then, but accomplishes the same thing, plus it won't crash your 
boot process if the smb share is unavailable when you boot.

On Thursday 25 September 2003 08:17 pm, C. Ulrich wrote:
> Greetings,
> I finally got smbfs to mount a Samba share to a specific directory at
> boot time (without prompting for the password) via /etc/fstab. However,
> I still have a problem.  I can read all files and directories just fine.
> My permissions are correct. But whenever I try to write to the share,
> the write fails and an error is returned, "no such file or directory".
> If I try to replace a file on the share that already exists I get
> "permission denied". Windows XP has no problem reading, writing, or
> otherwise accessing the share, which is why I'm posting it here instead
> of to a Samba list. Nothing particularly helpful showed up in a google
> or rambler search.
> Perhaps a more detailed explanation is in order.
> The remote server is Samba 3.0.0rc4. The local machine is FreeBSD
> 5.1-RELEASE. Samba is using the following smb.conf (which I realize
> isn't very secure, it's just for testing at the moment):
> [global]
>         netbios name = POWERFACE
>         workgroup = EILNET
>         security = share
>         log file = /usr/local/samba/var/log.samba
>         socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
>         encrypt passwords = yes
>         wins support = yes
> [smbshare]
>         path = /nfs/share
>         guest ok = yes
>         writeable = yes
> I then added a user with smbpasswd named eil. Now on the FreeBSD
> machine, I made sure to enable the correct options in the kernel config
> file and rebuilt whatever needed rebuilding followed by a reboot. I
> created the following /root/.nsmbrc so that FreeBSD could mount the
> share at runtime without it prompting for a password.
> [default]
> nbns=
> workgroup=EILNET
> [powerface:eil:smbshare]
> addr=
> password=<pass>
> Next I added the line for /etc/fstab:
> //[EMAIL PROTECTED]/smbshare /home/eil/share smbfs  rw,noauto       0
> 0
> Finally, I took smbfs.sh.sample and copied it to
> /usr/local/etc/rc.d/smbfs.sh and rebooted. FreeBSD mounts the share in
> the proper location automatically and I can read every file and
> directory. But when I try to copy, move, or otherwise write a file to
> the share I get:
> [apex:~]$ cp .profile share/
> cp: share/.profile: No such file or directory
> And when I try to copy or otherwise write to a file that already exists
> on the share, I get a different error:
> [apex:~]$ cp share/code/tcl/dbtest.tcl temp/
> [apex:~]$ cp temp/dbtest.tcl share/code/tcl/
> cp: share/code/tcl/dbtest.tcl: Permission denied
> Anybody have any enlightening advice?
> C. Ulrich

[EMAIL PROTECTED] mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to