tag: Http File OS for HTML Div
Environment for adding sudo permissions to centos common users: centos operations under VMware: [[email protected] ~] $ 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 the superuser mode. [[email protected] ~] $ Su-Password: <----- input passwd [[email protected] ~] # <----- Root Super User 2. Add sudoers file write permission. [[email protected] ~] # 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 ". [[email protected] ~] # 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. [[email protected] ~] # Chmod U-W/etc/sudoers through the following 4 steps, the Kiwi user is successfully added to the sudoers file, of course, kiwi also obtained sudo permissions. From: http://www.2cto.com/ OS /201304/203386.html