官网连接:https://pve.proxmox.com/wiki/Root_Password_Reset

Root Password Reset

 
 

Resetting the root account password on the PVE Host

The following is quoted from Debian Squeeze change root password and works for Proxmox VE3.x and 4.x (It can also be used to change any account password as well as for other Debian based distributions):

Method 1

  • Boot into grub, select single user but do not press enter.
  • Press e to go into edit mode.
  • Scroll down to the kernel line you will boot from, it starts with "linux /boot/vmlinuz-……."
  • Scroll to the end of that line and press space key once and type init=/bin/bash
  • Press Ctrl X to boot
# Remount / as Read/Write
mount -rw -o remount /
# 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.

Method 2

  • Boot from another installation of Debian. (One can use a LiveCD to get access to the "/" partition.)
  • Then, mount the partition where you have Debian's "/" (root directory), then change directory to /mnt/etc
  • Used vim / nano as an editor to edit the file shadow.
  • Find the line starting with root: (or another username)
  • Delete everything between the first and second colons (:), and the line will now look like:
root::$6$fsdsdgdsg74.:14862:0:99999:7:::
  • Reboot and login as root (or another username as used above) without a password.
  • At the end use passwd to set a new password for the root account (or passwd username to change any account password).
  • Reboot and login as root with the new root password.

Resetting the root account password in a Container

  • Enter the working container and change the password using:
lxc-attach -n enter <VEID>
passwd <new password>
exit
  • When using OpenVZ containers (up to PVE 3.4) use
vzctl enter <VEID>

to enter the container.

Proxmox如何进入单人维护模式(重置root密码)的更多相关文章

  1. 【linux】linux如何进入单人维护模式修改root密码

  2. CentOS6和CentOS7进入单用户模式重置root密码

    一.前言 如果在Linux系统下root密码丢失或者需要破解物理机器用户密码,可以通过进入系统单用户模式进行重置root密码.本文介绍CentOS6和CentOS7两个系统版本进行root密码重置. ...

  3. Centos7重置root密码的方法(亲测有效)

    CentOS 7的更新还是非常大的,很多平时使用的命令已经变化了,要上手还真要一段时间.比如忘记root密码.在5.6的系统中直接进入单用户模式下,一个passwd命令修改,重启即可.但是在Cento ...

  4. RHEL6.3进入单用户模式并重置root密码

    单用户模式类似于windows下的安全模式,允许root账号不输入密码直接启动并登录系统进行系统维护. 单用户模式只允许root账号登录,不允许其它用户使用ssh协议进行远程连接. 重启系统时按Ent ...

  5. openwrt的路由器重置root密码

    家里路由器刷了openwrt,结果长期没登录,忘了root密码. 很容易就找到了这里介绍的办法  http://www.openwrt.org.cn/bbs/thread-12327-1-1.html ...

  6. centos7重置root密码

    修改centos7的root密码重置非常简单,只需要登录系统,执行passwd按enter即可, 但是如果忘记root密码,该如何修改呢 1, 重启系统之后,系统启动进入欢迎界面,加载内核步骤时,选中 ...

  7. CentOS7.2重置root密码的处理方法

    第一个里程碑 --在启动GRUB菜单中选择编辑选项,按键 "e" 进入编辑; 第二个里程碑 -- 大约在第16行找到 "ro" 将 "ro" ...

  8. Linux学习历程——Centos 7重置root密码

    一.自述 最近刚刚接触linux,因为我设置密码比较随性,把自己做系统的时候设置的root密码给forget,每当系统崩溃,重新把虚拟机备份还原后,就面临无法登陆的尴尬情况,只得重置root密码,好了 ...

  9. 设置GRUB密码以防止单用户模式下root密码被恶意更改

    在使用LInux系统的时候可能会发生忘记root密码的情况,通常管理员会进入单用户模式下进行重置root密码.那么问题来了,既然管理员可以进入单用户模式,如果恶意用户可以接触的到计算机的话毫无疑问也是 ...

随机推荐

  1. CodeForces 1294D MEX maximizing(思维)

    http://codeforces.com/contest/1294/problem/D 大致题意: 刚开始有一个空集合,会往里添加q次数,每次加一个值,而且你可以让这个数任意加减x若干次 每次添加后 ...

  2. bugs开发异常解决方法

    1.      前提 第一层:遇到异常首先必须告诉自己,冷静,不要慌.(一看到Bug就心慌,那么就不能释放必杀技) 2.      入门级 第二层:遇到Bug,第一潜意识看输出异常的信息的(控制台输出 ...

  3. MyBatis从入门到精通(第5章):MyBatis代码生成器

    jdk1.8.MyBatis3.4.6.MySQL数据库5.6.45.Eclipse Version: 2019-12 M2 (4.14.0) MyBatis从入门到精通(第5章):MyBatis代码 ...

  4. LeetCode No.160,161,162

    No.160 GetIntersectionNode 相交链表 题目 编写一个程序,找到两个单链表相交的起始节点. 如下面的两个链表: 在节点 c1 开始相交. 示例 输入:intersectVal ...

  5. Java多线程求和

    package test; import java.util.concurrent.*; import java.util.concurrent.locks.Lock; import java.uti ...

  6. 题解【DP100题1~10】

    哎~这事做晚了~ (Dp100计划T1) 只有蓝题及以上才会水题解 分行Dp,行间没有转移 \[ F[L][R] = max(F[L+1][R]+2^k \times V[L],F[L][R-1]+2 ...

  7. nodejs服务后台持续运行三种方法

    一.利用 forever forever是一个nodejs守护进程,完全由命令行操控.forever会监控nodejs服务,并在服务挂掉后进行重启. 1.安装 forever npm install ...

  8. GetCharWidth32

    #include <windows.h> #include<stdio.h> // 窗口函数的函数原形 LRESULT CALLBACK MainWndProc(HWND, U ...

  9. pandas 学习笔记【持续更新】

    import numpy as np import pandas as pd import matplotlib.pyplot as plt df1 = pd.DataFrame(np.arange( ...

  10. winform上传文件,利用http,form-data格式上传

    /// <summary> /// 上传文件 /// </summary> /// <param name="url">服务地址</par ...