{
    "content": [
        {
            "type": "text",
            "text": "# Net::LDAP::Extension::SetPassword (info)\n\n## NAME\n\nNet::LDAP::Extension::SetPassword - LDAPv3 Modify Password extension object\n\n## SYNOPSIS\n\nuse Net::LDAP;\nuse Net::LDAP::Extension::SetPassword;\n$ldap = Net::LDAP->new( \"ldap.mydomain.eg\" );\n$ldap->bind('cn=Joe User,cn=People,dc=mydomain,dc=eg\",\npassword => 'oldPassword');\n$mesg = $ldap->setpassword( oldpasswd => 'oldPassword' );\ndie \"error: \", $mesg->code(), \": \", $mesg->error()  if ($mesg->code());\nprint \"changed your password to\", $mesg->genpassword() , \"\\n\";\n\n## DESCRIPTION\n\n\"Net::LDAP::Extension::SetPassword\" implements the \"Modify Password\"\nextended LDAPv3 operation as described in RFC 3062.\n\n## Sections\n\n- **Net::LDAP::Extension::UseraContributed PNet::LDAP::Extension::SetPassword(3pm)**\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS**\n- **SEE ALSO**\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Net::LDAP::Extension::SetPassword",
        "section": "",
        "mode": "info",
        "summary": "Net::LDAP::Extension::SetPassword - LDAPv3 Modify Password extension object",
        "synopsis": "use Net::LDAP;\nuse Net::LDAP::Extension::SetPassword;\n$ldap = Net::LDAP->new( \"ldap.mydomain.eg\" );\n$ldap->bind('cn=Joe User,cn=People,dc=mydomain,dc=eg\",\npassword => 'oldPassword');\n$mesg = $ldap->setpassword( oldpasswd => 'oldPassword' );\ndie \"error: \", $mesg->code(), \": \", $mesg->error()  if ($mesg->code());\nprint \"changed your password to\", $mesg->genpassword() , \"\\n\";",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "Net::LDAP::Extension::UseraContributed PNet::LDAP::Extension::SetPassword(3pm)",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 43,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "Net::LDAP::Extension::UseraContributed PNet::LDAP::Extension::SetPassword(3pm)": {
                "content": "",
                "subsections": []
            },
            "NAME": {
                "content": "Net::LDAP::Extension::SetPassword - LDAPv3 Modify Password extension\nobject\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Net::LDAP;\nuse Net::LDAP::Extension::SetPassword;\n\n$ldap = Net::LDAP->new( \"ldap.mydomain.eg\" );\n\n$ldap->bind('cn=Joe User,cn=People,dc=mydomain,dc=eg\",\npassword => 'oldPassword');\n\n$mesg = $ldap->setpassword( oldpasswd => 'oldPassword' );\n\ndie \"error: \", $mesg->code(), \": \", $mesg->error()  if ($mesg->code());\n\nprint \"changed your password to\", $mesg->genpassword() , \"\\n\";\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"Net::LDAP::Extension::SetPassword\" implements the \"Modify Password\"\nextended LDAPv3 operation as described in RFC 3062.\n\nIt implements no object by itself but extends the Net::LDAP object by\nanother method:\n",
                "subsections": []
            },
            "METHODS": {
                "content": "setpassword ( OPTIONS )\nSet the password for a user.\n\nOPTIONS is a list of key/value pairs. The following keys are\nrecognized:\n\nuser\nIf present, this option contains the octet string\nrepresentation of the user associated with the request.\nDepending on how users are identified in the directory this\nstring may or may not be a DN according to RFC 4514.\n\nIf this option is not present, the request acts up upon the\npassword of the user currently associated with the LDAP\nsession.\n\noldpasswd\nThis option, if present, must contain the current password of\nthe user for whom this operation is performed.\n\nIt depends on the server's implementation in which\ncircumstances this option is allowed to be missing.\n\nnewpasswd\nIf present, this option contains the desired password for the\nuser for whom the operation is performed.\n\nDepending on the server's implementation this option may be\nrequired by the LDAP server.\n\ngenpassword ( )\nReturn the password generated by the server in response to the\n\"setpassword()\" call when applicable. The server will not generate\na new password if \"newpasswd\" was passed to \"setpassword()\".\n\nThis method is a method of the Net::LDAP::Message response object\nreturned in reply to \"setpassword()\" in case the \"setpassword()\"\ncall succeeded.\n\nBy this method the caller can query for the value of the password\nin case he did not call \"setpassword()\" with the \"newpasswd\"\noption.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Net::LDAP, Net::LDAP::Extension\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Graham Barr <gbarr@pobox.com>, documentation by Peter Marschall\n<peter@adpm.de>.\n\nPlease report any bugs, or post any suggestions, to the perl-ldap\nmailing list <perl-ldap@perl.org>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (c) 2002-2004 Graham Barr. All rights reserved. This program\nis free software; you can redistribute it and/or modify it under the\nsame terms as Perl itself.\n\nperl v5.32.0                      2021-0Net::LDAP::Extension::SetPassword(3pm)",
                "subsections": []
            }
        }
    }
}