There are many reasons you might want to reset a password:

  • Someone gave you a computer with Ubuntu installed on it but not the password for the user account.
  • You just installed Ubuntu and forgot what password you selected during the installation process.
  • You have too many passwords in your life and can't keep track of them all.

Well, this tutorial will help you reset your Ubuntu user account password, regardless of what reason you have for resetting it.

First, you have to reboot into recovery mode.

If you have a single-boot (Ubuntu is the only operating system on your computer), to get the boot menu to show, you have to hold down the Shift key during bootup.

If you have a dual-boot (Ubuntu is installed next to Windows, another Linux operating system, or Mac OS X; and you choose at boot time which operating system to boot into), the boot menu should appear without the need to hold down the Shift key.


From the boot menu, select recovery mode, which is usually the second boot option.


After you select recovery mode and wait for all the boot-up processes to finish, you'll be presented with a few options. In this case, you want the Drop to root shell prompt option so press the Down arrow to get to that option, and then press Enter to select it.

The root account is the ultimate administrator and can do anything to the Ubuntu installation (including erase it), so please be careful with what commands you enter in the root terminal.

In recent versions of Ubuntu, the filesystem is mounted as read-only, so you need to enter the follow command to get it to remount as read-write, which will allow you to make changes:

mount -o rw,remount /


If you have forgotten your username as well, type

ls /home

That's a lowercase L, by the way, not a capital i, in ls. You should then see a list of the users on your Ubuntu installation. In this case, I'm going to reset Susan Brownmiller's password.

To reset the password, type

passwd username

where username is the username you want to reset. In this case, I want to reset Susan's password, so I type

passwd susan

You'll then be prompted for a new password. When you type the password you will get no visual response acknowledging your typing. Your password is still being accepted. Just type the password and hit Enter when you're done. You'll be prompted to retype the password. Do so and hit Enter again.

Now the password should be reset. Type

exit

to return to the recovery menu.

  
After you get back to the recovery menu, select resume normal boot, and use Ubuntu as you normally would—only this time, you actually know the password!

How to reset your password in Ubuntu的更多相关文章

  1. 【mysql】must reset your password using ALTER USER statement before executing this statement

    问题描述: must reset your password using ALTER USER statement before executing this statement 登录centos服务 ...

  2. mysql5.7初始化密码报错 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before

    mysql初始化密码常见报错问题1,mysql5.6是密码为空直接进入数据库的,但是mysql5.7就需要初始密码 cat /var/log/mysqld.log | grep password1 2 ...

  3. You must reset your password using ALTER USER statement before executing this statement.

    MySQL 5.7之后,刚初始化的MySQL实例要求先修改密码.否则会报错: mysql> create database test; ERROR 1820 (HY000): You must ...

  4. 第一次登录mysql,使用任何命令都报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

    问题: 使用临时密码登录成功后,使用任何myql命令,例如show databases;都提示下面的报错 ERROR 1820 (HY000): You must reset your passwor ...

  5. Proxmox Reset Root Password

    http://c-nergy.be/blog/?p=1777 Step 1 – Boot your Proxmox VE machine. In the boot menu screen, you s ...

  6. MySQL用户密码过期登陆报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

    今天接到主从复制失败告警,查看MySQL,发现MySQL能够登陆但是执行命令报错, ERROR 1820 (HY000): You must reset your password using ALT ...

  7. MySQL root账户密码设为“root”后执行命令提示ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

    修改root账户密码为“root”后,提示ERROR 1820 (HY000): You must reset your password using ALTER USER statement bef ...

  8. MySQL:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

    解决方法: 修改密码:alter user 'root'@'localhost' identified by '123456'; mysql> use mysql; ERROR 1820 (HY ...

  9. You must reset your password using ALTER USER

    mac mysql error You must reset your password using ALTER USER statement before executing this statem ...

随机推荐

  1. Welcome-to-Swift-17自判断链接(Optional Chaining)

    自判断链接(Optional Chaining)是一种可以请求和调用属性.方法及子脚本的过程,它的自判断性体现于请求或调用的目标当前可能为空(nil).如果自判断的目标有值,那么调用就会成功:相反,如 ...

  2. LibreOJ2095 - 「CQOI2015」选数

    Portal Description 给出\(n,k,L,R(\leq10^9)\),求从\([L,R]\)中选出\(n\)个可相同有顺序的数使得其gcd为\(k\)的方案数. Solution 记\ ...

  3. [USACO12MAR]花盆Flowerpot (单调队列,二分答案)

    题目链接 Solution 转化一下,就是个单调队列. 可以发现就是一段区间 \([L,R]\) 使得其高度的极差不小于 \(d\) ,同时满足 \(R-L\) 最小. 然后可以考虑二分然后再 \(O ...

  4. java捕获不到存储过程里面手抛的错误

    采用spring的JDBCTemplate来操作增删查改,Basedao执行存储过程的方法如下: 此方法要么返回一个true,要么抛出异常: 现象: 当项目发布于tomcat中时,同样的代码,同样的过 ...

  5. LOOPS(hdu 3853)

    题意:迷宫是一个R*C的布局,每个格子中给出停留在原地,往右走一个,往下走一格的概率,起点在(1,1),终点在(R,C),每走一格消耗两点能量,求出最后所需要的能量期望 /* 刚开始以为这就是个**题 ...

  6. 一次向linux开源社区提交补丁的经历

    背景 在开发过程中,偶然发现了spinand驱动的一个bug,满怀欣喜地往社区提补丁.这是怎么样的一个bug呢? static int spinand_mtd_read(struct mtd_info ...

  7. 单击gridview中的选择按钮跳转到另一个页面的方法

    原文发布时间为:2008-07-24 -- 来源于本人的百度文章 [由搬家工具导入] 单击gridview中的选择按钮跳转到另一个页面的方法: 在gridview的事件中双击 SelectedInde ...

  8. Android系统默认输入法的修改为搜狗输入法

    1.  frameworks\base\packages\SettingsProvider\res\values\defaults.xml 文件中修改默认输入法为搜狗输入法 <stringnam ...

  9. gerrit 安装

    http://blog.csdn.net/ljchlx/article/details/21988471

  10. xcopy中文文件名,中文件目录乱码问题

    1.保存成bat脚本文件 2.且该bat文件不能使用utf-8格式,使用ANSI即正常