使用sudo获取管理员权限

tech2024-04-20  89

使用sudo获取管理员权限

The sudo command and capability (superuser do) can be a valuable tool when multiple users are responsible for managing parts of a server or servers. In particular, sudo is important when you need to restrain the use of ‘root’ and/or need to log all administrative actions and changes and would like a record of who did what.

当多个用户负责管理一个或多个服务器的一部分时,sudo命令和功能(超级用户可以)是一种有价值的工具。 特别是,当您需要限制使用“ root”用户和/或需要记录所有管理操作和更改并希望记录谁做了什么时,sudo非常重要。

My main preference for sudo is its expiring session (or ticket as GratiSoft calls it). Once switched into sudo for activity, the session expires after five minutes, or continues at five minute (can be modified) intervals as commands are executed. This allows for added security if an administrator leaves his or her workstation briefly as a root shell is not left open.

我对sudo的主要偏爱是它的过期会话(或GratiSoft称之为票证)。 一旦切换到sudo进行活动,会话将在五分钟后过期,或者在执行命令时以五分钟(可以修改)的间隔继续。 如果管理员由于未打开根外壳程序而短暂离开工作站,这将增加安全性。

GratiSoft maintains an excellent web site on sudo (and sponsors the development of sudo) — (http://www.courtesan.com/sudo/sudo.html).

GratiSoft在sudo上拥有一个出色的网站(并赞助sudo的开发)-( http://www.courtesan.com/sudo/sudo.html )。

Through building a configuration file, a senior administrator can dole out system admin responsibilities through sudo, assigning what commands can be executed by username per host. In addition, being carried out in a multiple host environment, audit trail logging done on a centralized host as well as each systems localhost logs.

通过构建配置文件,高级管理员可以通过sudo分配系统管理员职责,分配可以由每个主机名的用户名执行的命令。 此外,由于是在多主机环境中进行的,所以在集中式主机以及每个系统localhost日志上完成的审计跟踪日志记录。

GratiSoft suggests correctly that one way to get more familiar with sudo is to review a sample configuration. They posted one such file here.

GratiSoft正确建议,要更熟悉sudo的一种方法是查看示例配置。 他们在这里张贴了一个这样的文件 。

As sudo supports numerous platforms, this also works in mixed OS environments — see the supported platforms here.

由于sudo支持多种平台,因此在混合OS环境中也可以使用-请在此处查看支持的平台 。

翻译自: https://www.sitepoint.com/using-sudo-to-manage-administrators/

使用sudo获取管理员权限

相关资源:jdk-8u281-windows-x64.exe
最新回复(0)