How to give normal user all privileges like root in sudoers file.

Allow a normal user all privileges like root

To give root privileges to user add a line by using sudoers file as shown below.

  • Type Command VISUDO to open sudoers file.
  • #visudo (save the sudoers file as we save a vim file using “wq!”)

Now logged in as normal user like pooja and run admin commands like fdisk –l etc

First try to run fdisk command normally and see what happens.

 

It will not allow a normal user to run privileged user’s command

Now run the same command using sudo before command

# sudo fdisk –l or # sudo fdisk /dev/sda

 

Note: Only for the first time of the session it will prompt for user’s password to continue, but for rest of the process it will continue normally as shown below.

 

It is all about Sudo privilege …

I Hope you enjoy reading this article….

 

One thought on “How to give normal user all privileges like root in sudoers file.”

Leave a Reply

Your email address will not be published. Required fields are marked *