Why hduser created for hadoop is not permitted to access sudo commands?......
hduser@raj-SVE15115ENB:~$ sudo gedit /home/hduser/.bashrc [sudo] password for hduser: hduser is not in the sudoers file. This incident will be reported.
Why hduser created for hadoop is not permitted to access sudo commands?......
hduser@raj-SVE15115ENB:~$ sudo gedit /home/hduser/.bashrc [sudo] password for hduser: hduser is not in the sudoers file. This incident will be reported.
I think you answered you own question... hduser needs to be in the sudoers file. You can find it here /etc/sudoers
or alternatively you can edit it with visudo
sudo
command provides temporary privilage escalation to users and configuration file associated with this command is sudoers
. You can find this file in /usr/local/etc/sudoers
or sometimes in /etc/sudoers
. This file contains various configuration options including which users should be given sudo
previlages. By the way you do not need sudo
permission to access your own bashrc
. You can read more on Archwiki
You have created hduser for hadoop, but hduser does not have privilage to use sudo. You have to give privilage to hduser by execute commands, to open file (on hadoop/root user terminal)
sudo gedit /etc/sudoers
edit in file
# User privilege specification
root ALL=(ALL:ALL) ALL
hduser ALL=(ALL:ALL) ALL
hduse give the privilege like root
log in as root user and give privileges to the user type visudo command and identify the line ALL=(ALL:ALL) ALL then attach this line next to that (user name) ALL=(ALL:ALL) ALL start using sudo commands.