dynamic smb.conf using preexec and include (based on perl & MySQL)
Stephan Lauffer
lauffer at ph-freiburg.de
Tue Jun 27 12:00:07 GMT 2000
Hi all!
I´m very close to set up dynamic all share sections in the smb.conf.
But I need to change the behavior of the include parameter.
(Here all shares were defined in a table in MySQL-DB... also every user is listed in
a seperate table. A perl script in creating the include config section).
Now, I´ve the big problem with "include"...
"It takes the standard substitutions, except %u, %P and %S.", says the
smb.conf manual, but I´m dreaming about such things:
[%S]
preexec = /usr/local/bin/smb_dyn.pl %S %u
inlcude = /var/lib/samba/smb_dyn/%S.%u.inc
Because this is not possible, i´ve to do go some unpleasant ways...
By the time I´ve to do things like that:
---
[wwwscript]
path=/tmp
root preexec = /usr/local/bin/smb_dyn.pl %S %u
include = /var/lib/samba/smb_dyn/wwwscript.inc
---
(there are many problems... it´s not a fine soulution.)
Now my question:
Is it possible to change the parsing of smb.con in this way, that it´s
possible to ignore the share configuration until "a real" connection
to the server is made?
And:
Is it possible to allow the substitution with %u and %S?
Think about the posibillities!
You can manage a whole farm of samba servers with only one MySQL DB!
It´s so easy the adminitrate the complete configuratino with php scripts!
No more deleting and changing usernames in the smb.conf files...
Hoping someone is also interested in such a feature of samba, maybe
we could patch samba or go another way to configure samba with external
scripts.
Liebe Gruesse,
Stephan Lauffer
[ Paedagogische Hochschule Freiburg - Systemtechnik - Germany ]
[ Abteilung ZIK: <a href="http://www.ph-freiburg.de/zik">WWW</a> ]
[ Tel.: 0761 - 682 459 Mobil: 0172 - 7145 197 ]
More information about the samba-technical
mailing list