[LINUX] What to do if you can't log in as root

Introduction

I forgot my password and can't log in! I will write down how to deal with such a situation with the meaning of self-discipline.

Premise

OS:RHEL7 Connection terminal: teraterm

manner

① Execute the following command

# sudo su -

To explain, sudo is a promotion command su is a user switching command

How to force promotion to root

(2) After becoming root with the above command, execute the following command.

# passwd root
 New Password :Enter new password

The above is the remedy.

I hope it will be useful for those who have the same problems.

Recommended Posts

What to do if you can't log in as root
What to do if you can't pipenv shell
What to do if you can't use the trash in Lubuntu 18.04.
What to do if you can't find PDO in Laravel or CakePHP
What to do if you can't use scikit grid search in Python
What to do if you can't install with pip in babun environment
What to do if you can't pip install mysqlclient
What to do if you get "coverage unknown" in Coveralls
What to do if you can't sort files with subscripts
What to do if you can't use WiFi on Linux
What to do if you can't hit the arrow keys in the Python interactive console
What to do if you get a minus zero in Python
What to do if you can't build your project with Maven
What to do if pipreqs results in UnicodeDecodeError
What to do if you can't find well with grep's -f option
What to do if you get lost in file reference with FileNotFoundError
What to do if you get angry in TensorFlow v2 without attribute'app'
What happens if you do "import A, B as C" in Python?
What to do if pip install fails in Xcode 5.1
No module named What to do if you get'libs.resources'
What to do when you can't bind CaboCha to Python
What to do if you get a "No versions found" error in pipenv
What to do if yum breaks
What to do if ʻarguments [0] .scrollIntoView ();` fails in python selenium
What to do if you are addicted to Windows character code
What to do if you get `No kernel for language python found` in Hydrogen
What to do if pip gives a DistributionError in Homebrew
What to do if you get "(35,'SSL connect error')" in pycurl (one of them)
What to do if you get an error when importing matplotlib in Python (Mac)
How to install and use pyenv, what to do if you can't switch python versions
What to do if you lose your EC2 key pair
What to do if you run python in IntelliJ and end with an error
What to do if you get Swagger-codegen in python and Import Error: No module named
What to do if you get a Cannot retrieve metalink for repository error in yum
What to do if you get an error when running "certbot renew" in CakePHP environment
What to do if you get a UnicodeDecodeError with pip install
What to do if "Unnamed: 0" is added in to_csv-> read_csv in pandas
What to do when you get "I can't see the site !!!!"
Let's summarize what you want to do.
What to do if you get angry with'vertices' must be a 2D list ... in matplotlib arrow
What to do if you get an error saying c compiler cannot create executables in configure
What to do if you get a must override `get_config` error when trying to model.save in Keras
What to do if there is a decimal in python json .dumps
What to do if you forget your login password on Manjaro Linux
What to do if you get stuck during Anaconda installation on Linux
What to do if No Python documentation found for ... appears in pydoc
What to do if you get a TypeError with numpy min, max
What to do if you get an error when trying to load mnist
What to do if you get Could not fetch URL 443 with pip
What to do if you get an error when installing Dlib (Ubuntu)
What to do if you have installed PyCharm but shortcut keys such as `control + e` do not work
Note: What to do if pip install fails
What to do if mod_fcgid cannot resolve UnicodeEncodeError
What to do if rails s doesn't work
What to do if you get angry with "Value Error: unknown local: UTF-8" in python manage.py syncdb
What to do if pip cannot be installed
[Python] What to do if you get a ModuleNotFoundError when importing pandas using Jupyter Notebook in Anaconda
What to do if atom autocomplete-python doesn't work
What to do to get google spreadsheet in python
What to do if Docker-sync suddenly stops working
What to do if you get the error Target WSGI script'/var/www/xxx/xxx.wsgi' cannot be loaded as python module