Contents
- INDEX
- Unix Networking Index
- HP-UX
- Solaris
- Linux Index
- General Unix
- Other Unix types
- Unix Scripts
- Unix databases
Associated Information
- none
Useful Links
- UGU Networking Resorces
|
Samba Configuration Guidelines
- From one of the samba mirrors (for list see www.samba.org) download the latest samba
gzipped tar file
- gunzip and untar the file into a temporary location
- cd /temp_location/source
- ./configure This will automatically create a Makefile for you with the correct settings
for your environment
- The default location for samba is /usr/local/samba . If you want to change this edit
the Makefile now changing variables prefix and BASEDIR
- run make to create binaries and man pages
- run make install to create the samba home environment
- 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
- 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)
- check as follows:
- nmblookup hostname
- if OK smbclient //hostname/homes
- if you get prompt, samba working
- 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 = 30.255.255.255 30.75.255.255
; 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.intronet.com
[share01]
public = no
path = /share
writable = yes
- Once create, check with testparms program
- You'll also need to check the NT logons exist on your samba server with the same
passwords
- If OK, restart smbd/nmbd to 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.
- Under windows explorer, network neighbourhood you should see an entry for your samba
server
- 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:
- edit /etc/service adding a statement swat 901/tcp
- edit /etc/inetd.conf adding swat stream tcp nowait.400 root /samba_home/bin/swat swat
- start your browser pointing it to http://localhost:901/.
|