Can you please ensure
that your sudoers file is configured correctly
In the stepno:4 of the document of singlenode hadoop cluster
You need to give the root permissions to the user you have created,in our case it is like
Please find the attached document of setting up the single node hadoop cluster and revert us back if you have any queries.