Module for querying information about users. This mostly asks plugins for the extra information, and falls back to using a default that should work on most systems (but by no means all systems.)



Returns a tuple (quota usage, quota limit). Returns None if the quota usage is unknown. If dir is omitted, the current working directory is assumed. Value returned is in bytes.

This function implements a plugin interface named wizard.user.quota.

wizard.user.passwd(path=None, uid=None)

Returns a passwd-like entry (a Info object) corresponding to the owner of path. If uid is specified, path is used solely to determine the filesystem uid was determined from. It will fall back to the local passwd database, and return None if no information is available. If path is omitted, it will fall back to the current working directory.

This function implements a plugin interface named wizard.user.passwd.


Determines the username of the true person who is running this program. If the process’s real uid is nonzero, just do a passwd lookup; otherwise attempt to figure out the user behind the root prompt some other way.

This function implements a plugin interface named wizard.user.operator.


This user converts a username into a Info object using only the local password database.


Converts a username into an email address to that user. If you have a UID, you will have to convert it into a username first. If no canonical source of information is found, an heuristic approach will be used. If name is None, the current user will be used unless it is root, in which case operator() is tried first to determine the real current user.

This function implements a plugin interface named wizard.user.email.


class wizard.user.Info(name, uid, gid, realname, homedir, shell)

Object containing information describing a user. It is analogous to passwd, but has dropped the password field and dedicated the gecos field for real name information.


If a platform does not support retrieving information about a field, it may have the value None.

Table Of Contents

Previous topic


Next topic


This Page