官网连接: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 删除文件

    import os 删除文件: os.remove() 删除空目录: os.rmdir() 递归删除空目录: os.removedirs() 递归删除目录和文件(类似DOS命令DeleteTree): ...

  2. MySQL-SQL语句分类

    MySQL中的SQL语句有:DDL,DML,DCL,DQL,TCL DDL:数据库定义语言 data Definition language 用于创建.修改.和删除数据库内的数据结构,如: 1:创建和 ...

  3. 黑马_13 Spring Boot:01.spring boot 介绍&&02.spring boot 入门

    13 Spring Boot: 01.spring boot 介绍&&02.spring boot 入门 04.spring boot 配置文件 SpringBoot基础 1.1 原有 ...

  4. Python笔记_第三篇_面向对象_2.构造函数和析构函数(含self说明)

    1. 构造函数: 为什么要有构造函数? 打一个比方:类的创建就是好比你创建了好了一种格式的房间,你租给上一个住户的后,里面会对方很多“垃圾”和不规则的物品摆放.构造函数就是下一个住户再使用的时候进行物 ...

  5. Matlab高级教程_第二篇:Matlab相见恨晚的模块_01_定时器

    MATLAB的定时器功能(timer函数): 1 从MATLAB6.5版本开始,MATLAB开始支持定时器.相对于传统的pause函数来说,定时器要强大的多,不仅可以等效实现pause的功能,还可以显 ...

  6. springBoot中mybatis错误之 Property 'configuration' and 'configLocation' can not specified with together 解决

    mybatis.config-location与mybatis.config-locations不同 mybatis.config-location不加载全局配置文件

  7. 网络类(IP、dns、网络连接类)

    一.centOS 7 设置DNS方法 使用全新的命令行工具 nmcli 来设置 1.显示当前网络连接 nmcli connection show   NAME UUID TYPE DEVICE eno ...

  8. mysql常用方法案例

    SELECTms.id,ms.name,ms.address,ms.mobile AS phone,ms.UUID,(case when ce.score is null then 0 else ce ...

  9. JavaMail读取收件箱退信邮件/分析邮件附件获取Message_Id

    需求描述:公司最近有个项目邮件通知功能,但是客户上传的邮件地址并不一定存在,以及其他的各种问题.所有希望发送通知后有个回执,及时发现地址存在问题的邮箱. 需求分析:经过分析JavaMail可以读取收件 ...

  10. LoggingService

    package me.zhengjie.common.aop.log; import java.lang.annotation.ElementType; import java.lang.annota ...