; Configuration file for smbd. ; ============================================================================ ; For the format of this file and comprehensive descriptions of all the ; configuration option, please refer to the man page for smb.conf(5). ; ; The following configuration should suit most systems for basic usage and ; initial testing. It gives all clients access to their home directories and ; allows access to all printers specified in /etc/printcap. ; ; Things you need to check: ; -------------------------- ; ; 1: Check the path to your printcap file. If you are using a system that does ; not use printcap (eg., Solaris), create a file containing lines of the ; form ; ; printername|printername|printername| ; ; where each "printername" is the name of a printer you want to provide ; access to. Then alter the "printcap =" entry to point to the new file. ; ; If using Solaris, the following command will generate a suitable printcap ; file: ; ; lpc status | grep ":" | sed s/:/\|/ > myprintcap ; ; 2: Make sure the "print command" entry is correct for your system. This ; command should submit a file (represented by %s) to a printer ; (represented by %p) for printing and should REMOVE the file after ; printing. ; ; It is also a good idea to use an absolute path in the print command ; as there is no guarantee the search path will be set correctly. ; ; 3: Make sure the "lpq command" entry is correct for your system. This ; command should produce output similar to the SunOS lpq command. It will ; receive the printer name as it's first argument. An example of correct ; output is: ; ; Rank Owner Job Files Total Size ; 1st tridge 149 README 8096 bytes ; 2nd fred 150 FOO 1024 bytes ; ; The "Rank" keyword is used to find the start of real output. ; ; It is also a good idea to use an absolute path in the lpq command ; as there is no guarantee the search path will be set correctly. ; ; 4: Make sure that the user specified in "guest account" exists. Typically ; this will be a user that cannot log in and has minimal privileges. ; Note that this user does need to be able to print. Often the "nobody" ; account cannot print. ; ; 5: Ensure that the path specified in the [printers] entry is correct. This ; path should EITHER be world-writable with the sticky bit set OR be ; writable by the default user only. The latter is probably preferable. ; ; [global] print command = /usr/ucb/lpr -r -P%p %s lpq command = /usr/ucb/lpq -P printer name = lp printcap name = /etc/printcap guest account = pcguest [homes] comment = Home Directories read only = no create mode = 0750 [printers] comment = All Printers path = /usr/spool/public printable = yes public = yes writable = no create mode = 0700 ; ; Other examples. ; ; A private printer, usable only by fred. Spool data will be placed in fred's ; home directory. Note that fred must have write access to the spool directory, ; wherever it is. ;[fredsprn] ; comment = Fred's Printer ; valid users = fred ; path = /homes/fred ; printer = freds_printer ; public = no ; writable = no ; printable = yes ; ; A private directory, usable only by fred. Note that fred requires write ; access to the directory. ;[fredsdir] ; comment = Fred's Service ; path = /usr/somewhere/private ; valid users = fred ; public = no ; writable = yes ; printable = no ; ; A publicly accessible directory, but read only, except for people in ; the staff group ;[public] ; comment = Public Stuff ; path = /usr/somewhere/public ; public = yes ; writable = no ; printable = no ; write list = @staff ; ; A publicly accessible directory, read/write to all users. Note that all files ; created in the directory by users will be owned by the default user, so ; any user with access can delete any other user's files. Obviously this ; directory must be writable by the default user. Another user could of course ; be specified, in which case all files would be owned by that user instead. ;[public] ; path = /usr/somewhere/else/public ; public = yes ; only guest = yes ; writable = yes ; printable = no ; ; ; The following two entries demonstrate how to share a directory so that two ; users can place files there that will be owned by the specific users. In this ; setup, the directory should be writable by both users and should have the ; sticky bit set on it to prevent abuse. Obviously this could be extended to ; as many users as required. ;[myshare] ; comment = Mary's and Fred's stuff ; path = /usr/somewhere/shared ; valid users = mary fred ; public = no ; writable = yes ; printable = no ; create mask = 0765