{"id":1138,"date":"2025-05-19T21:25:44","date_gmt":"2025-05-19T20:25:44","guid":{"rendered":"https:\/\/monkey.ploogie.co.uk\/?page_id=1138"},"modified":"2025-05-19T21:41:44","modified_gmt":"2025-05-19T20:41:44","slug":"mwnci-hashspw-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-hashspw-function\/","title":{"rendered":"Mwnci hashspw() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>hashspw<strong>()<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>hashspw()<\/i> function returns a hash of the shadow password file keyed on username.<\/p>\n<h2>Example<\/h2>\n<pre>include(\"shadow\")\r\nprintln(hashspw(), \"\\n\")\r\nprintln(hashspw()[\"root\"])\r\n\r\n{\"fwupd-refresh\": {\"MaxAge\": null, \"Warning\": null, \"Inactive\": null, \"Expire\": null, \"Flag\": null, \"Passwd\": \"!\", \"LastChange\": 19279, \"MinAge\": null}, \"_apt\": {\"MinAge\": 0, \"MaxAge\": 99999, \"Warning\": 7, \"Inactive\": null, \"Expire\": null, \"Flag\": null, \"Passwd\": \"*\", \"LastChange\": 19259}, \"mysql\": {\"MinAge\": null, \"MaxAge\": null, \"Warning\": null, \"Inactive\": null, \"Expire\": null, \"Flag\": null, \"Passwd\": \"!\", \"LastChange\": 19286}, ..., ...}\r\n\r\n{\"Expire\": null, \"Flag\": null, \"Passwd\": \"$W2EfuJiS91n1DJCpjPUDw\", \"LastChange\": 19259, \"MinAge\": 0, \"MaxAge\": 99999, \"Warning\": 7, \"Inactive\": null}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax hashspw() Description The hashspw() function returns a hash of the shadow password file keyed on username. Example include(&#8220;shadow&#8221;) println(hashspw(), &#8220;\\n&#8221;) println(hashspw()[&#8220;root&#8221;]) {&#8220;fwupd-refresh&#8221;: {&#8220;MaxAge&#8221;: null, &#8220;Warning&#8221;: null, &#8220;Inactive&#8221;: null, &#8220;Expire&#8221;: null, &#8220;Flag&#8221;: null, &#8220;Passwd&#8221;: &#8220;!&#8221;, &#8220;LastChange&#8221;: 19279, &#8220;MinAge&#8221;: null}, &#8220;_apt&#8221;: {&#8220;MinAge&#8221;: 0, &#8220;MaxAge&#8221;: 99999, &#8220;Warning&#8221;: 7, &#8220;Inactive&#8221;: null, &#8220;Expire&#8221;: null, &#8220;Flag&#8221;: null, &#8220;Passwd&#8221;: &#8220;*&#8221;, &#8220;LastChange&#8221;: &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-hashspw-function\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mwnci hashspw() 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-1138","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1138","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=1138"}],"version-history":[{"count":3,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1138\/revisions"}],"predecessor-version":[{"id":1140,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1138\/revisions\/1140"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}