[Samba] Samba Web Administration Tool (SWAT)

Steve Litt slitt at troubleshooters.com
Tue Oct 29 17:48:48 UTC 2019


On Thu, 11 Jul 2019 11:59:20 +0000
Gerard Seibert via samba <samba at lists.samba.org> wrote:

> I know that this has probably been asked before. As a long time user
> of Samba, I remember using SWAT to configure Samba. It did seem, at
> least to me, to simplify things. At the very least, it did prevent me,
> and possibly other users, from creating simple syntax errors.

Hi Gerard,

I like programs like SWAT for just the reason you say: You don't need
to Eidetic memory every last option to prevent a simple syntax error.
The fact that you didn't receive an answer, and the fact that I didn't
receive an answer to the same question about six years ago, leads me to
conclude there's no such thing.

But there might be a way forward...

I haven't read Samba code since last century, but when I did, there was
a single file containing the name of every single smb.conf option. If
that file was a .h, you can just include it in a simple .c to get your
assistance. If it was part of a .c, you have to cut and paste the
relevant code.

What I would do is use a simple AWK script to turn the relevant part of
that file into a Python dict of dicts, where each child dict is the
option name, and its values are current setting, default setting,
definition, and if it exists, category. Armed with such a data JSON,
you could easily use Python's simple Bottle tool to make a nice,
scrolling web app to do exactly what you want to do, and probably a lot
of other stuff too.

It's not trivial, because *you* will need to fill in the definitions,
and maybe the categories, but still, it shouldn't be that hard, and it
would be an excellent tool for you, and probably for others.

That AWK program would be part of the distribution so everything could
be kept up to date.

HTH,

SteveT

Steve Litt
Author: The Key to Everyday Excellence
http://www.troubleshooters.com/key
Twitter: http://www.twitter.com/stevelitt




More information about the samba mailing list