Resetting the root password in RHEL7/CentOS7/Scientific Linux 7


RHEL7 / CentOS7 / Scientific Linux 7




Things have changed in the RHEL7 world and so has the preferred way of resetting the root password. Although the old way of interrupting the boot process (init=/bin/bash) still works, it is no longer bulletproof and recommended. 'Systemd' uses 'rd.break' to interrupt the boot. Let's have a quick walk through the whole procedure.


If your Redhat server is not connected to the official RHN repositories, you will need to configure your own private repository which you can later use to install packages. The procedure of creating a Redhat repository is quite simple task. In this article we will show you how to create a local file Redhat repository as well as remote HTTP repository.

Using Official Redhat DVD as repository

After default installation and without registering your server to official RHN repositories your are left without any chance to install new packages from redhat repository as your repository list will show 0 entries:

# yum repolist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repolist: 0

Official archive signing keys for CentOS 7 are located inside /etc/pki/rpm-gpg/ directory:
# ls /etc/pki/rpm-gpg/
RPM-GPG-KEY-CentOS-7  RPM-GPG-KEY-CentOS-Debug-7  RPM-GPG-KEY-CentOS-Testing-7


Any attempt to play video will result in an error:
Movie Player requires additional plugins to decode this file. The following plugins are required : MPEG-4-AAC decoder and H.264 decoder
The following plugins are required : MPEG-4-AAC decoder and H.264 decoder - CentOS 7
The offered help for search also fails.

This guide will discuss a procedure on how to connect/establish a VPN connection using PPTP protocol on CentOS 7 or Redhat 7 Linux the non-GUI way. Below you can find connection details which will be used as an example. Replace the bellow PPTP VPN information to align with your PPTP VPN server settings:
  • Connection name: linuxconfig ( can be any descriptive name )
  • VPN connetion type: PPTP
  • PPTP VPN server IP or domain:
  • CHAP Username: admin
  • CHAP User password: 00000000


Let's begin by installation of PPTP client:
# yum install pptp

This config will describe a procedure on how to persistently load kernel modules during a boot time on CentOS or Redhat Linux system. In the below commands will use nf_conntrack_pptp as a sample module. Replace the name of this module with a module name you wish to load.

First, create a script within /etc/sysconfig/modules/ directory with a file extension modules. Where the name of the script can be any name of your choice. In our case the script will be called nf_conntrack_pptp.modules. Enter a following code into your new nf_conntrack_pptp.modules script while replacing the name of the module with the one you wish to load:
exec /sbin/modprobe nf_conntrack_pptp  >/dev/null 2>&1

Every time you update your CentOS Linux and the update includes a new kernel image update the system will not remove your old kernel but it will cumulatively add new kernel to the top of your Linux kernel installed list. Normally, this does not present any issue to your running system and you are not required to take any action to remove any old and unused kernel images.

The reason why you may wish to remove/uninstall unused kernel images is that you need to reduce disk usage space of your system, especially if your /boot mount point is mounted separately and has a limited disk space
$ df -h /boot/
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       331M  198M  112M  64% /boot

The following linux commands will help you to install Amazon s3cmd Command Line S3 tool on CentOS Linux.
First, enable EPEL repository:
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
# rpm -Uvh epel-release*.rpm

debootstrap is Debian GNU/Linux bootstrapper which allows you to install Debian base systems such as Debian or Ubuntu into a directory of your currently running system. This config is a getting started guide on how to debbootstrap on CentOS/RHEL. The debootstrap package is not available in a standard CentOS repository. To make it available we first need to enable EPEL repository. Download EPEL repository package:
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
and install it using RPM command:
# rpm -Uvh epel-release-7-5.noarch.rpm
The EPEL repository should now be enabled. To confirm run:
# yum repolist | grep epel                                                                                  
 * epel: epel.mirror.digitalpacific.com.au

In order to disable YUM package repository on CentOS we first need to get a unique repository ID using the following yum command:
# yum repolist
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.optus.net
 * epel: epel.mirror.digitalpacific.com.au
 * extras: mirror.ventraip.net.au
 * updates: mirror.optus.net
repo id              repo name                                            status
base/7/x86_64        CentOS-7 - Base                                      8,652
epel/x86_64          Extra Packages for Enterprise Linux 7 - x86_64       8,935
extras/7/x86_64      CentOS-7 - Extras                                      285
google-chrome        google-chrome                                            3
isv_ownCloud_desktop The ownCloud Desktop Client (CentOS_7)                  63
updates/7/x86_64     CentOS-7 - Updates                                   1,726
virtualbox/7/x86_64  Oracle Linux / RHEL / CentOS-7 / x86_64 - VirtualBox    13

To install Google Chrome Internet browser on your CentOS 7 Linux box first download the actual Chrome 64 bit .rpm (For Fedora/openSUSE) ) package from Google's website https://www.google.com/chrome/#eula. Locate your downloaded .rpm and use yum command to install it allong with all other prirequsites:
# yum localinstall google-chrome-stable_current_x86_64.rpm 
Loaded plugins: fastestmirror, langpacks
Examining google-chrome-stable_current_x86_64.rpm: google-chrome-stable-44.0.2403.155-1.x86_64
Marking google-chrome-stable_current_x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package google-chrome-stable.x86_64 0:44.0.2403.155-1 will be installed
--> Processing Dependency: lsb >= 4.0 for package: google-chrome-stable-44.0.2403.155-1.x86_64

This config describes an installation of NVIDIA GeFNVIDIA GeForce Driver on CentOS 7 Linux 64-bit.


First update your system. We do not wand to build NVidia modules on based on outdated Linux kernel. Do a full updated and reboot your system:
# yum update
# reboot

The Vagrant installation on CentOS Linux is a fairly simple few commands process. First, we need to download a official RPM from http://www.vagrantup.com/downloads.html. Open up your terminal and use wget command to download latest Vagrant RPM package eg:
$ wget -q https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.4_x86_64.rpm

The easiest way to swap between keymaps and thus temporarily set keys to different language by use of loadkeys command. If the loadkeys command is unavailable install kbd package:
# yum install kbd
As for an example the following linux command will temporarily change system's keymap to Slovak:
# loadkeys sk
Loading /lib/kbd/keymaps/xkb/sk.map.gz
To list all available keymaps on your CentOS system run:
# localectl list-keymaps

At the moment Skype.com does not provide and installation package for CentOS Linux. The closest package we can use to install Skype communicator on CentOS is is based on Fedora Linux. Navigate to http://www.skype.com/en/download-skype/skype-for-linux/ and download a Fedora i386 skype package. At the time of writing the package version is skype- Once downloaded run the below yum command as a privileged user to install Skype on your CentOS linux system:
# yum localinstall skype-

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: