Skip to content
forked from tehmaze/getent

Python interface to the POSIX getent family of commands (getpwent, getgrent, getnetent, etc.)

Notifications You must be signed in to change notification settings

Karmak23/getent

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

getent

Python interface to the POSIX getent family of commands (getpwent, getgrent, getnetent, etc.)

Usage

Here a few examples.

Load the interface:

>>> import getent

Doing a passwd lookup:

>>> print dict(getent.passwd('root'))
{'dir': '/root',
 'gecos': 'root',
 'gid': 0,
 'name': 'root',
 'password': 'x',
 'shell': '/bin/bash',
 'uid': 0}

Doing a group lookup:

>>> print dict(getent.group('root'))
{'gid': 0, 'members': [], 'name': 'root', 'password': 'x'}

About

Python interface to the POSIX getent family of commands (getpwent, getgrent, getnetent, etc.)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%