分类
安全和简单的方法赚钱

26个最佳PAMM账户外汇经纪商

用户什么时候可以执行“ sudo su”而不是“ sudo su-”?

When is it useful to allow a user to do sudo su but not sudo su - ? How is this setting set / unset? I read this page but it didn't help.

  • I am not the administrator
  • I don't have access to /etc/sudoers
  • the distribution is Centos 7

已注销

When specifying commands allowed via sudo , there are basically two easy options:

  • 允许带有任何参数的特定命令,或者
  • 只允许使用带有完全指定的一组参数的特定命令。

As a result, allowing 26个最佳PAMM账户外汇经纪商 both sudo su - superman and sudo su superman requires two entries in the sudoers file. It looks like your administrator has only provided you with one of them.

The sudoers file syntax does not really let the administrator specify a specific command with wildcard- or regexp-limited options, because those specifications would be an all too easy to abuse. As 26个最佳PAMM账户外汇经纪商 Andrew said, better safe than sorry is the approach here.

However, note that sudo su superman requires sudo to allow the original user to run su superman as root. Effectively, there 26个最佳PAMM账户外汇经纪商 will be two identity transitions instead of just one: first from original user to root by sudo and then from root to superman by su . The specification would look like this in the 26个最佳PAMM账户外汇经纪商 sudoers file:

On the other hand, the sudoers syntax has a much easier way to allow the user to run any commands as a specific user, if the user is not too fixated to the use of the su command.

then the user can use sudo -u superman -s to achieve a close (26个最佳PAMM账户外汇经纪商 but possibly not exact) equivalent of sudo su superman and sudo -u superman -i to achieve an exact equivalent of sudo su - superman .

Why people don't use this, but instead insist on using sudo su - constructs? Because the -i option did not exist in older versions of sudo !

It only appeared 26个最佳PAMM账户外汇经纪商 26个最佳PAMM账户外汇经纪商 sometime after year 2000, so there's plenty of old literature that still recommends the now-obsolete 26个最佳PAMM账户外汇经纪商 sudo su - construction. And of 26个最佳PAMM账户外汇经纪商 course, old Unix users and administrators may have that in muscle memory, so they'll use it without thinking.

MariCampos.com

Este blog está protegido por direitos de autor. Portanto, nenhuma parte ou conteúdo pode ser utilizado ou reproduzido sem a prévia autorização (expressa e por escrito) da autora.

Últimos posts

  • Maldivas na 26个最佳PAMM账户外汇经纪商 baixa temporada
  • Navio Endurance é encontrado na Antártica
  • Brasil decepciona no programa Bandeira Azul
  • Galápagos aumenta sua área de proteção marinha
  • Voar na janela pode ser mais seguro

Popular Categories

Posts recentes

  • Maldivas na baixa temporada
  • Navio Endurance é encontrado na Antártica
  • Brasil decepciona no programa Bandeira Azul
  • Galápagos aumenta sua área de proteção marinha
  • Voar na janela pode ser mais seguro

Comentários

  • Mari Campos em Como é fazer conexão na Cidade do Panamá
  • Danielle em Como é fazer conexão na Cidade do Panamá
  • Um templo de bem-estar das Maldivas - alrabtaaliraqia em Como planejar sua viagem às Maldivas
  • Maldivas na baixa temporada | MariCampos.com em Como planejar sua viagem às Maldivas
  • Mari Campos em Como tirar boas selfies em viagem

Follow MariCampos.com

Get every new post delivered to your Inbox

Join other followers

Aqui no MariCampos.com usamos cookies para que você tenha uma melhor experiência de navegação. Se você continuar no site, nós entendemos que você concorda com isso. OkPrivacy policy