• 欢迎访问速搜资源吧,如果在网站上找不到你需要的资源,可以在留言板上留言,管理员会尽量满足你!

【速搜问答】sudo是什么

问答 admin 1年前 (2020-09-06) 354次浏览 已收录 0个评论

汉英对照:
Chinese-English Translation:

sudo是linux系统管理指令,是允许系统管理员让普通用户执行一些或者全部的root命令的一个工具,如halt,reboot,su等等。这样不仅减少了root用户的登录 和管理时间,同样也提高了安全性。

Sudo is a Linux system management instruction, which allows the system administrator to make ordinary users execute some or all root commands, such as halt, reboot, Su and so on. This not only reduces the login and management time of root user, but also improves the security.

Sudo,是一种程序,用于类 Unix 操作系统如 BSD,Mac OS X,以及 GNU/Linux 以允许用户透过安全的方式使用特殊的权限运行程序。

Sudo is a program for UNIX like operating systems such as BSD, Mac OS X, and GNU / Linux to allow users to run programs with special permissions in a secure way.

sudo 是 linux 系统管理指令,是允许系统管理员让普通用户执行一些或者全部的 root 命令的一个工具,如 halt,reboot,su 等等。这样不仅减少了 root 用户的登录 和管理时间,同样也提高了安全性。sudo 不是对 shell 的一个代替,它是面向每个命令的。

Sudo is a Linux system management instruction, which allows the system administrator to make ordinary users execute some or all root commands, such as halt, reboot, Su and so on. This not only reduces the login and management time of root user, but also improves the security. Sudo is not a replacement for the shell, it is for every command.

特性

characteristic

它的特性主要有这样几点:

Its main characteristics are as follows:

§ sudo 能够限制用户只在某台主机上运行某些命令。

? sudo can restrict users to only run certain commands on a certain host.

§ sudo 提供了丰富的日志,详细地记录了每个用户干了什么。它能够将日志传到中心主机或者日志服务器。

Section sudo provides a rich log of what each user does in detail. It can send logs to the central host or log server.

§ sudo 使用时间戳文件来执行类似的“检票”系统。当用户调用 sudo 并且输入它的密码时,用户获得了一张存活期为 5 分钟的票(这个值可以在编译的时候改变)。

Sudo uses a timestamp file to perform a similar “check-in” system. When the user calls sudo and enters its password, the user gets a ticket with a lifetime of 5 minutes (this value can be changed at compile time).

§ sudo 的配置文件是 sudoers 文件,它允许系统管理员集中的管理用户的使用权限和使用的主机。它所存放的位置默认是在/etc/sudoers,属性必须为 0440。

The configuration file of sudo is the sudoers file, which allows the system administrator to centrally manage the user’s permissions and hosts. It is stored in / etc / sudoers by default, and the attribute must be 0440.

原理

principle

在 sudo 于 1980 年前后被写出之前,一般用户管理系统的方式是利用 su 切换为超级用户。但是使用 su 的缺点之一在于必须要先告知超级用户的密码。

Before sudo was written around 1980, the general way of user management system was to use Su to switch to super user. But one of the disadvantages of using Su is that you have to tell the super user the password first.

sudo 使一般用户不需要知道超级用户的密码即可获得权限。首先超级用户将普通用户的名字、可以执行的特定命令、按照哪种用户或用户组的身份执行等信息,登记在特殊的文件中(通常是/etc/sudoers),即完成对该用户的授权(此时该用户称为“sudoer”);在一般用户需要取得特殊权限时,其可在命令前加上“sudo”,此时 sudo 将会询问该用户自己的密码(以确认终端机前的是该用户本人),回答后系统即会将该命令的进程以超级用户的权限运行。之后的一段时间内(默认为 5 分钟,可在/etc/sudoers 自定义),使用 sudo 不需要再次输入密码。

Sudo enables ordinary users to gain access without knowing the super user’s password. First, the super user registers the name of the ordinary user, the specific commands that can be executed, and the identity of the user or user group to execute the information in a special file (usually / etc / sudoers), that is, to complete the authorization of the user (at this time, the user is called “sudoer”). When the general user needs to obtain special permissions, he can add “sudo” before the command Sudo will ask the user for his password (to confirm that the user is in front of the terminal). After answering, the system will run the command process with the super user’s permission. After a period of time (the default is 5 minutes, which can be customized in / etc / sudoers), there is no need to enter the password again to use sudo.

由于不需要超级用户的密码,部分 Unix 系统甚至利用 sudo 使一般用户取代超级用户作为管理帐号,例如 Ubuntu、Mac OS X 等。

Some UNIX systems even use sudo to replace super users as management accounts, such as Ubuntu, Mac OS X, etc.


速搜资源网 , 版权所有丨如未注明 , 均为原创丨转载请注明原文链接:【速搜问答】sudo是什么
喜欢 (0)
[361009623@qq.com]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址