{"id":1136,"date":"2025-05-19T20:45:23","date_gmt":"2025-05-19T19:45:23","guid":{"rendered":"https:\/\/monkey.ploogie.co.uk\/?page_id=1136"},"modified":"2026-04-02T10:39:39","modified_gmt":"2026-04-02T09:39:39","slug":"mwnci-getspnam-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-getspnam-function\/","title":{"rendered":"Mwnci getspnam() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>getspnam<strong>(<em>string<\/em>)<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>getspnam()<\/i> function returns the shadow password entry for the given username as a hash.<\/p>\n<p>If a username is not given or not found, an empty hash is returned.<\/p>\n<h2>Example<\/h2>\n<pre>include(\"shadow\")\r\nprintln(getspnam())\r\nprintln(getspnam(\"root\"))\r\nprintln(getspnam(\"foobar\"))\r\n\r\n{}\r\n{\"Flag\": null, \"User\": \"root\", \"LastChange\": 19259, \"MinAge\": 0, \"Warning\": 7, \"Inactive\": null, \"Passwd\": \"$y$j9T$enCAti10xvPSr.W2EfuJiao3S91n1DJCpjPUDwT\/uujG1gff86GNO9\", \"MaxAge\": 99999, \"Expire\": null}\r\n{}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax getspnam(string) Description The getspnam() function returns the shadow password entry for the given username as a hash. If a username is not given or not found, an empty hash is returned. Example include(&#8220;shadow&#8221;) println(getspnam()) println(getspnam(&#8220;root&#8221;)) println(getspnam(&#8220;foobar&#8221;)) {} {&#8220;Flag&#8221;: null, &#8220;User&#8221;: &#8220;root&#8221;, &#8220;LastChange&#8221;: 19259, &#8220;MinAge&#8221;: 0, &#8220;Warning&#8221;: 7, &#8220;Inactive&#8221;: null, &#8220;Passwd&#8221;: &#8220;$y$j9T$enCAti10xvPSr.W2EfuJiao3S91n1DJCpjPUDwT\/uujG1gff86GNO9&#8221;, &#8220;MaxAge&#8221;: 99999, &#8220;Expire&#8221;: &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-getspnam-function\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mwnci getspnam() Function&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1136","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=1136"}],"version-history":[{"count":3,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1136\/revisions"}],"predecessor-version":[{"id":1426,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1136\/revisions\/1426"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}