Linux密码忘记了
用VMware挂载一个live CD
然后mount 挂载上Linux的/
进入目录
改文件
OK
从Live CD轻松重置您的Ubuntu密码
Our last article on how to reset your Ubuntu password easily through the grub menu was quite popular, so I’ve decided to make a series on all the different ways to reset your password on either Linux or Windows… today’s lesson is how to use the Live CD to reset the password.
我们上一篇关于如何通过grub菜单轻松重置Ubuntu密码的文章非常受欢迎,因此,我决定就在Linux或Windows上重置密码的所有不同方式进行一系列的介绍。今天的课程是如何使用Live CD重设密码。
Note that we’ll also cover how to protect yourself against somebody else resetting your password, so stay tuned!
请注意,我们还将介绍如何保护自己免受他人重置密码的伤害,请继续关注!
Of course, this method will also work if you’ve installed your Ubuntu Live CD to a thumb drive.
当然,如果您已将Ubuntu Live CD安装到拇指驱动器上 ,则此方法也将起作用。
Resetting the Password
重设密码
You’ll want to boot from your Ubuntu Live CD, choosing “Try Ubuntu without any change to your computer” from the boot menu.
您需要从Ubuntu Live CD进行引导,从引导菜单中选择“在不更改计算机的情况下尝试Ubuntu”。
Once the system boots, open up a new Terminal window from Applications \ Accessories and then type in the following command:
系统启动后,从Applications \ Accessories打开一个新的Terminal窗口,然后键入以下命令:
sudo fdisk -l
须藤fdisk -l
This command is used to tell what device name the hard drive is using, which in most cases should be /dev/sda1, but could be different on your system.
此命令用于告知硬盘驱动器使用的设备名称,在大多数情况下应为/ dev / sda1,但在您的系统上可能有所不同。
Now you’ll need to create a directory to mount the hard drive on. Since we’re actually booting off the live cd, the directory doesn’t really get created anywhere.
现在,您需要创建一个目录来安装硬盘驱动器。 由于实际上是从实时CD引导,因此该目录实际上并没有在任何地方创建。
sudo mkdir /media/sda1
须藤mkdir / media / sda1
The next command will mount the hard drive in the /media/sda1 folder.
下一条命令会将硬盘驱动器安装在/ media / sda1文件夹中。
sudo mount /dev/sda1 /media/sda1
须藤挂载/ dev / sda1 / media / sda1
Now it’s time for the command that actually does the magic: chroot. This command is used to open up a shell with a different root directory than the current shell is using, and we’ll pass in the folder where we mounted the hard drive.
现在该实际执行命令的命令了:chroot。 此命令用于打开一个shell,该shell的根目录与当前shell所使用的根目录不同,我们将传递安装硬盘驱动器的文件夹。
sudo chroot /media/sda1
须藤chroot / media / sda1
Now you should be able to use the passwd command to change your user account’s password, and it will be applied to the hard drive since we are using chroot.
现在,您应该能够使用passwd命令来更改用户帐户的密码,并且由于我们使用的是chroot,它将被应用于硬盘驱动器。
passwd geek
密码怪胎
Note that you’ll have to type your username after the passwd command in order to change the right password.
请注意,您必须在passwd命令后键入用户名才能更改正确的密码。
Now you should be able to reboot your system and log yourself in with your new password.
现在,您应该能够重新启动系统并使用新密码登录。
评论
发布于 2024-07-11 11:40:28回复该评论
发布于 2024-07-11 12:23:20回复该评论
发布于 2024-07-11 12:29:31回复该评论
发布于 2024-07-11 12:38:07回复该评论
发布于 2024-07-11 12:43:16回复该评论
发布于 2024-07-11 12:45:09回复该评论
发布于 2024-07-11 12:49:16回复该评论
发布于 2024-07-11 12:57:11回复该评论
发布于 2024-07-11 13:02:53回复该评论
发布于 2024-07-11 13:16:53回复该评论
发布于 2024-07-11 14:02:34回复该评论
发布于 2024-07-11 14:17:14回复该评论
发布于 2024-07-11 14:35:37回复该评论
发布于 2024-07-11 15:20:40回复该评论
发布于 2024-07-11 15:47:02回复该评论
发布于 2024-07-11 15:52:21回复该评论
发布于 2024-07-11 15:52:36回复该评论
发布于 2024-07-11 15:59:03回复该评论
发布于 2024-07-11 16:20:05回复该评论
发布于 2024-07-11 16:23:13回复该评论
发布于 2024-07-11 16:25:48回复该评论
发布于 2024-07-11 16:27:16回复该评论
发布于 2024-07-11 16:27:29回复该评论
发布于 2024-07-11 16:29:42回复该评论
发布于 2024-07-11 16:52:36回复该评论
发布于 2024-07-11 17:05:48回复该评论
发布于 2024-07-11 17:14:02回复该评论
发布于 2024-07-11 17:35:07回复该评论
发布于 2024-07-11 17:38:09回复该评论
发布于 2024-07-11 17:43:51回复该评论
发布于 2024-07-11 17:46:54回复该评论
发布于 2024-07-11 18:01:48回复该评论
发布于 2024-07-11 18:10:05回复该评论
发布于 2024-07-11 18:23:17回复该评论
发布于 2024-07-11 18:37:39回复该评论
发布于 2024-07-11 18:56:52回复该评论
发布于 2024-07-11 19:11:49回复该评论
发布于 2024-07-11 19:14:26回复该评论
发布于 2024-07-11 19:19:30回复该评论
发布于 2024-07-11 19:20:54回复该评论
发布于 2024-07-11 19:30:44回复该评论
发布于 2024-07-11 19:45:40回复该评论
发布于 2024-07-11 19:53:28回复该评论
发布于 2024-07-11 19:57:27回复该评论
发布于 2024-07-11 19:57:53回复该评论
发布于 2024-07-11 20:06:10回复该评论
发布于 2024-07-11 20:40:30回复该评论
发布于 2024-07-11 20:43:31回复该评论
发布于 2024-07-11 20:58:35回复该评论
发布于 2024-07-11 21:02:37回复该评论
发布于 2024-07-11 21:20:18回复该评论
发布于 2024-07-11 21:29:22回复该评论
发布于 2024-07-11 21:29:23回复该评论
发布于 2024-07-11 21:39:02回复该评论
发布于 2024-07-11 21:39:18回复该评论
发布于 2024-07-11 21:52:20回复该评论
发布于 2024-07-11 22:00:29回复该评论
发布于 2024-07-11 22:01:11回复该评论
发布于 2024-07-11 22:03:11回复该评论
发布于 2024-07-11 22:09:25回复该评论
发布于 2024-07-11 22:17:49回复该评论
发布于 2024-07-11 22:19:07回复该评论
发布于 2024-07-11 22:58:16回复该评论
发布于 2024-07-11 23:20:00回复该评论
发布于 2024-07-11 23:30:55回复该评论
发布于 2024-07-11 23:42:12回复该评论
发布于 2024-07-11 23:50:53回复该评论
发布于 2024-07-12 00:20:59回复该评论
发布于 2024-07-12 00:34:22回复该评论
发布于 2024-07-12 00:34:23回复该评论
发布于 2024-07-12 00:44:22回复该评论
发布于 2024-07-12 00:51:40回复该评论
发布于 2024-07-12 01:08:25回复该评论
发布于 2024-07-12 01:10:25回复该评论
发布于 2024-07-12 01:10:48回复该评论
发布于 2024-07-12 01:38:29回复该评论
发布于 2024-07-12 01:39:39回复该评论
发布于 2024-07-12 02:11:44回复该评论
发布于 2024-07-12 02:33:09回复该评论
发布于 2024-07-12 02:42:54回复该评论
发布于 2024-07-12 02:50:08回复该评论
发布于 2024-07-12 03:02:40回复该评论
发布于 2024-07-12 03:22:34回复该评论
发布于 2024-07-12 03:40:37回复该评论
发布于 2024-07-12 03:53:25回复该评论
发布于 2024-07-12 04:06:42回复该评论
发布于 2024-07-12 04:21:08回复该评论
发布于 2024-07-12 04:27:42回复该评论
发布于 2024-07-12 04:35:47回复该评论
发布于 2024-07-12 04:55:11回复该评论
发布于 2024-07-12 05:04:28回复该评论
发布于 2024-07-12 05:16:46回复该评论
发布于 2024-07-12 05:17:17回复该评论
发布于 2024-07-12 05:37:54回复该评论
发布于 2024-07-12 05:39:56回复该评论
发布于 2024-07-12 05:54:18回复该评论
发布于 2024-07-12 06:01:46回复该评论
发布于 2024-07-12 06:14:55回复该评论
发布于 2024-07-12 06:17:09回复该评论
发布于 2024-07-12 06:59:35回复该评论
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。