proxmox LXC 忘記密碼

pct enter
passwd

exit

Method 1
Boot into your bootloader (mostly grub or systemd-boot, select your preferred kernel but do not press enter.
Press e to go into edit mode.
Depending on the boot-loader go to the kernel-commandline entry:
For grub: scroll down to the kernel line you will boot from, it starts with linux /vmlinuz-…
For systemd-boot the kernel commandline is directly editable
Scroll to the end of that line, optionally remove the quiet in the line and append init=/bin/bash
For grub press Ctrl X to boot, for systemd-boot simply press Enter
In the resulting shell:

# Remount / as Read/Write
mount -o remount,rw /
# Change the root account password with
passwd
# Change any other account password with
passwd username
# type new password, confirm and hit enter and then reboot.

本篇發表於 proxmox。將永久鍊結加入書籤。

發表迴響

您的電子郵件位址並不會被公開。 必要欄位標記為 *

*

您可以使用這些 HTML 標籤與屬性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>