Status Update -- Python Management Framework for Samba

Gerald (Jerry) Carter jerry at
Tue Aug 2 18:17:18 GMT 2005

Hash: SHA1

Amit Regmi wrote:

> So far what I have come up with is a number of classes that 
> are used to come up with the "most common parameters" that
> Samba configuration file deals with. Now for a server
> configuration I have distributed those parameter bulk
> into approx 20 classes.

Amit,  Grouping parameters into classes may help in
organization but makes very little sense in the context of
this framework.  In fact, I would propose that administrators
very often do not need to have access to many parameters.
And if they do, the SambaConfig classes allows for setting
individual values.

For now however, I'm going to suggest you keep what you have.

> Now based upon these classes there would be three MAIN  classes
> a)     ServerClass
> b)     FileShareClass
> c)     PrintShareClass

These are the main classes that an application would work with.

> What would be a test file look ??
>  A client's use of the Library (framework :-)) would be like this :
>    import sys
> from ServerClass import Server  from FileShareClass import FileShare
> if __name__ == "__main__":
>    s = Server("/home/amit/test/smb.conf")
>  s.Basic.Workgroup(" workgroupnamE ")
>  s.Basic.NetBIOSname(" my computer ")
>    s.Security.EncryptPasswords("yes")
>  s.FilenameHandling.HideDotFiles("yes","comment here")

This is too close to smb.conf.  We want to make Samba easier
to manage.  You are just creating an alternative means
of running 'vi smb.conf'.

In order to be able to finish something by Auguest 1,
here is what I suggest for the remainder of the time we
have left.

1) Keep what you have.
2) Start writing some cgi scripts in python that allow
   a administrator to create a new server from scratch.
   * Set the server's role such as domain member, domain
     controller, or standalone.
   * a domain member should also be joined to the domain
3) Create file shares (ensure that the directory
   exists, creating it if necessary)
4) create printer shares (assume a cups backend) and create any
   underlying printers as needed
5) allow the admin to create new users and groups (ensuring that
   the Unix user and group accounts exist as well).

cheers, jerry
Alleviating the pain of Windows(tm)      -------
GnuPG Key                -----
"I never saved anything for the swim back."     Ethan Hawk in Gattaca
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -


More information about the samba-technical mailing list