普通账户添加sudo权限

    技术2022-05-20  49

    方法一:

    sudo usermod -aG admin username

    方法二:

    sudo cat /etc/sudoers # /etc/sudoers## This file MUST be edited with the 'visudo' command as root.## See the man page for details on how to write a sudoers file.#

    Defaults env_reset

    # Host alias specification

    # User alias specification

    # Cmnd alias specification

    # User privilege specificationroot ALL=(ALL) ALL#qjt     ALL=(ALL) ALL#lyh     ALL=(ALL) ALLzkl     ALL=(ALL) NOPASSWD: ALL

    # Uncomment to allow members of group sudo to not need a password# (Note that later entries override this, so you might need to move# it further down)# %sudo ALL=NOPASSWD: ALL

    # Members of the admin group may gain root privileges

    转载请注明原文地址: https://ibbs.8miu.com/read-2228298.html

    最新回复(0)