![]() |
![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() ![]() |
How To Setup Samba with Win9x/ME |
It seems that one of the most frustrating things for Linux newbies to get to work is file and print sharing with other Windows machines. Many of these people are very knowledgble M$ certified Administrators and techs (not to mention home users too) that assume this should be a simple thing to do. The books and documents that exist are technical, very indepth and long winded, and simply put don't give a simple basic setup to get Samba to work correctly. Most of the problem lies in the fact that Samba is an extremely complicated, multi-tiered collection of programs designed to work with several totally different OS's/setups rolled into one configuration file and affected by several other different programs. Most of books and documents try to cover and explain all these options which makes it hard to stay with your own needs to configure Samba properly. This How-To is created to give Linux Users a simple help file to get file sharing running with Win95b, Win98, and WinME machines without unecessary explanations or alternate configurations in a minimum of time. All other type of networks (WinNT and Win2000) and login-type servers/networks will not work with this and must consult other documentation. I am going to use KDE as a Window Manager, since almost all distro's ship with it (sometimes the only option by default). Now, time to get to work!CONFIGURING YOUR LINUX MACHINELog in as "root", open the File Manager, go to the directory "/etc" or "/etc/samba", and right-click a file named "smb.conf". On the popup menu, select "Open with....", and select the "Editor". This is the configuration file for Samba, and if you know what you want to do EXACTLY, the easiest way to set Samba up. This a basic sample "smb.conf" file, with a few changes for your personal information, simply make your file match this one: *NOTE* (6/24/01) Samba Security Alert: All versions All Samba users, no matter which version need to read this. A patched version will be released in 24 hours or so. "A serious security hole has been discovered in all versions of Samba that allows an attacker to gain root access on the target machine for certain types of common Samba configuration. The immediate fix is to edit your smb.conf configuration file and remove all occurances of the macro "%m". Replacing occurances of %m with %I is probably the best solution for most sites." [global] printing=bsd printcap name=/etc/printcap load printers=yes guest account=nobody (or smbuser depending on distro) security=share netbios name= (NAME OF YOUR COMPUTER IN ALL CAPS) workgroup= (NAME OF YOUR WORKGROUP IN ALL CAPS) server string=Samba 2.0.5a socket options=IPTOS_LOWDELAY TCP_NODELAYSO_SNDBUF=4096SO_RCVBUF=4096 encrypt passwords=yes wins support=yes os level=65 domain master=no local master=yes preferred master=yes name resolve order=wins lmhosts host bcast dns proxy=no preserve case=yes short preserve case=yes min passwd length=0 unix password sync=true passwd program=/usr/bin/passwd %u passwd chat=*New\spassword:* %n\n *Re-enter\snew\spassword:* %n\n *Password\schanged.* . max log size=1000 case sensitive=no hosts allow=ALL browsable=yes null passwords=yes password level=4 username level=4 prefered master=no domain logons=no [homes] comment = Home Directories browseable = yes allow hosts = ALL public = yes read only = no create mask = 0775 directory mask = 0775 [printers] comment = All Printers browseable = no path = /tmp printable = yes public = no writable = no create mode = 0700 [kdm] public=yes writeable=yes browseable=yes path=/home/kdm max connections=0 available=yes [F] public=yes writeable=no browseable=yes path=/F write list=@YOUR WORKGROUP max connections=2 available=yes Setting the NetBIOS name for your computer and you workgroup in ALL CAPS is extremely important and a very common mistake for first-timers, Windows is not case-sensitive and sends all information across a network in ALL CAPS. Please don't forget this. It will also apply to all your USER NAMES in the next step. Now that your file looks like mine, save it and close the file. Step #2. Click on the "K" menu button, locate the "User Manager", and open it. Click the "Groups" tab, then click the "Add Group" button. You will have a box that will ask you for a "Group name", enter your WORKGROUP name (in ALL CAPS remember?), and click the "OK" button. Now select the "Users" tab and click the "Add user" button. On the "User Info" page, enter the "NetBIOS NAME" you used in "smb.conf" (again in ALL CAPS). Click the "Set Password" button and enter the desired password for this User (again in ALL CAPS). This will be the User you will want to use on the Linux machine for networking. *NOTE*-Newer versions of Linux do not let your create a username and/or workgroup name in all caps. I suggest creating the username/workgroup name in lower-case characters in the "UserManager", then creating an "Alias" in ALL CAPS via the UserManager. Creating the Username at the command-prompt with "smbuser" will also work. I'm a little disgruntled at the new change, but someone thought it would make things easier....I don't agree! Next, click the "Groups" tab and use the "arrow" key to transfer the name of your WORKGROUP across to the "Selected groups for user" box. Also transfer the group either "nogroup" or "smbgroup" (the default group for Samba). Click on the drop-down box labeled "Primary group" and select your WORKGROUP from the list, push the "OK" button and that's a done deal! You will now want to repeat the "USER" step for the computer names of all your other computers on the Network (VERY NECESSARY!!! DON'T SKIP IT!!!!). Now reboot your computer and we're down to configuring the Windows machines, the Linux one is done!!! SETTING UP THE WINDOWS COMPUTERSOk, the first thing we will want to do here is create a list of users on all of the Windows computers just like we finished doing on the Linux/Samba computer. Go to the "Control Panel" and find the applet name "Users" and open it. On the screen you should see a list of "Users" for the computer. Let's start out by creating a "new" User for the Linux machine, so click the "New User" button. Use the NetBIOS name you used in "smb.conf", checkmark the boxes to create copies of the "Desktop Folder and Documents menu"and the "Start Menu", then click the radio button to "create copies of the current items and their content". Click the "Next" button and your "new" User should be created. Now set the password (with the "Set Password" or "Change Password" button). This password will need to match the one you created on the Linux machine also (ALL CAPS). Repeat this step for all the computers on your network. You will want to login one of these names when you reboot your computer. When finished click the "Close" button and open the "Network" applet in the "Control Panel". This is the Windows applet where you configure all your networking, so let's finish this job up. On the first screen that appears, you will see a box that contains all the networking components installed on your computer. Click the "File and print sharing" button and make sure the boxes are checkmarked for "I want to be able to give others access to my files" and " I want to be able to give others access to my printer(s)" and press the "OK" button. "File and printer sharing for Microsoft Networks" should be in the "components" box. If it is not listed, click the "Add" button, then double-click the "Services" icon, then select "File and printer sharing for Microsoft Networks", and press the OK button. Look in the "component" box again and locate the "Client for Microsoft Networks" component. If this is not listed, click the "Add" button, double-click the "Client" icon, then select "Microsoft" on the left, "Client for Microsoft Networks" on the right, and press the "OK" button. Now on the first screen, find the drop-down box labeled "Primary Network Logon", and select "Client for Microsoft Networks" from the list. Now highlight the "File and printer sharing for Microsoft Networks" from the "components" box and click the "Properties" button. Highlight the "Browse Master" in the left box and set it to "disabled" in the right box. Highlight the "LM Announce" in the left box and set it to "No" in the right box. Click the "OK" button and return to the first screen again. Look in the "component" box again and locate anything that is labeled with "Netbeui"....if you find any, Highlight them and click the "remove" button. Look in the "component" box once more and locate "TCP/IP" for you ethernet adapter (network card). If it doesn't exist, click the "Add" button, double-click "Protocols", select "Microsoft" in the left box and "TCP/IP" in the right box, and press the "OK" button. Now highlight the "TCP/IP" for your network card and click the "Properties" button. You will now have a screen with 7 tabs on it, there are a couple we will need to change. First, select the "WINS" tab, click the "Enable WINS Resolution" radio button and then add the ip address for your Linux machine to the "WINS server search order". Click the "Bindings" tab and checkmark the boxes for "Client for Microsoft Networks" and "File and printer sharing for Microsoft Networks", and press the "OK" button. You should be back at the first screen now, select the "Identification" tab, and enter your Username for this computer in the "Computer Name" box and enter your Workgroup name in the "Workgroup" box. Now select the "Access Control" tab and enable "Share-level access control" and press the "OK" button. You will now be prompted to insert your Windows CD, so Windows can copy the necessary files, do this, then press the "OK" button so Windows can restart your computer with the new configuration. Login with your Username and password you setup for this computer. Now all that is left to do is locate any folders/drives you would like to share on the network. Locate these, right-click these, and select "Sharing..". On this page, select the "Shared as...." radio button and desired share name, access control, and password. Press the "OK" button and your network should be ready to go!!! On your desktop, double-click the "Network Neighborhood". In a few moments, your Workgroup and all the shared computers that are running on the network should appear on the page. On the Linux computer, when you try to browse the network, you may be prompted for a "Username" and "Password". When prompted, use "WORKGROUP/NetBIOS NAME" and the password you created for this User. You should be able to browse all shared resources from the configured computers now. Enjoy!!! There are several different configuration options to setting up Samba that work. I have described the easiest, most trouble free configuration options I have found in my personal experience. If you would like to experiment with other options and configurations, I suggest using the information from the free online book Using Samba. Thanks to O'Reilly books for providing this for us, it's wonderful of them. Hope this helps, ~Guitarlynn |
![]() |
| copyright 2000 | Contact Guitarlynn | |