Closed. This question does not meet Stack Overflow guidelines。它当前不接受答案。
想改善这个问题吗?更新问题,以便将其作为on-topic用于堆栈溢出。
6年前关闭。
Improve this question
因此,它允许系统管理员仅允许sudo权限来编辑某些文件,而不是特定命令或一般上的所有文件。它允许管理员控制用户(或用户组)可以使用提升的权限编辑哪些文件。
而且,用户仍然可以使用他/她的首选编辑器,而不是管理员指定的编辑器。它还以用户本身的身份运行此编辑器,这意味着将应用用户在
想改善这个问题吗?更新问题,以便将其作为on-topic用于堆栈溢出。
6年前关闭。
Improve this question
sudo vim /etc/services
和sudoedit /etc/services
有什么区别?我试图在Linux中编辑/etc/services
文件。 sudoedit
允许编辑,但sudo vim
不允许编辑。 最佳答案
sudoedit
使用sudo
选项指定-e
。从手册页:
-e The -e (edit) option indicates that, instead of running a command, the
user wishes to edit one or more files. In lieu of a command, the string
"sudoedit" is used when consulting the security policy. If the user is
authorized by the policy, the following steps are taken.
因此,它允许系统管理员仅允许sudo权限来编辑某些文件,而不是特定命令或一般上的所有文件。它允许管理员控制用户(或用户组)可以使用提升的权限编辑哪些文件。
而且,用户仍然可以使用他/她的首选编辑器,而不是管理员指定的编辑器。它还以用户本身的身份运行此编辑器,这意味着将应用用户在
.vimrc
中指定的任何选项或命令。关于linux - `sudoedit`和 `sudo vim`有什么区别? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22084422/
10-09 15:54