Access/modify attributes of principal
It would be cool if I could use this library to modify the "Attributes" field of principals; for instance, to set +needchange on user principals to expire passwords rather than hard-expiring them with a date.
Interface could look something like
>>> princ.attributes
['REQUIRES_PRE_AUTH']
>>> princ.attributes.append('REQUIRES_PWCHANGE')
>>> princ.attributes
['REQUIRES_PRE_AUTH', 'REQUIRES_PWCHANGE']
corresponding to
kadmin: getprinc foobar
Principal: [email protected]
...
Attributes: REQUIRES_PRE_AUTH REQUIRES_PWCHANGE
kadmin: modprinc +needchange foobar
Principal "[email protected]" modified.
in kadmin.
I could write a pull request if someone were to point me in the right direction re: docs, etc.
This functionality exists, it's just not documented...
princ.set_flags(kadmin.REQUIRES_PWCHANGE) princ.commit()
(Also princ.unset_flags)
It exists, but the code hasn't been fleshed out (there are still comments floating around) and the interface could be more user-friendly. If I have time I plan on fixing this up and writing some docs.