|Samba Setup Guide|
Janou's Samba Setup Guide for NT Workstation/Server or Windows 3.1/WFW/95/NT
Dancing with Samba
SAMBA is a ritualized, stylized, combat-dance, having its own music, and practiced primarily in the city of Salvador, Bahia, is a characteristically Brazilian expression of both dance and martial arts
SAMBA is also a program that is used for filesharing and printing to Windows clients on your network. the SMB (Server Message Block (SMB) protocol provides filespace and printer services using the SMB or CIFS protocol. It can run across the LanManager protocol and can also service LanManager clients In other words, "Windows" Clients.
This includes, Windows 3.1, MSCLIENT 3.0 for DOS, WFW (Windows for Workgroups), 95, NT and OS/2. For you MAC Junkies, you're not out of luck, you can run DAVE for Macintosh; and of course, Linux, BSD, and other *NIXs.
Now... In order to even begin to experience SAMBA at work, you'll need a Network. If you don't have a network, there is no point to even read further. SAMBA IS NOT USED TO MOUNT YOUR WINDOWS DRIVE ON A DUAL SYSTEM. If you need to do that, simply "mount" your windows partition from *NIX.
Also, SAMBA will not work across routers. If this is needed, you will need to read up on IP TUNNELING, which is beyond the scope of this Guide.
Your Network must also be on a TCP/IP Protocol. This is easy for Linux and windows since they both naturally use the TCP protocol. For Windows 3.1, simply add it to the network configuration.
Setting up Your network
I am not going to go into detail here on setting up your network. If you have some PCs, a hub, and a few CAT-5 cables, and wish to set up a network, then read these great HOWTOs:
ToXIc_MYsT's Network Basics HOWTO -
DJG's Printer HOWTO -
Janou's (that's me) Guide to IP_MASQUERADING -
Now, let's begin, shall we?
** My guide is based on the Red Hat Linux distribution under v6.1, but you can use it as far back as 5.x and also as a guide for other distributions.
Did you install the SMBD/NMBD yet? Do you have it? If you do not, you can install it from your Linux Distribution CD or download it from:
For RedHatters (Red Hat Linux), you can install it as a package (RPM)
Once installed, your binaries should be in:
although the location is optional. You should now have "smbd" and "nmbd" binaries. Also, a configuration file for SAMBA is created at "/etc/smb.conf". This is what we'll configure to get the Linux side working first.
SAMBA is controlled by this one file "/etc/smb.conf". If you open this file up in an editor (pico Rulez !!!), you will see lots and lots of stuff. Don't be afraid ... much of this stuff is commented out and only used for special purposes. I will however tell you what you need to do to get SAMBA running at the basic level.
Samba has many, many settings available. These settings are either on or off by default. What is listed in your smb.conf are the ones you want to customize. The easiest way I can think of for this is to show the relevant entries and what you should change yours to be. So, here goes..
The first paremeter that we will work with is the "global" This identifies the Windows domain or workgroup. You should set this to the EXACT name of your workgroup or domain. If you do not know what it is, go into the control panel, and choose the "network" icon. Click the "identification" tab, and you will find that information there.
[global] # workgroup = NT-Domain-Name or Workgroup-Name workgroup = name of your windows workgroup
*** note: the "#" is to state that the line is a COMMENT only.
# server string is the equivalent of the NT Description field server string = Linux Server
The Server string is the description of the Linux machine that will show up in the Network Neighborhood on your Windows machine. You can pretty much name this anything you wish, but be practical about it.
hosts allow = 220.127.116.11 18.104.22.168
This is a security feature folks. You can restrict certain connections on your LAN from accessing machines on it. This is very similar to the /etc/hosts.allow and /etc/hosts.deny files. In the eboze example, I show that two connections will have access to the machine. Skip spaces between each connection.
# Security mode. Most people will want user level security. See # security_level.txt for details. security = user
most people will want user level security. Leave it set at this default. If you need to change it for any reason, consult with the SAMBA documentation.
# You may wish to use password encryption. Please read # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. # Do not enable this option unless you have read those documents encrypt passwords = yes
If PCs on your LAN are running Windows 95/98/NT, you need to uncomment out the above line, as shown above. Otherwise, you'll need to hack the registries on the Windows boxes. I'll show you how to hack the Windows registry shortly. I actually hacked my Windows machines just to learn more about the registry. If you don't feel like "living on the edge", leave the registry alone and uncomment the "encrypt passwords" line
The majority of the remaining settings in the [GLOBAL] section deal with Windows NT domains. They're pretty much self explanatory, so you can make the changes if you're configuring an NT machine, or just leave it alone if it's 3.1, 95, 98, WFW, or OS/2
[homes] comment = Home Directories browseable = no writable = yes
This setting will give users access to their home directory on the Unix box.
# This one is useful for people to share files [tmp] comment = Temporary file space path = /tmp read only = no public = yes
Setting up Windows Machines
If your Windows machines are already networked, you should be ok. For Windows 95, 98 users, you can set enable File and Printer Sharing for Microsoft Networks. For NT, it should be set up automatically. You will not see the same thing as yo uwould in a 9x box.
Client for Microsoft Networking
This is a Windows 95/98 service. Highlight it and choose "Properties". Select "Log on to Windows NT domain" supply the domain name (this can be anything). In the "Network logon options", should already be set at its default. if you need to change it, go ahead. then choose "OK" to continue.
In the Network Control Panel, click the "Identification" tab. Fill in the (3) fields on this tab. You can make up just about anything you want, as long as it fits, in fields # 1 and # 3. For the workgroup, I'd strongly advise changing this to anything other than the default.
Use your last name, a name of a music group, the name of a TV show. Most importantly, remember it. You'll need to enter it exactly the same on your other Windows PCs, if any, and also in Samba configuration file.
*** If you have made any changes to anthing in the Networking configuration, make sure that you re-bind the protocols and services to the NIC card.
Do this for each Windows machine on your LAN. Keep in mind that each machine is unique from the other. Therefore, each name must be different. This DOES NOT INCLUDE THE WORKGROUP and DOMAIN NAME. If you made all the changes, you can click "OK" and reboot your PCs.
*** Word of caution: You will have to use the same login and password that you use in Linux to access your directories. When access that filesystem in WIndows, you will be prompted with a username and password dialog box.
Hacking the Windows Registry
Please note that before you start messing around with the registry, you are advised to back it up. To back it up, click on start, select run. Type regedit in the box. Then highlight all branches.. click on FILE and then on export registry. This will pop the backup onto your desktop and if anything happens, boot into safe mode and double click on the registry file and you're back in business.
To get Windows to work with encrypted SMB passwords:
For Windows 95/98
Using the registry editor (regedit), create the registry setting
Add a new DWORD value:
Value Name: EnablePlainTextPassword Data: 0x01. (just enter --> 01)
Using the registry editor (regedit), create the registry setting
Add a new DWORD value:
Value Name: EnablePlainTextPassword Data: 0x01 (just enter --> 01)
Once these registry changes have been made, reboot the Windows machine and try to map a network drive on the Samba server again. It should work as long as the Samba server is using plain text passwords.
To configure Samba to use encrypted passwords:
In the [global] section of /etc/smb.conf, add the following lines:
smb passwd file = /etc/smbpasswd
That's all Folks!
Now for my shout outs:
Special shout out to my pplz: LyteSter - "Bro, I been so busy with my work that I been neglecting #linuxhelp.net .. I'll be back in full effect soon!,
x2xtreme, ToxiC_Myst, FEDERAL_AGENT (Sniper Systems) and to the Linux/Unix community!
Having trouble? Got questions? Require further assistance? If so please feel free to visit our Help Forums and ask the experts!
Copyright © 1997 - 2016 Private World Domination Inc. All rights reserved.