Skip to main content

managing passwd, group and shadow under /etc, /usr/lib/extrausers, etc.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ruamel.nss-0.1.5.tar.gz (13.6 kB view hashes)

Uploaded source

Built Distribution

ruamel.nss-0.1.5-py3-none-any.whl (6.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page