ubuntu配置sudo
Like most things on Linux, the sudo command is very configurable. You can have sudo run specific commands without asking for a password, restrict specific users to only approved commands, log commands run with sudo, and more.
像Linux上的大多数东西一样,sudo命令是非常可配置的。 您可以让sudo运行特定命令而无需输入密码,将特定用户限制为仅允许使用的命令,使用sudo运行日志命令等等。
The sudo command’s behavior is controlled by the /etc/sudoers file on your system. This command must be edited with the visudo command, which performs syntax-checking to ensure you don’t accidentally break the file.
sudo命令的行为由系统上的/ etc / sudoers文件控制。 必须使用visudo命令编辑该命令,该命令执行语法检查以确保您不会意外破坏文件。
指定具有Sudo权限的用户 (Specify Users With Sudo Permissions)
The user account you create while installing Ubuntu is marked as an Administrator account, which means it can use sudo. Any additional user accounts you create after installation can be either Administrator or Standard user accounts – Standard user accounts don’t have sudo permissions.
您在安装Ubuntu时创建的用户帐户被标记为管理员帐户,这意味着它可以使用sudo。 安装后创建的任何其他用户帐户都可以是管理员帐户或标准用户帐户–标准用户帐户没有sudo权限。
You can control user account types graphically from Ubuntu’s User Accounts tool. To open it, click your user name on the panel and select User Accounts or search for User Accounts in the dash.
您可以从Ubuntu的“用户帐户”工具以图形方式控制用户帐户类型。 要打开它,请在面板上单击您的用户名,然后选择“用户帐户”或在破折号中搜索“用户帐户”。
使Sudo忘记密码 (Make Sudo Forget Your Password)
By default, sudo remembers your password for 15 minutes after you t