How to switch root without entering password?

After creating the user we need to provide him sudo privilege same as root.

Create a file in “/etc/sudoers.d” as “/etc/sudoers.d/arunlal”

vi /etc/sudoers.d/arunlal

=========================
arunlal ALL=(ALL) NOPASSWD:ALL
==========================

Add the above entry into the file and You are able to switch to root without en-trying the password.

Post navigation

Leave a Reply