{"id":2732,"date":"2015-11-18T09:22:26","date_gmt":"2015-11-18T17:22:26","guid":{"rendered":"http:\/\/upon2020.com\/blog\/?p=2732"},"modified":"2015-11-17T19:36:41","modified_gmt":"2015-11-18T03:36:41","slug":"setting-a-root-password-the-stress-free-way","status":"publish","type":"post","link":"https:\/\/upon2020.com\/blog\/2015\/11\/setting-a-root-password-the-stress-free-way\/","title":{"rendered":"Setting a root password, the stress-free way"},"content":{"rendered":"<p><a href=\"https:\/\/www.raspberrypi.org\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright\" alt=\"\" src=\"https:\/\/www.raspberrypi.org\/wp-content\/uploads\/2012\/03\/raspberry_pi_logo_rgb_552x650-212x250.png\" width=\"127\" height=\"150\" \/><\/a>Just created myself a new boot disk for a Raspberry Pi. Booted it, darn, how do I log on?<\/p>\n<p>Usually, you need to find a keyboard and plug it in. And a monitor and plug it in. And an HDMI cable in between. Assuming that you can find an extra HDMI cable. That the monitor is not too far away from the Raspberri Pi. That there is room to string the cable. That you don&#8217;t knock a ton of things off your desk. That you can reach the almost-impossible-to-access HDMI port on your monitor. Assuming it has one. And then log on and remember how to set up <tt>ssh<\/tt> access securely, which, in the best case, involves <tt>vi<\/tt>, <tt>\/etc\/sudoers.d\/something-whose-syntax-I-cannot-remember<\/tt>, <tt>scp<\/tt>, <tt>chmod<\/tt> and maybe <tt>systemctl<\/tt>. In other words, a major nightmare.<\/p>\n<p><a href=\"http:\/\/upon2020.com\/blog\/wp-content\/uploads\/2015\/03\/ubos-03.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright  wp-image-2438\" alt=\"ubos-03\" src=\"http:\/\/upon2020.com\/blog\/wp-content\/uploads\/2015\/03\/ubos-03.png\" width=\"150\" height=\"150\" srcset=\"https:\/\/upon2020.com\/blog\/wp-content\/uploads\/2015\/03\/ubos-03.png 250w, https:\/\/upon2020.com\/blog\/wp-content\/uploads\/2015\/03\/ubos-03-150x150.png 150w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a>Well, this is what I just did instead:<\/p>\n<ul>\n<li>Took a USB stick from the shelf labeled &#8220;UBOS shepherd home&#8221;.<\/li>\n<li>Inserted USB stick into Raspberry Pi<\/li>\n<li>Rebooted Raspberry Pi and waited for a minute.<\/li>\n<li>From my regular workstation (a MacBook Pro), typed:\n<pre>&gt; ssh shepherd@ubos-raspberry-pi\r\n&gt; sudo bash\r\n&gt; whoami\r\n&gt; root<\/pre>\n<\/li>\n<\/ul>\n<p>That was all. But then, my Raspberry Pi is running <a href=\"http:\/\/ubos.net\/\">UBOS<\/a> Linux where things are just a taaaad simpler than on a traditional Linux distro.<\/p>\n<p>(In case you are wondering, the USB stick contains my public ssh key and a few other bits. I use it to provision admin accounts on all of my servers at home. UBOS docs on this feature are <a href=\"http:\/\/ubos.net\/docs\/users\/shepherd-staff.html\">here<\/a>.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just created myself a new boot disk for a Raspberry Pi. Booted it, darn, how do I log on? Usually, you need to find a keyboard and plug it in. And a monitor and plug it in. And an HDMI cable in between. Assuming that you can find an extra HDMI cable. That the monitor&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled":false,"footnotes":""},"categories":[67],"tags":[],"class_list":["post-2732","post","type-post","status-publish","format-standard","hentry","category-uncategorized","kind-"],"kind":false,"_links":{"self":[{"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/posts\/2732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/comments?post=2732"}],"version-history":[{"count":5,"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/posts\/2732\/revisions"}],"predecessor-version":[{"id":2737,"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/posts\/2732\/revisions\/2737"}],"wp:attachment":[{"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/media?parent=2732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/categories?post=2732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/upon2020.com\/blog\/wp-json\/wp\/v2\/tags?post=2732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}