I am trying to gain root user access to another user so that I can run a command with adding sudo in front of any command.
Example: fdisk -l
Getting the error message as:
fdisk: cannot open /dev/loop0: Permission denied
fdisk: cannot open /dev/loop1: Permission denied
fdisk: cannot open /dev/loop2: Permission denied
fdisk: cannot open /dev/loop3: Permission denied
I tried to give the root user access to the user with the name sudhir.
switched to root user with su -
visudoers
Added the user as
root ALL=(ALL:ALL) ALL
sudhir ALL=(ALL:ALL) ALL
screenshot of the sudoers file
Saved with ctrl+o,
switched to user & executed the command fdisk -l, still getting the same error.
Any idea?