Samba Configuration Guidelines
1. From one of the samba mirrors (for list see www.samba.org) download the latest samba gzipped tar file 2. gunzip and untar the file into a temporary location 3. cd /temp_location/source 4. ./configure This will automatically create a Makefile for you with the correct settings for your environment 5. The default location for samba is /usr/local/samba . If you want to change this edit the Makefile now changing variables prefix and BASEDIR 6. run make to create binaries and man pages 7. run make install to create the samba home environment 8. create a basic smb.conf file for testing purposes as below: > workgroup = WORKGROUPNAME [homes] guest ok = no read only = no Note: the default location for smb.conf is samba_home/lib . Life is alot easier if you use the default. If you don't you have to specifically name the location of the file with every command 9. start nmbd and smbd(assuming you want to run them as daemons -D , if you want to start them on demand you need to configure /etc/service and /etc/ inetd.conf . Check documentation that comes in the tar archive for details) 10. check as follows: 1. nmblookup hostname 2. if OK smbclient //hostname/homes 3. if you get prompt, samba working 11. You will now need to configure the smb.conf file for real. This is quite a complex task as there are many options to cater for many different scenarios. An example is given below. The comments explain what each entry does. I used this example to connect various NT 4 workstations to a samba server running on a different subnet. Note: A variety of examples is given in the examples directory unloaded from the samba tar archive. > # Samba config file ; ; Define SOme GLOBAL parameters in the global section. ; Note that some of these are default anyway ; Also some azre service parameters. ; If specified here, they become the default for all services [global] ; Define the Workgroup - the samba server will appear under this NT browse list workgroup = SAMBA ; Set number of simultaneous connections (0 = unlimited) max connections = 0 ; Do not alow writes by default writable = no ; This sets the amount of debug messages ; 0 = none ; 6 = most debug level = 3 ; Services available - could set to no in any section to ; temporary disable it available = yes ; Allow a browser to do its stuff i.e. allow it to appear on browser list browsable = yes ; Don't allow access to some directories dont descend = /dev ; Force a group of 'users' i.e. force effective gid to be Unix group users force group = users ; Define a text string that browers display server string = Fifes Development Server II ; To resolve cross subnet problems, announce on these networks for browsers ; i.e. samba sill periodically announce itself on all subnets specified below remote announce = 220.127.116.11 18.104.22.168 ; Allow any host on the 30 network - all others denied allow hosts = 30. ; allow the use of encrypted passwords (NT4/SP3) encrypt passwords = yes ; Any services specified with guest OK or guest only will use this Unix id guest account = samba ; Never trust the root account invalid users = root ; Case sensitivity i.e. maintain case sensitivity case sensitive = yes preserve case = yes short preserver case = yes ; To allow cross sub-net browsing, samba registers it name with specified server wins server = winserver.ldn.in2nix.com [share01] public = no path = /share writable = yes 12. Once create, check with testparms program 13. You'll also need to check the NT logons exist on your samba server with the same passwords 14. If OK, restartsmbd/nmbdto pick up new smb.conf (Note: You should be able to kill -SIGHUP smbd pid but I found that it didn't always seem to work so during initial set up, I find restarting easier. 15. Under windows explorer, network neighbourhood you should see an entry for your samba server 16. If you don't (usually the case) follow the diagnostics provided with the samba tar file under samba_source_dir/docs/textdocs/DIAGNOSIS.txt
A useful feature with the latest release of samba is swat. This is a wab based interface for administering Samba. To set this up:
1. edit /etc/service adding a statement >swat 901/tcp 2. edit /etc/inetd.conf adding >swat stream tcp nowait.400 root /samba_home/ bin/swat swat 3. start your browser pointing it to http://localhost:901/.
Still stuck? Maybe we can help. Contact us here
For more super cool techie stuff check out our blog!!