{
    "mode": "pydoc",
    "parameter": "spwd",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/spwd/json",
    "generated": "2026-06-02T15:07:56Z",
    "sections": {
        "NAME": {
            "content": "spwd\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module provides access to the Unix shadow password database.\nIt is available on various Unix versions.\n\nShadow password database entries are reported as 9-tuples of type structspwd,\ncontaining the following items from the password database (see `<shadow.h>'):\nspnamp, sppwdp, splstchg, spmin, spmax, spwarn, spinact, spexpire, spflag.\nThe spnamp and sppwdp are strings, the rest are integers.\nAn exception is raised if the entry asked for cannot be found.\nYou have to be root to be able to use this module.\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.tuple(builtins.object)\nstructspwd\n",
            "subsections": [
                {
                    "name": "class struct_spwd",
                    "content": "|  structspwd(iterable=(), /)\n|\n|  spwd.structspwd: Results from getsp*() routines.\n|\n|  This object may be accessed either as a 9-tuple of\n|    (spnamp,sppwdp,splstchg,spmin,spmax,spwarn,spinact,spexpire,spflag)\n|  or via the object attributes as named in the above tuple.\n|\n|  Method resolution order:\n|      structspwd\n|      builtins.tuple\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  spexpire\n|      #days since 1970-01-01 when account expires\n|\n|  spflag\n|      reserved\n|\n|  spinact\n|      #days after pw expires until account is disabled\n|\n|  splstchg\n|      date of last change\n|\n|  spmax\n|      max #days between changes\n|\n|  spmin\n|      min #days between changes\n|\n|  spnam\n|      login name; deprecated\n|\n|  spnamp\n|      login name\n|\n|  sppwd\n|      encrypted password; deprecated\n|\n|  sppwdp\n|      encrypted password\n|\n|  spwarn\n|      #days before pw expires to warn user about it\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  matchargs = ('spnamp', 'sppwdp', 'splstchg', 'spmin', 'spmax...\n|\n|  nfields = 11\n|\n|  nsequencefields = 9\n|\n|  nunnamedfields = 0\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.tuple:\n|\n|  add(self, value, /)\n|      Return self+value.\n|\n|  contains(self, key, /)\n|      Return key in self.\n|\n|  eq(self, value, /)\n|      Return self==value.\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  getitem(self, key, /)\n|      Return self[key].\n|\n|  getnewargs(self, /)\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  hash(self, /)\n|      Return hash(self).\n|\n|  iter(self, /)\n|      Implement iter(self).\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  len(self, /)\n|      Return len(self).\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  mul(self, value, /)\n|      Return self*value.\n|\n|  ne(self, value, /)\n|      Return self!=value.\n|\n|  rmul(self, value, /)\n|      Return value*self.\n|\n|  count(self, value, /)\n|      Return number of occurrences of value.\n|\n|  index(self, value, start=0, stop=9223372036854775807, /)\n|      Return first index of value.\n|\n|      Raises ValueError if the value is not present.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from builtins.tuple:\n|\n|  classgetitem(...) from builtins.type\n|      See PEP 585\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "getspall",
                    "content": "Return a list of all available shadow password database entries, in arbitrary order.\n\nSee `help(spwd)` for more on shadow password database entries.\n"
                },
                {
                    "name": "getspnam",
                    "content": "Return the shadow password database entry for the given user name.\n\nSee `help(spwd)` for more on shadow password database entries.\n"
                }
            ]
        },
        "FILE": {
            "content": "(built-in)\n\n",
            "subsections": []
        }
    },
    "summary": "spwd",
    "flags": [],
    "examples": [],
    "see_also": []
}