On Wed, Oct 3, 2012 at 4:24 AM, Karel Zak <kzak@xxxxxxxxxx> wrote: > On Tue, Oct 02, 2012 at 07:58:39PM -0700, Cody Maloney wrote: >> I would like to implement support for non-local shell changing in chsh >> at the very least, and possibly support for non-local user attributes >> in general for the other attribute modification tools in login-utils. >> For my purposes I need LDAP support, but it would probably be better >> to make it able to use an arbitrary storage backend. Ideally an API >> would already exist for this, but while one for setting authentication >> tokens has evolved (pam_chauthtok) and one for reading user attributes >> (Name Service Switch NSS), but none for setting them as far as I can >> tell. As such, I think the best route would be just to make a new API >> for this. > > Already implemented: > https://fedorahosted.org/libuser/ > > it also provides utils like lchfn or lchsh. Not sure, but maybe it > would be possible to optionally link the default chfn and chsh utils > with the library too. Apologies for the slow response. Looking at chsh, it definitely looks like it should be relatively easy to utilize libuser within it and add a configure for disabling the dependency. If it's okay with both maintainers, both lchsh and chsh are licensed under the GPL so I'd like to just merge lchsh's code into chsh (rather than try to write what should be pretty much exactly the same thing from the API documentation). If you both approve I'll start working on writing the necessary patches, first adding support to chsh, then, once those patches are in a happy state, implementing chfn using the same method. Cody -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html