Environment for adding sudo permissions to CentOS common users: CentOS operations under VMware: [kiwi @ localhost ~] $ Sudo apt-get install samba <----- normal user kiwi needs to perform sudo operation [sudo] password for shaokn: <----- input passwdkiwi is not in the sudoers file. this incident will be reported. the user is prompted that the shaokn is not in the sudoers file. what we need to do is add kiwi users to the sudoers file. How can this problem be solved? 1. Enter Super User Mode. [kiwi @ localhost ~] $ Su-Password: <----- input passwd [root @ localhost ~] # <----- Root Super User 2. Add sudoers file write permission. [root @ localhost ~] # Chmod u + w/etc/sudoers <----- note sudoers file path 3. add kiwi to the sudoers file. add "kiwi ALL = (ALL) ALL" in the "root ALL = (ALL) ALL" line ". [root @ localhost ~] # Vim/etc/sudoers .................................. ................ root ALL = (ALL) ALLkiwi ALL = (ALL) ALL <----- add here.: wq save and exit ..................................... ............. 4. revoke sudoers write permission. remember to revoke the write permission. [root @ localhost ~] # Chmod u-w/etc/sudoers: In the following four steps, the kiwi user is successfully added to the sudoers file. kiwi also has the sudo permission.