官网连接: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. python+Sqlite+Dataframe打造金融股票数据结构

    5. 本地数据库 很简单的用本地Sqlite查找股票数据. DataSource类,返回的是Dataframe物件.这个Dataframe物件,在之后的业务,如计算股票指标,还需要特别处理. impo ...

  2. PAT Advanced 1033 To Fill or Not to Fill (25) [贪⼼算法]

    题目 With highways available, driving a car from Hangzhou to any other city is easy. But since the tan ...

  3. HTML5中的data-*属性

    data-* 属性包括两部分: 属性名不应该包含任何大写字母,并且在前缀 "data-" 之后必须有至少一个字符: 属性值可以是任意字符串: 注释:用户代理会完全忽略前缀为 &qu ...

  4. reactor-core

    <dependency> <groupId>io.projectreactor</groupId> <artifactId>reactor-core&l ...

  5. Utf8BomRemover

    // // Source code recreated from a .class file by IntelliJ IDEA // (powered by Fernflower decompiler ...

  6. Qt QString 和 LPCWSTR 的相互转换

    在windosw 编程中,常用到LPCWSTR 变量,QT中最常用到QString,下面提供QString和LPCWSTR 相互转换的方法 LPWSTR 转换成QString LPCWSTR str; ...

  7. [JSOI2019]神经网络(树形DP+容斥+生成函数)

    首先可以把题目转化一下:把树拆成若干条链,每条链的颜色为其所在的树的颜色,然后排放所有的链成环,求使得相邻位置颜色不同的排列方案数. 然后本题分为两个部分:将一棵树分为1~n条不相交的链的方案数:将这 ...

  8. MySQL数据库高可用集群搭建-PXC集群部署

    Percona XtraDB Cluster(下文简称PXC集群)提供了MySQL高可用的一种实现方法.集群是有节点组成的,推荐配置至少3个节点,但是也可以运行在2个节点上. PXC原理描述: 分布式 ...

  9. SAP 配置表记录创建人/创建日期/创建时间/更改人/更改日期/更改时间

    在实际开发需求中,为了使客制功能具有灵活的可配置性,通常采用开发功能+配置表的形式处理.有些客制的配置功能需要追溯到谁在什么时候增加了什么配置,或者谁在什么时候更改了什么位置,配置表的Log功能就显得 ...

  10. Spring Boot 2.x 整合 Redis最佳实践

    一.前言 在前面的几篇文章中简单的总结了一下Redis相关的知识.本章主要讲解一下 Spring Boot 2.0 整合 Redis.Jedis 和 Lettuce 是 Java 操作 Redis 的 ...