Unlock HMC8 root user and HMC9

Someday you need root user HMC dry point of "bad thing", find a circle did not find the correct HMC v8 and v9 root user crack tutorial, and then their own research, I learned you can use the root user. As used herein, test HMC mounted in VMware workstation, a method of sharing by a test in HMC V8R860_SP3 (buid 20180802.1) HMC V9R1M930 (buid 1904220700). Ado, get on the train it!

 

1, the HMC restart, after the BIOS self-test Great Press up and down, the grub interrupt the autoboot, then stopped at this interface, press e.

 

 

2, the cursor to the last input single linux this line, and then press ctrl + x continue booting.

 

 

3, then wait a minute, will interface to enter the root password, there is input passw0rd, Enter.

 

 

4, edit sshd_config file, no PermitRootLogin no change in this line yes.

1 # sed -i ‘s/^PermitRootLogin no/PermitRootLogin yes/g’ /etc/ssh/sshd_config      

If you do not want to replace with sed, open the file with vi replaced and then save is possible.

 

5, the owner /home/hscroot/.ssh temporary directory instead hscroot, then su - hscroot, su attention here to hscroot users may need to respond over twelve minutes, it is normal.

# chown hscroot:hmc /home/hscroot/.ssh/
# su - hscroot

 

6, a user generated hscroot ssh RSA public key, enter the following command, and then return four times.

# chown hscroot:hmc /home/hscroot/.ssh/
# su - hscroot

 

exit to return after the execution from hscroot user to the root user.

 

 

7, the owner /home/hscroot/.ssh changed back to root directory, and add to the root user authorized_keys2 file hscroot user's public key, and then reboot reboot.

# chown root:hmc /home/hscroot/.ssh
# mkdir /root/.ssh
# cat /home/hscroot/.ssh/id_rsa.pub > /root/.ssh/authorized_keys2
# reboot

 

8, after the restart to complete the login screen appears, setting 22 ports inside release SSH in HMC, open the remote command execution, log in to the HMC with hscroot use ssh client, the default password is abc123, then ssh in hscroot user's shell inside root @ localhost no password, you can enter directly into the root user shell. Note that can not directly use ssh root, HMC limit the root user directly ssh login.

 

 

 

 

  

 

To summarize, HMC8 / 9 has been unable to crack the method according to the original root user, similar files copied su ah like have been ineffective. The methods described herein achieve HMC root privileges is actually very simple, allowing the user root ssh, ssh then hscroot user's public key is added to the root user's password-free login file inside, disguised realized the root user login, will achieve our aim .

Guess you like

Origin www.cnblogs.com/iwantcomputer/p/11516617.html