{"id":7847,"date":"2020-10-23T13:43:50","date_gmt":"2020-10-23T13:43:50","guid":{"rendered":"https:\/\/www.origo.io\/info\/stabile-documentation\/the-cli\/"},"modified":"2022-11-28T01:10:59","modified_gmt":"2022-11-28T00:10:59","slug":"the-cli","status":"publish","type":"page","link":"https:\/\/origo.systems\/info\/stabiledocs\/the-cli\/","title":{"rendered":"The Cli"},"content":{"rendered":"\n<p>Origo OS comes with an experimental command line client called &#8220;stash&#8221;. It is very much an experimental utility, but useful for things like resetting your password, if you have locked yourself out. Below are a couple of examples.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Reset your password<\/h4>\n\n\n\n<ol class=\"wp-block-list\"><li>Launch stash by typing &#8220;sudo stash&#8221; at a command line. Note that stash must be launched with root privileges.<\/li><li>Type &#8220;users&#8221; to change to the users module.<\/li><li>Type &#8220;list&#8221;, to locate the user id you want to change the password for.<\/li><li>Type the user id you located to make  that user the active object.<\/li><li>Type &#8220;password=yournewpassword&#8221;<\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">Piping to stash<\/h4>\n\n\n\n<p>The above may also be achieved by piping the above (separated by slashes) to stash:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"\/users\/user-id\/password=yournewpassword\" | sudo stash<\/code><\/pre>\n\n\n\n<p>Here&#8217;s another example which simply defines an IP address and and a network your account is allowed to log in from:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"\/users\/user-id\/allowfrom='192.168.0.22 10.1.2.0\/24'\" | sudo stash<\/code><\/pre>\n\n\n\n<p>And here&#8217;s how to remove this restraint, and allow login from everywhere:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"\/users\/user-id\/allowfrom=--\" | sudo stash<\/code><\/pre>\n\n\n\n<p>In general two hyphens &#8220;&#8211;&#8221; is used to remove a value.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Origo OS comes with an experimental command line client called &#8220;stash&#8221;. It is very much an experimental utility, but useful for things like resetting your password, if you have locked yourself out. Below are a couple of examples. Reset your password Launch stash by typing &#8220;sudo stash&#8221; at a command<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":729,"menu_order":43,"comment_status":"closed","ping_status":"closed","template":"page-leftsb.php","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-7847","page","type-page","status-publish","hentry"],"acf":[],"featured_image_src":null,"featured_image_src_square":null,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/pages\/7847","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/comments?post=7847"}],"version-history":[{"count":19,"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/pages\/7847\/revisions"}],"predecessor-version":[{"id":12754,"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/pages\/7847\/revisions\/12754"}],"up":[{"embeddable":true,"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/pages\/729"}],"wp:attachment":[{"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/media?parent=7847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}