官网连接: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. Elasticsearch节点类型

    当我们启动Elasticsearch的实例,就会启动至少一个节点.相同集群名的多个节点的连接就组成了一个集群. 在默认情况下,集群中的每个节点都可以处理http请求和集群节点间的数据传输,集群中所有的 ...

  2. php抓取网站图片源码

    <?php /*完成网页内容捕获功能*/ function get_img_url($site_name){     $site_fd = fopen($site_name, "r&q ...

  3. atomic一定线程安全吗

    atomic只是保证了操作的原子性,原子操作即一个操作不可再分. atomic只是对读写操作进行了加锁,保证了多线程开发时一个读写操作完成之后才能进行下一个读写操作 atomic和线程安全没有太大的关 ...

  4. 02)MFC那几个基本文件介绍

    1)首先是  类目录: 2)在这个工程里面,你找不到主函数,没有主函数,你能看到的  仅仅有这五个类     但是  你还看不到  这五个类对应的对象子啊哪里 而且  我们在写MFC程序的时候  我压 ...

  5. cin cout

    编写一个程序,要求用户输入一串整数和任意数目的空格,这些整数必须位于同一行中,但允许出现在该行的任何位置.当用户按下enter键,数据输入停止.程序自动对所有的整数进行求和并打印出结果. 需要解决两个 ...

  6. HTTP协议解析小白文

    1. 什么是HTTP协议? HTTP协议是Hyper Text Transfer Protocol(超文本传输协议)的缩写,是用于从万维网(WWW:World Wide Web )服务器传输超文本到本 ...

  7. CodeForces 998B Cutting(贪心)

    https://codeforces.com/problemset/problem/998/B 简单贪心题 代码如下: #include <stdio.h> #include <st ...

  8. 吴裕雄--天生自然 JAVA开发学习:重写(Override)与重载(Overload)

    class Animal{ public void move(){ System.out.println("动物可以移动"); } } class Dog extends Anim ...

  9. HTTP编码

    HTTP编码 不仅仅URL需要编码,HTTP header也需要编码,HTTP body 无特殊要求 一般采用百分号编码:比如一个字节的ascii码值是 0x89 那使用百分号编码之后 输出是 %89 ...

  10. [CTS2019]珍珠(NTT+生成函数+组合计数+容斥)

    这题72分做法挺显然的(也是我VP的分): 对于n,D<=5000的数据,可以记录f[i][j]表示到第i次随机有j个数字未匹配的方案,直接O(nD)的DP转移即可. 对于D<=300的数 ...