[Samba] One way Samba

Michael Heydon michaelh at jaswin.com.au
Thu Dec 3 01:27:00 MST 2009


wino_pilot wrote:
> in the smb.conf below.
Is this your actual config file? or the output of some utility or 
something? If it is your actual config you seem to have a lot of 
redundant and in some cases conflicting lines.

Why don't you try something simpler. E.g.  :

> [global]
> netbios name = Mercury1
> server string = Samba file and print server
> workgroup = MNET
> security = user
> map to guest = bad user             <-- one of the few settings that your config file didn't already have :)
> guest account = smbguest            <-- Does this account actually exist?
> log file = /var/log/samba/samba.log
> max log size = 1000
> unix password sync = yes
> name resolve order = wins lmhosts bcast
> wins support = yes
> follow symlinks = no
> passwd chat timeout = 120
> username map = /etc/samba/smbusers
> smb passwd file = /etc/samba/smbpasswd
> passwd program = /usr/bin/passwd '%u'
> passwd chat = *New*password* %n\n *ReType*new*password* %n\n
> *passwd*changed*\n
> add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s
> /dev/null '%u'
> add user to group script = /usr/sbin/useradd -d /dev/null -c 'Samba User
> Account' -s /dev/null -g '%g' '%u'
> add group script = /usr/sbin/groupadd '%g'
> delete user script = /usr/sbin/userdel '%u'
> delete user from group script = /usr/sbin/userdel '%u' '%g'
> delete group script = /usr/sbin/groupdel '%g'
> add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c
> 'Samba Machine Account' -s /dev/null -M '%u'
> machine password timeout = 120
>
> [homes]
> comment = Home Directories
> path = /home
> writable = yes
> public = no
>
> [printers]
> comment = All Printers
> path = /var/spool/samba
> public = no
> printable = yes
>
> [pdf-documents]
> path = /home/pdf-documents
> comment = Converted PDF Documents
> writeable = yes
> guest ok = yes
>
> [pdf-printer]
> path = /tmp
> comment = PDF Printer Service
> printable = yes
> guest ok = yes
> use client driver = yes
> printing = bsd
> print command = /usr/bin/gadmin-samba-pdf %s %u
> lpq command =
> lprm command =
>
> [Book]
> path = /media/FreeAgent/Drive/Book
> comment = Book Chapters
> valid users = jon
> admin users = jon
> writable = yes
>
> [Photos]
> path = /media/FreeAgent/Drive/Photos
> comment = All Photos
> valid users = jon
> admin users = jon
> writable = yes
>
>   

I would have trimmed it down a little more (e.g. password and account 
management script settings), but I am giving some lines the benefit of 
the doubt and assuming you have them there for a reason (that may not 
have been the best assumption). I was going to go through and explain 
why I trimmed out each line, but there were too many of them, if there 
are any particular lines that you want to know why I considered them 
superfluous then just ask.

*Michael Heydon*
michaelh at jaswin.com.au <mailto:michaelh at jaswin.com.au>



More information about the samba mailing list