Linux Server User

Source: Internet
Author: User

(1) Corrected error after/etc/sudoer, sudo world writable


Solution:pkexec chmod 0440/etc/sudoers


(2) Add sudo permissions for other users

Solution:

1, log in with root account or Su to root.

2, increase the Write permission of sudoers file: chmod u+w/etc/sudoers

3, Vim/etc/sudoers find root all= (all) all in this line add Dituhui all= (All) All (Ps:dituhui represents the user name you want to add sudo permissions)

4, remove the sudoers file Write permission: chmod u-w/etc/sudoers


(3) Add delete user Sam


Useradd–d/usr/sam-m Sam

passwd Sam


Userdel-r Sam (-r: Delete directory)



Linux Server User

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.