[Samba] samba-3.0.0 & FreeBSD 5.1 not cooperating
C. Ulrich
dincht at securenym.net
Wed Oct 1 16:50:55 GMT 2003
Greetings,
I think I may be having a slight configuration problem with Samba and
FreeBSD-5.1. I'm trying to use FreeBSD's mount_smbfs(8) to mount a
remote Samba share onto my local FreeBSD filesystem. With the
configuration below, I can read all (almost; explained below) files and
directories just fine. All 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, and smbfs has no
problem whatsoever with mounting a Windows XP share either. Nothing
particularly helpful showed up in a google 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. Also, testparm
doesn't complain about it.):
[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=192.168.0.3
workgroup=EILNET
[powerface:eil:smbshare]
addr=192.168.0.3
password=<pass>
Next I added the line for /etc/fstab:
//eil at POWERFACE/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
Mainly I just want to know if there's any chance that the smb.conf
pasted above could be causing the problem in some way. I've already
asked in freebsd-questions and got no help except for one person who had
the same exact problem, but worked around it with a script. If I can't
get anywhere on this soon, I'm going to send in a FreeBSD PR and hope I
don't get screamed at. Since I originally wrote most of this, I upgraded
to 3.0.0 (no rc) and the problem persists. I also tried fiddling with
the UID for the username (eil) to make them the same between the two
machines and that didn't help either.
Anybody have any suggestions? Thanks in advance if you do!
P.S. There is an additional problem with smbfs not listing the contents
of some directories. However, I believe this to be a problem with smbfs
and I also haven't narrowed it down to a specific test case.
C. Ulrich
More information about the samba
mailing list