Forcing plaintext password storage for Samba 4

Angelos Oikonomopoulos angelos.oikonomopoulos at fp-commerce.de
Thu Nov 11 08:30:51 MST 2010


> On 11/10/2010 01:19 PM, Angelos Oikonomopoulos wrote:
>> On 11/10/2010 12:54 PM, Stefan (metze) Metzmacher wrote:
[...]
>>> However a small python script that dumps the cleartext from the
>>> supplementalCredentials attribute would be nice to have.
>>
>> Hmm, unfortunately my python-fu is not great, but I'll go through the
>> existing examples and see what I can do.

OK, it took quite some digging through the source, but I got there 
eventually. Can someone take a look at how I'm constructing the SamDB 
object? I admit I mostly copied existing code for that and I'm not sure 
I'm using the API optimally.

Additionally, I want to be able to easily parse the output from any 
language, I'd like it to be robust in the face of arbitrary characters 
in the values displayed, and I'd like it to be human readable. JSON 
would be ideal IMHO, but it's not available out of the box in python 
2.5. XML is robust but overkill.

For now I ended up printing tab-separated columns of quoted-printable 
encoded values. I'm open to better ideas :-)

Would the JSON dependency just for this script be an issue? It wouldn't 
make difference for most people and it's a small price to pay for those 
of us who care about the functionality.

Thanks,
Aggelos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cleartext_pwds.py
Type: text/x-python
Size: 1619 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20101111/ab958b93/attachment.py>


More information about the samba-technical mailing list