Monday 2 August 2021

How to Assign Full Root Privileges to an User on RedHat 8.1. Linux Server


This tutorial will guide you on how to assign a root privillege for users on RedHat 8.1 Linux server.

Sudo is installed by default on all environments. We can set a rules for an user to perform all the root actions or particular set of actions like service restart, specific command execution etc.,

1. To provide full root privileges to an user

Open terminal and login as root user, then open sudoers file using vim editor.

[root@worldwidelinux ]# vim /etc/sudoers

Add below line into sudoers file on 101th line.


redhat ALL=(ALL) ALL


For an example, let's add redhat user into sudoers file to provide root access.

Sudoers File

2. Login as root from normal user

Execute sudo su - command to login as root from normal user.


[redhat@worldwidelinux ~]# sudo su -

We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.

#2) Think before you type.

#3) With great power comes great responsibility.

[sudo] password for redhat: {Type your user password}

[root@worldwidelinux ~]#