<p style="margin-top: 24px; margin-bottom: 24px; padding: 0px; box-sizing: border-box; line-height: 30px; color: rgb(45, 48, 55); word-break: break-all; font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);">Log in as root and execute:</p><div class="pre-wrapper" style="margin: 8px 0px; padding: 0px; box-sizing: border-box; position: relative; color: rgb(45, 48, 55); font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);"><pre class="brush:bash;toolbar:false hljs language-bash" data-copyid="1" data-highlighted="yes" style="margin-top: 8px; margin-bottom: 8px; padding: 15px; box-sizing: border-box; overflow-x: auto; background-color: rgb(240, 242, 245); font-size: 14px; border: 1px solid rgb(219, 225, 232); border-radius: 4px; text-wrap: wrap; overflow-wrap: break-word; word-break: break-all;">#Passwd username (change password) # useradd username (add user)</pre><button class="ai-code-helper" style="margin: 0px; padding: 0px 8px; position: absolute; top: 2px; right: 80px; height: 24px; line-height: 24px; font-size: 12px; color: rgb(255, 239, 239); background: rgb(255, 102, 102); border-radius: 4px; outline: none; border-width: initial; border-style: none; border-color: initial; cursor: pointer; opacity: 0;">AI代码助手</button><button class="copy-code" title="复制" style="margin: 0px; padding: 0px 8px; position: absolute; top: 2px; right: 8px; background: rgb(240, 242, 245); height: 24px; line-height: 24px; font-size: 12px; color: rgb(158, 167, 179); border-radius: 4px; outline: none; border-width: initial; border-style: none; border-color: initial; cursor: pointer; opacity: 0;">复制代码</button></div><p style="margin-top: 24px; margin-bottom: 24px; padding: 0px; box-sizing: border-box; line-height: 30px; color: rgb(45, 48, 55); word-break: break-all; font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);">Specific examples are as follows:</p><div class="pre-wrapper" style="margin: 8px 0px; padding: 0px; box-sizing: border-box; position: relative; color: rgb(45, 48, 55); font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);"><pre class="brush:bash;toolbar:false hljs language-csharp" data-copyid="2" data-highlighted="yes" style="margin-top: 8px; margin-bottom: 8px; padding: 15px; box-sizing: border-box; overflow-x: auto; background-color: rgb(240, 242, 245); font-size: 14px; border: 1px solid rgb(219, 225, 232); border-radius: 4px; text-wrap: wrap; overflow-wrap: break-word; word-break: break-all;">[root@bogon ~]# passwd rootchanging password for user root.new unix password: bad password: it is based on a dictionary word retype new unix password: passwd: all authentication tokens updated successfully.</pre><button class="ai-code-helper" style="margin: 0px; padding: 0px 8px; position: absolute; top: 2px; right: 80px; height: 24px; line-height: 24px; font-size: 12px; color: rgb(255, 239, 239); background: rgb(255, 102, 102); border-radius: 4px; outline: none; border-width: initial; border-style: none; border-color: initial; cursor: pointer; opacity: 0;">AI代码助手</button><button class="copy-code" title="复制" style="margin: 0px; padding: 0px 8px; position: absolute; top: 2px; right: 8px; background: rgb(240, 242, 245); height: 24px; line-height: 24px; font-size: 12px; color: rgb(158, 167, 179); border-radius: 4px; outline: none; border-width: initial; border-style: none; border-color: initial; cursor: pointer; opacity: 0;">复制代码</button></div><p>Root password retrieval method in Linux</p><p>The root of Linux enjoys supreme power, and once the root password is forgotten or stolen, it can be a very headache. So how can we retrieve the root password? I summarize it as follows:</p><p>(1) Linux system password cracking</p><p>1. Press e in the grub options menu to enter editing mode</p><p>2. Edit the line in the kernel/init 1 (or/single)</p><p>3. Press b to restart</p><p>4. Execute the following commands after entering</p><div class="pre-wrapper" style="margin: 8px 0px; padding: 0px; box-sizing: border-box; position: relative; color: rgb(45, 48, 55); font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);"><pre class="brush:bash;toolbar:false hljs language-cpp" data-copyid="3" data-highlighted="yes" style="margin-top: 8px; margin-bottom: 8px; padding: 15px; box-sizing: border-box; overflow-x: auto; background-color: rgb(240, 242, 245); font-size: 14px; border: 1px solid rgb(219, 225, 232); border-radius: 4px; text-wrap: wrap; overflow-wrap: break-word; word-break: break-all;">root@#passwd root (Configure the password for root)enter new unix password:Enter a new password root@#init 6</pre><button class="ai-code-helper" style="margin: 0px; padding: 0px 8px; position: absolute; top: 2px; right: 80px; height: 24px; line-height: 24px; font-size: 12px; color: rgb(255, 239, 239); background: rgb(255, 102, 102); border-radius: 4px; outline: none; border-width: initial; border-style: none; border-color: initial; cursor: pointer; opacity: 0;">AI代码助手</button><button class="copy-code" title="复制" style="margin: 0px; padding: 0px 8px; position: absolute; top: 2px; right: 8px; background: rgb(240, 242, 245); height: 24px; line-height: 24px; font-size: 12px; color: rgb(158, 167, 179); border-radius: 4px; outline: none; border-width: initial; border-style: none; border-color: initial; cursor: pointer; opacity: 0;">复制代码</button></div><p>(2) Debian Linux system password cracking</p><p>1. In the grub options menu 'Debian GNU/Linux' (recovery mode), press e to enter editing mode</p><p>2. Change the row of ro single in the kernel to rw single init=/bin/bash, and press b to restart</p><p>3. Execute the following commands after entering</p><div class="pre-wrapper" style="margin: 8px 0px; padding: 0px; box-sizing: border-box; position: relative; color: rgb(45, 48, 55); font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);"><pre class="brush:bash;toolbar:false hljs language-bash" data-copyid="4" data-highlighted="yes" style="margin-top: 8px; margin-bottom: 8px; padding: 15px; box-sizing: border-box; overflow-x: auto; background-color: rgb(240, 242, 245); font-size: 14px; border: 1px solid rgb(219, 225, 232); border-radius: 4px; text-wrap: wrap; overflow-wrap: break-word; word-break: break-all;">root@(none)#mount -aroot@(none)#passwd rootroot@(none)#reboot</pre><button class="ai-code-helper" style="margin: 0px; padding: 0px 8px; position: absolute; top: 2px; right: 80px; height: 24px; line-height: 24px; font-size: 12px; color: rgb(255, 239, 239); background: rgb(255, 102, 102); border-radius: 4px; outline: none; border-width: initial; border-style: none; border-color: initial; cursor: pointer; opacity: 0;">AI代码助手</button><button class="copy-code" title="复制" style="margin: 0px; padding: 0px 8px; position: absolute; top: 2px; right: 8px; background: rgb(240, 242, 245); height: 24px; line-height: 24px; font-size: 12px; color: rgb(158, 167, 179); border-radius: 4px; outline: none; border-width: initial; border-style: none; border-color: initial; cursor: pointer; opacity: 0;">复制代码</button></div><p>(3) Freebsd system password cracking</p><p>1. Start up and enter the boot menu</p><p>2. Select each item (press 4) to enter single user mode</p><p>3. Enter a list of commands after entering</p><div class="pre-wrapper" style="margin: 8px 0px; padding: 0px; box-sizing: border-box; position: relative; color: rgb(45, 48, 55); font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif; text-wrap: wrap; background-color: rgb(255, 255, 255);"><pre class="brush:bash;toolbar:false hljs language-bash" data-copyid="5" data-highlighted="yes" style="margin-top: 8px; margin-bottom: 8px; padding: 15px; box-sizing: border-box; overflow-x: auto; background-color: rgb(240, 242, 245); font-size: 14px; border: 1px solid rgb(219, 225, 232); border-radius: 4px; text-wrap: wrap; overflow-wrap: break-word; word-break: break-all;">root@#mount -aroot@#fsck -yroot@#passwd(Change password command)</pre></div><p><br/></p>