Things look quiet here. But I've been doing a lot of blogging at
dan.langille.org because I prefer WordPress now.
Not all my posts there are FreeBSD related.
I am in the midst of migrating The FreeBSD Diary over to WordPress
(and you can read about that here).
Once the migration is completed, I'll move the FreeBSD posts into the
new FreeBSD Diary website.
Samba - updating my very old version13 September 2002
Samba is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients.
Or, in other words, it allows your computer to look like a Microsoft File Server. I first wrote about Samba
almost four years ago. Both Samba and FreeBSD have come a long way in that period.
So it's time I wrote again. Mainly because my existing Samba server is no longer accessible from my XP and
W2K workstations. Not to mention that my Samba version is very outdated.
We aren't going to go very deep into Samba. I'm just going to give you the bare details. From there, you will
be flying solo.
NOTE: If you want to access Microsoft file systems from your FreeBSD
box, you want Sharity-Light.
Installation
I already had Samba installed. So I used portupgrade to
get the latest and greatest installed. I suspect you don't already have Samba installed.
After all, that is why you are reading this article. To install samba from the ports tree,
here is what I did, given that I already had the
cd /usr/ports/net/samba
make install
Configuration
The configuration file for Samba is /usr/local/etc/smb.conf and
here is my file:
[global]
workgroup = WORKGROUP
hosts allow = 10.0.0.
remote announce = 10.0.0.255/WORKGROUP
encrypt passwords = yes
nt acl support = no
[public]
comment = A place to store stuff
path = /home/public
read only = no
public = yes
The Samba port installs /usr/local/etc/rc.d/samba.sh.sample.
I copied this to /usr/local/etc/rc.d/samba.sh. I then started
Samba with the following command:
/usr/local/etc/rc.d/samba.sh start
Connecting from Windows
As mentioned above, I have a Windows XP and a Windows 2000 box. I went to those
boxes, started a file browser, clicked on
Tools | Map Network Drive. But I was unable to
connect. I kept being told I was not authorized to connect from this workstation.
After much searching on the net, I found a reference to
nt acl support = no. The archive
also referred to README.Win2kSP2 as found in the
/usr/ports/net/samba/work/samba-2.2.6pre2/docs
directory (please note that the 2.2.6pre2 portion of the above path
may vary depending on what version is found in your ports tree). That was
very useful.
Diagnosing problems
It is frequently difficult to find the DIAGNOSIS.TXT file referred to by so many SAMBA
documents. It seems to move around the website. Hopefully this will settle down. I suggest
trying the following in the order provided:
After adding that item, I was successful in that test:
H:\Documents and Settings\Dan Langille>net view \\xeon
Shared resources at \\xeon
Samba 2.2.6pre2
Share name Type Used as Comment
-------------------------------------------------------------------------------
public Disk A place to store stuff
The command completed successfully.
H:\Documents and Settings\Dan Langille>
That looks much better
That's it
I hope that gets everything up and running. It did here. Samba is one great
little tool which allows me to have a central file space. It also allows me to access my
home directory on my XEON box from my XP box....
Binding to one interface26 September 2002
When I set up this server, the box contained only one NIC. Today I added another NIC. Then
I started getting these annoying messages:
nmbd[294]: Packet send failed to 192.168.0.0.255(138) ERRNO=No route to host
I added the following line to the [global] section
of /usr/local/etc/smb.conf:
That stopped those messages. Thanks to Delo for pointing out this feature. I was reading
smb.conf.default and wasn't seeing it.
Getting connected from Windows7 November 2002
When I was setting up another samba server today, I encountered this problem during TEST 8 of the
diagnostics:
H:\Documents and Settings\Dan Langille>net view \\\\BIGSERVER
System error 5 has occurred.
Access is denied.
H:\Documents and Settings\Dan Langille>
Which confused me because the same test worked on my other samba server. Then I actually
read the rest of the diagnostics entry where it said:
Also, do not overlook that fact that when the workstation requests the
connection to the samba server it will attempt to connect using the
name with which you logged onto your Windows machine. You need to make
sure that an account exists on your Samba server with that exact same
name and password.