Fedora Personal Use Notes

add normal account to sudo

Fedora does not add ordinary accounts to the sudo group by default. When root permissions are required, you need to switch to su. The following add ordinary users to sudo.

$ su
\# visudo(或者 vim /etc/sudoers)

The operation of visudo is similar to that of vim, inserting and adding

<your_user_name> ALL=(ALL)  ALL

Enter: wq! to save and eject. sudoers are read-only files and require "!" to force save and exit. By default, the sudo password you just entered expires after 5 minutes, and you need to re-enter the password next time. If you feel that it is troublesome to enter the password during sudo, replace the previous input with the following:

<your_user_name> ALL=(ALL) NOPASSWD: ALL

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324723015&siteId=291194637