Menu

Tree [8f24e1] default tip /
 History

Read Only access


File Date Author Commit
 _test 2016-03-28 Anthon van der Neut Anthon van der Neut [dfa277] minimal initial revision
 .hgignore 2016-03-28 Anthon van der Neut Anthon van der Neut [dfa277] minimal initial revision
 .hgtags 2016-03-28 Anthon van der Neut Anthon van der Neut [4b9227] Added tag 0.1.0 for changeset dfa2771a9cfd
 Makefile 2018-10-30 Anthon van der Neut Anthon van der Neut [01dc18] correct field names
 README.rst 2018-10-30 Anthon van der Neut Anthon van der Neut [01dc18] correct field names
 __init__.py 2022-05-03 Anthon van der Neut Anthon van der Neut [8f24e1] update setup.py
 grp.py 2016-03-28 Anthon van der Neut Anthon van der Neut [dfa277] minimal initial revision
 pwd.py 2018-10-30 Anthon van der Neut Anthon van der Neut [01dc18] correct field names
 setup.py 2022-05-03 Anthon van der Neut Anthon van der Neut [8f24e1] update setup.py
 spwd.py 2018-10-30 Anthon van der Neut Anthon van der Neut [01dc18] correct field names
 tox.ini 2018-10-30 Anthon van der Neut Anthon van der Neut [01dc18] correct field names

Read Me

the standard library pwd, grp and spwd are hard wired to use /etc/passwd, /etc/group and /etc/shadow respectively.

That makes them useless for managing these files when they reside somewhere else, which is e.g. the case when using libnss.

This library reimplements the functionality by creating three classes that default to opening the files under /etc, but which can be given explicit paths.

The original module level routines are now methods on the instances that return named tuples with the fieldnames being the same as those from the stdlib modules.

This library uses the new (corrected) names for the fields. In particular sp_namep and sp_pwdp as used in Python 3 instead of the versions without trailing p from 2.7