This question already has an answer here:
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.
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
switched to root user with
Added the user as
root ALL=(ALL:ALL) ALL sudhir ALL=(ALL:ALL) ALL
Saved with ctrl+o,
switched to user & executed the command
fdisk -l, still getting the same error.