如何授予 Linux 用户 sudo 访问权限? [英] How to give a Linux user sudo access?
本文介绍了如何授予 Linux 用户 sudo 访问权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试向我的一位用户授予 sudo 访问权限.我应该在终端中输入什么?
I am trying to give sudo access to one of my users. What should I type in my terminal?
推荐答案
您需要运行 visudo
并在它打开的编辑器中写入:
You need run visudo
and in the editor that it opens write:
igor ALL=(ALL) ALL
该行将所有权限授予用户 igor
.
That line grants all permissions to user igor
.
如果你想只允许运行一些命令,你需要在行中列出它们:
If you want permit to run only some commands, you need to list them in the line:
igor ALL=(ALL) /bin/kill, /bin/ps
这篇关于如何授予 Linux 用户 sudo 访问权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文