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. 2015长春网络赛1001 求连通快数量的问题dfs

    Ponds Time Limit: 1500/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Sub ...

  2. 防止csrf

    //防csrf攻击 $csrf_hash = md5(uniqid(rand(), TRUE)); set_cookie("my_csrf_name", $csrf_hash, 0 ...

  3. JDBC 学习笔记(六)—— PreparedStatement

    1. 引入 PreparedStatement PreparedStatement 通过 Connection.createPreparedStatement(String sql) 方法创建,主要用 ...

  4. iOS学习笔记40-日志重定向

    一.日志重定向 我们在iOS开发过程中,我们时常会使用NSLog打印到控制台的日志信息进行代码调试,但这样调试的前提是连接上Xcode.如果进行真机调试但同时又不能连接Xcode的时候,就不能直接在x ...

  5. wine-qq 安装

    http://www.bubuko.com/infodetail-343048.html

  6. Process类,Thread类,Pool类,gevent类,ProcessPoolExecutor,ThreadPoolExecutor的用法比较

    一 Process类 multiprocessing模块下的一个类 创建子进程. 有两种方法 方法一 from multiprocessing import Process import os def ...

  7. 【Visual Studio】Windows program compatibility mode is on, turn it off……

    [问题描述]Windows 10上安装 Visual Studio Ultimate 2013,出现下面错误: [解决方案]将.iso文件解压到硬盘再安装.

  8. linux 时间模块 一

    作者:云天明链接:https://www.zhihu.com/question/50764115/answer/122613742来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注 ...

  9. 如何循序渐进向.NET架构师发展

    微软的DotNet开发绝对是属于那种入门容易提高难的技术.而要能够成为DotNet架构师没有三年或更长时间的编码积累基本上是不可能的.特别是在大型软件项目中,架构师是项目核心成员,承上启下,因此RUP ...

  10. jenkins+gitlab发布maven项目

    1.简介:什么是Maven Maven是一个项目管理和综合工具.Maven提供给开发人员构建一个完整的生命周期框架; 开发团队可以自动完成该项目的基础设施建设,Maven使用标准的目录结构和默认构建生 ...