Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Reset CentOS / RHEL root account password 7     - Https (SSL / TLS) Detailed principles (Server)

- ORA-38856: Unable instance UNNAMED_INSTANCE_2 (redo thread 2) marked enabled (Database)

- There are more than one server, there is reason to try cloud operating system (Server)

- Android using SVG vector graphics to create cool animation effects (Programming)

- Raspberry Pi 2 to install the latest version of the FPC and Lazarus 1.5 (Linux)

- Getting Started with Linux system to learn: how to configure a static IP address for CentOS7 (Linux)

- How ONLYOFFICE collaborative editing document on Linux (Linux)

- Linux netstat command to get started (Linux)

- Oracle create a temporary table space group (Database)

- Mac OS X 10.9 build Nginx + MySQL + php-fpm environment (Server)

- Red Hat Linux security settings document (Linux)

- Linux cd command Detailed (Linux)

- Linux awk text analysis tool (Linux)

- Linux user status query, and to unlock locked user (Linux)

- Ubuntu uses under KVM + Qemu virtual machine build (Linux)

- Use Markdown editor for document work under Linux (Linux)

- Basic Java JNI (Programming)

- CentOS-based Kickstart automated installation practice (Linux)

- Linux performance monitoring and common commands Introduction (Linux)

- CentOS 6.5 Telnet SecureCRT use management tools (Linux)

 
         
  Reset CentOS / RHEL root account password 7
     
  Add Date : 2016-10-17      
         
         
         
  Have you encountered this situation: the user can not remember the account password on the Linux system, if you forget the root password, the situation is even worse?. You can not execute any changes for the entire system. If you forget your password, it is easy to use the root account to reset your password.

But if you forget the root account password, what shall we do? You can not use the root user account to reset the account password because the user account is usually not allowed to perform this task.

In case you encounter such a situation, this guide can help you get rid of such articles predicament. This article describes how to reset RHEL 7 and CentOS root account password 7 under.

Early this morning, I opened the RHEL 7 Linux server, only to find it was locked. I messed up the night before the password is not changed, that is indeed forgotten password.

Well, I now what to do? Should I use a user account to log on, you try to change the root account password

Unfortunately, I see the message is "Only root can specify a user name" ( "Only root account to specify a user name"), I lost control of the root account. So I intend to boot into single-user mode. To do this, reboot the server; once you see the following screen, you press the "e" on the keyboard (for editing).

You press the "e" on the keyboard, you'll see a lot of text, the text will be shortened according to the screen size.

Search Text "rhgb quiet", it will be replaced by "init = / bin / bash", without the quotes.

Once you finished editing, press "ctrl + x" key combination, it will start with the specified parameters to boot. You'll get bash prompt.

Now, run the following command on a single-user mode, check the status of the root partition.

# Mount | grep root

You may have noticed that the root partition is reported as "ro" (read only). We need to have the root partition read-write permission to change the root account password.

# Mount -o remount, rw /

Also repeatedly check to see if the root assign read-write access mode to mount.

# Mount | grep root

Now you can change the root account password, just type passwd command. But it does not end. We need to re-tag SELinux context. If we skip SELinux relabel the entire context of this step, it is possible to log in using using password.

# Passwd root

[Enter New Password]

[Re-enter the new password]

# Touch /.autorelabel

Restart, once again log into the root account to see if everything is not normal?

# Exec / sbin / init

We have by resetting the root account password from a single-user mode, successfully logged into RHEL 7 system.

Several steps above clearly shows how to reset the root account password from a single-user mode, log on to RHEL 7 and CentOS 7 machines.
     
         
         
         
  More:      
 
- Compare Dalvik virtual machine and the JVM (Linux)
- Shell Scripting Interview Questions (Programming)
- C language sorting instance (select, bubble, insert, binary, fast) (Programming)
- Recover accidentally deleted Nginx logs (Server)
- Vim useful plugin: YouCompleteMe (Linux)
- The Zabbix2.4.5 source compiler installation under Ubuntu 14.04 (Server)
- Linux scheduling summary (Linux)
- PHP CURL get cookies simulated login (Database)
- You can not ignore the seven Git tips (Linux)
- Performance issues under CentOS 6.5 VLAN devices (Linux)
- Hibernate Search 5.5 in the search results sorted (Linux)
- Compare several ways to transfer files between Linux hosts (Linux)
- MySQL5.6 based GTID master-slave replication (Database)
- Copy files between two Linux hosts (Linux)
- Ubuntu 14.04 Enable root and disable the guest (Linux)
- Java NIO The Glob mode Detailed (Programming)
- Linux system security check method (Linux)
- How to install or upgrade to the Linux kernel in Ubuntu 4.2 (Linux)
- Linux System Getting Started tutorial: Ubuntu desktop using the command line to change the system proxy settings (Linux)
- How to remove the Linux memory Cache, Buffer and swap space (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.