The FreeBSD Diary |
(TM) | Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link. |
Samba - updating my very old version
13 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. 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 [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 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
|
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:
My setup was failing with this command: After doing the search mentioned in the previous section, I added this to theH:\Documents and Settings\Dan Langille>net view \\xeon System error 5 has occurred. Access is denied. H:\Documents and Settings\Dan Langille> [Globals] section of my smb.conf file.
Then I restarted samba:nt acl support = no After adding that item, I was successful in that test:/usr/local/etc/rc.d/samba.sh stop /usr/local/etc/rc.d/samba.sh start 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
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:
I added the following line to the [global] section
of /usr/local/etc/smb.conf :
Then I stopped and restarted Samba:
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
7 November 2002
|
When I was setting up another samba server today, I encountered this problem during TEST 8 of the diagnostics:
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:
DOH! I forgot about smbpasswd. See Samba authentication of Windows users.
|