$ ls ~yifei/notes/

sudo password-less

Posted on:

Last modified:

Add user to sudoers, you need to add user to the sudo group.

usermod -aG sudo USERNAME

Maker user sudo without password.

$ EDITOR=vi visudo

Then add this

ALL ALL=(ALL) NOPASSWD: ALL
username ALL=(ALL) NOPASSWD: ALL
%group ALL=(ALL) NOPASSWD: ALL
Defaults env_keep += "EDITOR"
WeChat Qr Code

© 2016-2022 Yifei Kong. Powered by ynotes

All contents are under the CC-BY-NC-SA license, if not otherwise specified.

Opinions expressed here are solely my own and do not express the views or opinions of my employer.

友情链接: MySQL 教程站