When you start using Linux, you may encounter user permissions. For example, when installing the software, you will often be prompted that the permission is insufficient. The following describes how to grant root permissions to common users.
Find CD/etc/sudoers and you can see that the user's permission is: only the read permission (the following operations use the root user)
-R -- r -----. 1 Root 4029 Jul 22 19: 41 sudoers
After entering vim, the system prompts that only the read permission is available.
# Allows members of the Users Group to shutdownThisSystem #% Users localhost =/sbin/shutdown-H now-- Insert -- W10: Warning: ChangingReadonlyFile
Grant the sudoers read and write permission to the file: chmod 640/etc/sudoers
-RW-r -----. 1 Root 4029 Jul 22 :41 sudoers
Find the root user.
# Allow root to run any commands anywhere root all=(All) allhadoop all= (All) All
Hadoop is my new user. Save
Then modify the file to have only the read permission: chmod 440/etc/sudoers