Below please find a brief intro to Samba, and instructions for setting up your own samba server and windows client: First off you should download the Samba It is an easy to read guide which will get you up and running in no time and covers the latest release which is 2.03. Note you can use xpf to view it. Samba is an implementation of Microsoft's file and print services that runs on Linux and many other UNIX's and also Novell platforms. What the Samba team did is basically reverse engineer some of Microsoft's protocols so that there is an alternative to buying the overly expensive Windows NT product. This is very useful for people who have windows clients and want to be able to network without buying windows NT. Once properly configured a Linux box running Samba will look just like an NT server to all clients including other NT servers. Recently with the advent of version 2.0 Samba also acquired the ability to act as a PDC in a windows NT domain. It shows up in NT server manager just like an any NT server would. While it is not advisable to completely replace all of your NT servers yet you can save a lot of money by replacing some of your NT servers with this great program. Also with the advent of 2.0 you can administer Samba from a web browser with the SWAT interface. Even in a small home network with 2 or 3 computers, your Linux box can make life easier for you in that you can back up files directly to the Samba server, and also have it act as your print server. There are two parts to this setup. First is the linux part, then is windows part, below is how to do both of these setups. Chances are you already have samba installed. On rpm based distro's type rpm -q samba. If you get nothing mount your distro cd and type rpm -ivh samba* to install it. Now, let the fun begin, below I have listed a sample smb.conf file that you can use to set up samba as a Primary Domain Controller for your home or business network. The example below can be used as is, the only thing you may want to change is whether you use a login script or just make the shares available or both. I like using logon scripts, but if you don't want one, just comment out the lines that relate to the logon script on netlogon, then make the Homes Directories or whatever directories you create browseable. If you are going to use a logon script you have to actually created a logon script. Mine is called startup.bat and the text inside it reads "net use f: \\servername\share" without the quotes. So if your server name was redhat and the share name was root, you would say net use f: \\redhat\root in the logon script. The last thing you need to do is make sure the user(s) you want to use are set up. This is done with the smbpasswd command. For example say you have a linux user named fred whose linux password is 123456. Since samba uses its own method of authentication you need to add a password for fred in smb format. To do this type smbpasswd -a fred, then type in the smb passwd you want fred to use when he logs on I suggest his linux password which in this case is 123456. Once this is done and your script is all set up on redhat/mandrake systems cd to /etc/rc.d/int.d and type ./smb start as this will start your smb server and give you feedback on whether it started ok. The smb.conf file is re-read occasionally, but if you made a change to the script and want to make sure the running samba daemon picks it up, cd to /etc/rc.d/init.d and type ./smb restart. I recommend backing up you smb.conf file and starting clean with this example as the many options in there will likely just confuse you, well it confuses me anyway. [global]
[root]
# Un-comment the following and create the netlogon directory
for Domain Logons
Now that the linux part is done you need to set up the windows machines. Right click on network neighborhood and select properties. If client for microsoft windows networks is not there select add--> client-->Microsoft client. Once this client is added you can select properties for it and put in a domain name that matches the name of your workgroup in your smb.conf script. Then check log onto domain. That's it, you may have to reboot for the changes to take effect. Upon reboot logon as the the user you created and added a password for in the smbpasswd utility, and put in the name of your domain. You should now be logged into you samaba server. One last tip. If your at a linux box and want to access a samba server or NT server for that matter, first make sure your are a valid user, then type smbmount //servername/sharename /mountpoint. So if my NT or samba server name is server and the the share name is apps and my name is fred. I would type smbmount //server/apps /home/fred/share assuming the you have actually made a directory called /home/fred/share.
Have a Linux Problem
Linux Books
Linux Home: Linux System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|