相关疑难解决方法(0)

'sudo su -' vs 'sudo -i' vs 'sudo /bin/bash' - 什么时候使用哪个重要,还是根本不重要?

当我做一些需要连续输入几十次 root 的事情时,我更喜欢将我的会话切换到 root 会话。在各种教程和说明我已经使用了互联网上,我看到了sudo susudo su -sudo -isudo /bin/bash用来打开一个root会话,但我不会在这些当之间,或者说差异事项的区别清楚。

有人可以帮我解决这个问题吗?

command-line bash sudo su

308
推荐指数
2
解决办法
46万
查看次数

如何在没有密码的情况下运行 sudo 命令?

ubuntuUbuntu Server 12.04 的 AWS 映像上的用户如何在sudo没有配置的情况下对所有命令设置无密码/etc/sudoers

我在亚马逊上使用 Ubuntu 服务器 12.04。我想添加一个与默认 Ubuntu 用户具有相同行为的新用户。具体来说,我希望sudo这个新用户无密码。

所以我添加了一个新用户并开始编辑/etc/sudoers(当然使用 visudo)。通过阅读该文件,似乎默认ubuntu用户sudo从成为该admin组的成员中获得了无密码。所以我添加了我的新用户。这没有用。然后我尝试将NOPASSWD指令添加到sudoers. 这也不起作用。

无论如何,现在我只是好奇。怎样的ubuntu,如果他们没有在定义用户密码的获得特权/etc/sudoers。允许这样做的机制是什么?

sudo aws

262
推荐指数
4
解决办法
58万
查看次数

如何将用户添加到“sudo”组?

/etc/sudoers我看到这个:

# Allow members of group sudo to execute any command after they have
# provided their password
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL
Run Code Online (Sandbox Code Playgroud)

那么如何将用户添加到该sudo组?

sudo user-management groups

217
推荐指数
4
解决办法
62万
查看次数

如何在无需输入密码的情况下 sudo?

我正在尝试在没有密码的情况下设置 sudo,但仍然提示我输入密码,我使用的是 ubuntu,这是 sudoers 配置文件中的相关行:

gandalf ALL=(ALL:ALL) NOPASSWD: ALL
Run Code Online (Sandbox Code Playgroud)

sudo

54
推荐指数
3
解决办法
10万
查看次数

在 ubuntu 上创建新的键盘布局需要哪些步骤?

我正在尝试创建的键盘有很多 Unicode,看起来像这样: 我正在尝试创建的键盘

以下教程不成功:

我想知道是否有人会提供更好的教程和分步说明?

keyboard-layout

51
推荐指数
2
解决办法
3万
查看次数

如何删除 Ubuntu 的密码要求?

以下是我的情况:

  • 我正在运行 Ubuntu 12.04。
  • 我有一个用户帐户。

我绝对讨厌密码要求。如何禁用此要求,以便我的 Linux 计算机在这方面的行为更像 Windows?我不想听到我不应该这样做,因为它不安全。这是我的愿望,因此对安全的担忧实际上是无效的。

sudo password auto-login

49
推荐指数
1
解决办法
13万
查看次数

sudo 相对于 su 有什么好处?

Ubuntu(或 Debian 衍生产品)通过禁用 root 用户获得的实际好处是什么?

在我读到的任何地方,它都说要防止没有经验的用户意外损坏。我想知道究竟是什么,因为sudo可以执行所有命令(我知道/使用)。

那么在什么情况下 root 可以造成损坏而sudo不能呢?

PS:我知道如何sudo运作。

root sudo su

23
推荐指数
3
解决办法
3万
查看次数

sudo 不要求输入密码

每当我发出命令时,sudo apt-get install foo它都不会要求输入密码。是因为用户组吗?

如何让它提示输入密码?

编辑:我的 sudoers 文件

apple@Ascension:~$ sudo cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults    env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL …
Run Code Online (Sandbox Code Playgroud)

sudo

15
推荐指数
1
解决办法
3万
查看次数

sudo 命令没有密码提示

每当我发出命令 sudo apt-get install **它不会要求输入密码,我的管理员用户也不会。

如何让它提示输入密码?

我的 sudoer :

ubuntu:~$ sudo cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults    env_reset
Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root …
Run Code Online (Sandbox Code Playgroud)

sudo

15
推荐指数
2
解决办法
4万
查看次数

如何从 sudo 运行 .desktop 图标

我为 gddccontrol 创建了一个桌面图标,但要运行它,我需要从 sudo 执行它。有没有办法从桌面图标运行命令,例如,

sudo -pPASSWORD gddccontrol
Run Code Online (Sandbox Code Playgroud)

所以它不会在终端中询问我的密码?

我只想点击并使用 sudo 权限运行它。

[Desktop Entry]
Type=Application
Name=GDDCControl
Terminal=false
Comment=gddccontrol ddccontrol
Exec=sudo -pPASSWORD gddccontrol
Icon=~/Pictures/10429.png
Run Code Online (Sandbox Code Playgroud)

当我使用以下 Exec 命令从终端运行图标时,它运行良好,但在启动器中不起作用:(

Exec=echo mypasswd | sudo -S gddccontrol
Run Code Online (Sandbox Code Playgroud)

icons desktop-environments ddclient

12
推荐指数
1
解决办法
3万
查看次数

如何设置静态IP地址?

我的 eth0 使用 DHCP 来获取互联网的 IP 地址。但是我仍然需要为我的 LAN 设置一些静态 IP。以下是我在 /etc/network/interface 中的设置。剧本有问题吗?当我尝试启动网络时,我总是失败。

我通过ifconfig检查了IP。发现 eth0:3 已设置,但其他。我可以知道有什么问题吗?

  1 auto lo
  2 iface lo inet loopback
  3 
  4 #auto eth0
  5 #iface eth0 inet dhcp
  6 
  7 auto eth0:1
  8 iface eth0:1 inet static
  9 address 192.168.20.222
 10 netmask 255.255.255.0
 11 gateway 192.168.20.1
 12 
 13 auto eth0:2
 14 iface eth0:2 inet static
 15 address 192.168.30.222
 16 netmask 255.255.255.0
 17 gateway 192.168.30.1
 18 
 19 auto eth0:3
 20 iface eth0:3 inet static
 21 address 192.168.211.222 …
Run Code Online (Sandbox Code Playgroud)

networking ip-address

5
推荐指数
2
解决办法
4万
查看次数