虚拟机vwmare ubuntu 18 重置密码

网上有很多的我试了都不行,在外网找到一个资料,一次就可以了。

https://linuxconfig.org/how-to-reset-lost-root-password-on-ubuntu-18-04-bionic-beaver-linux

How to reset lost root password on Ubuntu 18.04 Bionic Beaver Linux

27 May 2020 by Lubos Rendek

Objective

The objective is to reset lost root or user password on Ubuntu 18.04 Bionic Beaver Linux.

Operating System and Software Versions

  • Operating System: – Ubuntu 18.04 Bionic Beaver

Requirements

Physical access to your computer or virtual machine with the Ubuntu 18.04 Bionic Beaver installation is required.

Conventions

  • # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – requires given linux commands to be executed as a regular non-privileged user

Other Versions of this Tutorial

Ubuntu 20.04 (Focal Fossa)

Instructions

Boot Into GRUB menu

The first step is to reboot into the GRUB menu. If Ubuntu 18.04 Bionic Beaver is the only operating system installed you need to keep pressing SHIFT for the GRUB menu to show up.

Edit Grub Menu

Using arrows select the Ubuntu menu or the menu you use to boot your system and hit the e key. This will allow you to edit the menu:

Navigate down with the arrow-down key until you can see a line ending with:

ro   quiet splash $vt_handoff



Using your keyboard replace the following keywords.
FROM:

ro   quiet splash $vt_handoff

TO:

rw init=/bin/bash

Once you have made the change press F10 or CTRL + x to perform boot into a single mode.

Reset password

Confirm that your system partition is mounted as read/write (rw):

# mount | grep -w /

If all good, reset your root password with the passwd command:

# passwd

Alternatively, you can reset your user password. The following linux command will reset the password for the linuxconfig user:

# passwd linuxconfig


Reboot

Your root password is now reset. Reboot your system:

# exec /sbin/init

Troubleshooting

Enter new UNIX password:
Retype new UNIX password:
passwd: Authentication token manipulation error
passwd: password unchanged

Your root partition is mounted read-only. Try:

# mount -o remount,rw /

to resolve this issue.


[ end Kernel panic - not syncing: Attempted to kill init! exit code=0x0007f00

Make sure that you removed the splash boot option when editing the grub’s menu item.


When trying to reboot with the reboot command I get:

Failed to connect to bus: No such file or directory
Failed to talk to init daemon.

Ignore, and reboot with:

# exec /sbin/init
要在VMware中安装Ubuntu,可以按照以下步骤进行操作。首先,确保你已经下载了Ubuntu的ISO文件和VMware Workstation软件。ISO文件是Ubuntu的安装映像文件,而VMware Workstation是虚拟机软件。 1. 打开VMware Workstation软件,并点击"创建新的虚拟机"选项。 2. 在虚拟机创建向导中,选择"典型(Recommended)"配置,并点击"下一步"。 3. 在"选择安装源"页面,选择"Installer disc image file (iso)"选项,并点击"浏览"按钮选择刚刚下载的Ubuntu ISO文件。 4. 在"Guest operating system installation"页面,选择"Linux"作为操作系统,并选择"Ubuntu"作为版本。 5. 输入虚拟机的名称和存储位置,并点击"下一步"。 6. 在"Processor Configuration"页面,选择虚拟机的处理器配置,并点击"下一步"。 7. 在"Memory for the virtual machine"页面,设置虚拟机的内存大小,并点击"下一步"。 8. 在"Network Type"页面,选择虚拟机的网络类型,并点击"下一步"。 9. 在"Select I/O Controller Types"页面,选择I/O控制器类型,并点击"下一步"。 10. 在"Select a Disk Type"页面,选择虚拟磁盘类型,并点击"下一步"。 11. 在"Specify Disk Capacity"页面,设置虚拟磁盘的容量,并点击"下一步"。 12. 在"Finish"页面,点击"完成"按钮来创建虚拟机。 完成以上步骤后,你就成功在VMware中安装了Ubuntu。现在你可以启动虚拟机,并按照提示进行Ubuntu的安装过程。 请注意,虚拟机的安装过程可能会因个人配置和要求而有所不同,所以请根据具体情况进行调整。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [win10下VWMare安装Ubuntu](https://blog.csdn.net/LL596214569/article/details/95731299)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [vmware+x86_ubuntu18.04+qemu+aarch64_openEuler](https://download.csdn.net/download/u013207287/12751725)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [VMware 安装 ubuntu 系统](https://blog.csdn.net/m0_61776808/article/details/125794235)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值