{"id":5159,"date":"2019-12-25T16:05:04","date_gmt":"2019-12-25T16:05:04","guid":{"rendered":"https:\/\/swiv.com.br\/the-journey-begins\/"},"modified":"2026-05-27T20:02:55","modified_gmt":"2026-05-27T19:02:55","slug":"the-journey-begins","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2019\/12\/25\/the-journey-begins\/","title":{"rendered":"Reset do &#8220;root&#8221; no Oracle Linux 7"},"content":{"rendered":"\n<p>Alguns meses atr\u00e1s eu havia criado uma V.M para laborat\u00f3rio, com um Oracle Linux 7 instalado. O problema \u00e9 que fiquei muito tempo sem utiliz\u00e1-la, e agora n\u00e3o me recordo da senha do &#8220;root&#8221;.<br>Est\u00e1 a\u00ed uma oportunidade de aprender algo novo. Encontrei um artigo no M.O.S (<strong>How to Reset Root Password in Oracle Linux 7 (Doc ID 1954652.1)<\/strong>) com um procedimento de reset, e vou coloc\u00e1-lo em pr\u00e1tica agora:<\/p>\n\n\n\n<p>Vers\u00e3o do Sistema Operacional:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;teste@localhost ~]$ cat \/etc\/*release*\nOracle Linux Server release 7.0\nNAME=&quot;Oracle Linux Server&quot;\nVERSION=&quot;7.0&quot;\nID=&quot;ol&quot;\nVERSION_ID=&quot;7.0&quot;\nPRETTY_NAME=&quot;Oracle Linux Server 7.0&quot;\nANSI_COLOR=&quot;0;31&quot;\nCPE_NAME=&quot;cpe:\/o:oracle:oracle_linux:7.0:GA:server&quot;\nHOME_URL=&quot;https:\/\/linux.oracle.com\/&quot;\nBUG_REPORT_URL=&quot;https:\/\/bugzilla.oracle.com\/&quot;\n<\/pre><\/div>\n\n\n<p>A primeira etapa \u00e9 durante o boot da m\u00e1quina, onde pressionamos a letra &#8220;e&#8221;:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-673.png\" alt=\"\" class=\"wp-image-8540\"\/><\/figure>\n\n\n\n<p>Depois encontramos a linha que come\u00e7a com o prefixo &#8220;linux16&#8221; (clique com a seta para baixo para encontrar essa linha) e adicionamos ao final o par\u00e2metro &#8220;rd.break&#8221;:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-674.png\" alt=\"\" class=\"wp-image-8541\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-675.png\" alt=\"\" class=\"wp-image-8542\"\/><\/figure>\n\n\n\n<p>Agora, use o  &#8220;Ctrl + X&#8221; para fazer o boot ou Start.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-676.png\" alt=\"\" class=\"wp-image-8543\"\/><\/figure>\n\n\n\n<p>Agora podemos digitar os comandos que realizar\u00e3o o reset da credencial. Perceba que tentei usar uma senha muito simples, que n\u00e3o foi aceita pelo S.O.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# mount -o remount,rw \/sysroot\n# chroot \/sysroot\n# passwd\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-677.png\" alt=\"\" class=\"wp-image-8544\"\/><\/figure>\n\n\n\n<p>Digitar os comandos abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# touch \/.autorelabel\n# sync\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-678.png\" alt=\"\" class=\"wp-image-8545\"\/><\/figure>\n\n\n\n<p>Digite 2 vezes o &#8220;exit&#8221;. Depois disso a m\u00e1quina ir\u00e1 reiniciar, e voc\u00ea j\u00e1 poder\u00e1 conectar com o root usando a nova credencial, vide conex\u00e3o SSH abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nMacBook-Pro-de-Bruno:~ brunosantos$ ssh root@192.168.0.109\nroot@192.168.0.109&#039;s password: \nLast login: Wed Dec 25 15:10:23 2019\n&#x5B;root@localhost ~]# \n&#x5B;root@localhost ~]# id\nuid=0(root) gid=0(root) grupos=0(root)\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Alguns meses atr\u00e1s eu havia criado uma V.M para laborat\u00f3rio, com um Oracle Linux 7 instalado. O problema \u00e9 que fiquei muito tempo sem utiliz\u00e1-la, e agora n\u00e3o me recordo da senha do &#8220;root&#8221;.Est\u00e1 a\u00ed uma oportunidade de aprender algo novo. Encontrei um artigo no M.O.S (How to Reset Root Password in Oracle Linux 7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[21],"class_list":["post-5159","post","type-post","status-publish","format-standard","hentry","category-linux","tag-oracle-linux"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=5159"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5159\/revisions"}],"predecessor-version":[{"id":9320,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5159\/revisions\/9320"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=5159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=5159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=5159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}