This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
vmware:esxi5:rootpw [2024/09/11 04:49] – js | vmware:esxi5:rootpw [2024/09/17 08:42] (current) – js | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== How delete root login password ====== | ====== How delete root login password ====== | ||
- | - download the [[linux: | + | - download the [[linux: |
- | - reboot server and boot from iso | + | - reboot server and boot from iso \\ \\ |
- | - the GParted window show the partitions on the server {{ : | + | - the GParted window show the partitions on the server |
- | - /dev/sda5 is the first esxi partition | + | - /dev/sda5 is the first esxi partition |
- | - open a terminal | + | - open a terminal |
- | - enter <code bash> | + | - enter following command to change on root: <code bash> |
- | - create a subdir in the mount dir /mnt with <code bash> | + | - create a subdir in the mount dir /mnt: <code bash> |
+ | - mount sda5 (or maybe a other partition): <code bash> | ||
+ | - find the state.tgz in mounted dir: <code bash>ls / | ||
+ | - copy state.tgz to temp dir: <code bash>cp / | ||
+ | - change to tmp dir: <code bash>cd / | ||
+ | - unpack state.tgz: <code bash>tar xzf state.tgz</ | ||
+ | - now you can see the content of the file in /tmp \\ {{: | ||
+ | - unpack the local.tgz file: <code bash>tar xzf local.tgz</ | ||
+ | - change to etc dir: <code bash>cd etc</ | ||
+ | - open shardow file with vi: <code bash>vi shadow</ | ||
+ | - delete the password hash after the root account (press i, go to the : and delete all the chars until the next : ) \\ {{: | ||
+ | - save file and exit (save with ESC + :wq + ENTER) \\ \\ | ||
+ | - go one dir up: <code bash>cd ..</ | ||
+ | - pack the new local.tgz: <code bash>tar czf local.tgz etc</ | ||
+ | - pack the new state.tgz: <code bash>tar czf state.tgz local.tgz</ | ||
+ | - backup the original state.tgz: <code bash>cp / | ||
+ | - copy the new state.tgz: <code bash>cp / | ||
+ | - unmount esxi partition: <code bash> | ||
+ | - take of CD, USB stick or unmount remote ISO and reboot server: <code bash> | ||
+ | |||
+ | The ESXi should now reboot and after the boot is finished you can check the login with F2 (Settings) and login with root with empty (or without) password. | ||