For Hadoop installation, the newly created user have some extra privileges rather than a normal user.For giving some root privileges to newly created user, we are adding the newly created user to sudo users group.
To add ‘hduser’ to sudoers group, open /etc/sudoers file using nano text editor
sudo nano /etc/sudoers
Add the following lines to the file
%hduser ALL=(ALL) ALL
save the changes using Ctrl+X.This will give ‘hduser’ as root privileges.