Extend backend fields

Simo Sorce simo.sorce at xsec.it
Fri Sep 19 16:40:13 GMT 2003

Using Tridge genparser I am modeling a tdbsam2 backend that will have no
problem to add or remove fields.

The code I have involve other major changes like real group support an
privileges in the SAM.

The code is still in it's early stage of development but has yet proven
to be working in minor test.

I'll merge the code into HEAD once I'll be fione with it.

It will be at first included as a gateway to passdb backend.

I currently do not have much time to work on it, should be able to have
more time in few months, this may be a 3.2.x version material :-)


On Fri, 2003-09-19 at 18:34, Aurélien Degrémont wrote:
> Hi,
> In order to implement new functionnalities to Samba, we may need to add 
> new fields to user account structure. (Like 'lock out time', 'password 
> uniqueness','TSE information fields')
> But, the users accounts are directly linked to the backends and they 
> must be adapt each time we modify the structure. But, compatibility is 
> really important and must be converve between versions.
> Unfortunately, all the backends are not easily extendables.
> XML, LDAP and MySQL are not really a problem because fields could be 
> added without changing the present datas, without any effects to the 
> present format either.
> But the matter is totally different concerning tdbsam. The datas stored 
> into this backend are directly got from the user account structure 
> (SAM_ACOUNT), and so, if we modify this stucture, the compatibility is 
> broken.
> That's why, i would like we try to find a solution to that.
> We had thought about that and we could proposed some solutions.
> In the all solutions, something really important must be fixed. The 
> SAM_ACCOUNT structure must be separed from the tdbsam, and tdbsam must 
> not use directly this struture to store the datas, like the other backends.
> In this context, solutions could be guessed to solve the problem.
> First, a header or/and version of the file (tdbsam) may be added to new 
> version(s) of tdbsam, if no version are available, it guess it's the 
> previous version. Important modifications may be added to pdb_tdb.c to 
> implements that.
> Second possibility. New fields may be added to the end of the records. 
> When Samba try to read the file, it could automatically detect the 
> 'version' (implicit) of the file due to the 'errors' when it reads the 
> records. If they are not corresponding with the newest version of the 
> tdbsam, it fallbacks to the previous versions, and so on...
> I waiting for your comments..
> Best regards,
> Aurélien Degrémont
Simo Sorce - simo.sorce at xsec.it
Xsec s.r.l. - http://www.xsec.it
via Durando 10 Ed. G - 20158 - Milano
mobile: +39 329 328 7702
tel. +39 02 2399 7130 - fax: +39 02 700 442 399

More information about the samba-technical mailing list