Samba allows a PC client to access remote Unix resources, namely file systems and printers.
Service is provided via processes running on the Unix server which handle the client connections and netbios name server requests. The number of PCs that Samba is serving and their frequency of use will determine whether Samba runs continuous in daemon mode, or on demand from inet (default).
Communication between the Unix server and PC client is using the Session Message Block (SMB) protocol, which is also commonly known as Netbios or LanManager protocol. The advantage being that PC clients can communicate natively without the need for additional client software.
Each user who wishes to access resources via Samba must be a registered Unix user granted appropriate Samba permissions.
Global Section: parameters which apply to the server as a whole or act as defaults.
[global]
allow hosts = 'domain allowed access, eg., 200.30.40.'
debug level = 1
domain master = yes
guest account = 'username for global services, eg printing'
load printers = yes
lock directory = /var/log/samba/locks
log file = /var/log/samba/log.%m
max log size = 1000
os level = 2
printing = sysv
printcap name = /opt/local/config/printer.conf
security = user
valid users = 'usernames allowed access'
workgroup = 'name of group to which server belongs for querying by clients'
Files Section: parameters which apply to a specific directory
['directory to which access is allowed']
comment = directory for PC clients
browseable = yes
path = /home/%u/
printable = no
user = 'usernames allowed access'
writeable = yes
Printers Section: parameters which apply to a specific printer
['printer to which access is allowed']
comment = printer for PC clients
browseable = yes
path = /var/spool/%u/%m
postscript = false
printable = yes
print command = /usr/bin/nawk '/^%!PS/, /^%%EOF/' %s | /usr/bin/lp -c -o nobanner -T postscript -d 'unix printer'; rm -f %s
printer = 'printer'
public = no
writeable = yes
Removing temporary printer files -
this is not default Unix behaviour, therefore the temporary file must be explicity removed after printing, eg.,
lp ... | rm -f %s
Trailing blank page when printing from Win95 -
to get rid of it once and for all, the printer initialisation strings added by Win95 at the start and end of the file need to be removed.
This is everything before '%!PS' and everything after '%%EOF'.
A simple way to achieve this is to pipe the file through awk (nawk on Solaris 2.5) to filter out the excess information, eg.,