Samba – updating my very old version

Samba – updating my very old version

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.

You might also want to see the NFS article.

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:

Good luck

My setup was failing with this command:

H:\Documents and Settings\Dan Langille>net view \\xeon
System error 5 has occurred.

Access is denied.


H:\Documents and Settings\Dan Langille>

After doing the search mentioned in the previous section, I added this to the
[Globals] section of my smb.conf file.

nt acl support = no

Then I restarted samba:

/usr/local/etc/rc.d/samba.sh stop
/usr/local/etc/rc.d/samba.sh start

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 interface (added on 26 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:


interfaces = rl0

Then I stopped and restarted Samba:


/usr/local/etc/rc.d/samba.sh stop
/usr/local/etc/rc.d/samba.sh start

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 Windows (added on November 7 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.

DOH! I forgot about smbpasswd. See Samba authentication of Windows users.

2 thoughts on “Samba – updating my very old version”

  1. > NOTE: If you want to access Microsoft file systems from your FreeBSD box, you want Sharity-Light.
    I would recommend smbfs which is a part of FreeBSD since 4.5. I have had some problems with the stability of Sharity-Light but smbfs has worked very well for me.

    1. I had alot of problems with sharity-light, it was unstable. And wouldn’t seem to mount more then one drive.

      The only problem I have with mount_smbfs is I would like it to be able to specificy the password in the command line, so I don’t have to enter my password 3 times when the computer reboots.

      Maybe I should switch to NFS?

Leave a Comment

Scroll to Top