Debian 7 中 sudo 的使用有变化吗?

Goe*_*oez 2 debian sudo

我先试着解释一下我的情况。我目前在 ESXi 主机上运行 6 个虚拟化 Debian 服务器。安装了 Debian Linux 6 (Lenny) 的虚拟服务器。

最近我将服务器更新为 debian Wheezy

root@ares> lsb_release -a                                                                                                    /home/vincent
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.1 (wheezy)
Release:        7.1
Codename:       wheezy
Run Code Online (Sandbox Code Playgroud)

我注意到,自从这次升级以来,“sudo”命令显示出奇怪的行为。实际上,它似乎根本没有影响。我检查了 /etc/visudo 文件,一切正常。Sudo 还询问我的密码,但似乎没有以 root 身份运行。一个例子是“ifconfig”命令:

user@ares> ifconfig 
zsh: command not found: ifconfig
[127] user@ares> sudo ifconfig
sudo: ifconfig: command not found
[1] user@ares> sudo su
root@ares>ifconfig  
output shows    
Run Code Online (Sandbox Code Playgroud)

谁能帮助我?

Mic*_*ton 5

PATH的普通用户和 root 用户之间可能有所不同,可能缺少目录,例如/sbin和/或/usr/sbin管理实用程序ifconfig通常所在的位置。