[Samba] SAMBA authentication ?

Brian High high at u.washington.edu
Mon Feb 4 23:10:06 GMT 2008


John Drescher wrote:
> On Feb 4, 2008 5:48 PM, Charles Marcus <CMarcus at media-brokers.com> wrote:
>>> Please post your smb.conf without comments.
>> Is there a command to generate this output?
>>
> There probably is a better way but this is the first thing I can think of:
> 
> grep -v ^# /etc/samba/smb.conf
> 
> John

This works pretty well:

  testparm -s

... as it is formatted in a readable way, even if the smb.conf is messy.


Or you can do it this way:

  grep -v '^[ \t]*[#;]\|^[ \t]*$' /etc/samba/smb.conf

... so you also remove blank lines as well as comments (both # and ;),
even with leading whitespace.


-- 
Brian High


More information about the samba mailing list