gnome桌面环境GUI方式把用户添加到sudo组

KDE plasma环境可以通过GUI来为用户添加管理员权限,不需要使用命令行;gnome桌面有GUI方法么?

我测试了一下buster 10.9 的gnome桌面,没找到GUI操作的地方,好像只能通过命令行来操作~

你需要安装软件包gnome-system-tools,然后启动“用户与组”,更改用户的“账户类型”为“管理员”。

我试一下看看~

可以用~

一个小问题是,必需要提前通过命令行方式安装 gnome-system-tools;如果想不用命令行,仅仅是用GUI来安装gnome-system-tools,还是做不到。

kde plasma可以~

Debian 10 Gnome上,安装软件包task-gnome-desktop只会安装一个apt前端——gonme-software,它在安装后可用性很低,而且似乎没有办法使用它来安装gnome-system-tools
Debian 11 中的 Gnome:设置中心允许你添加一个管理员用户,但是不允许你将现存用户修改为管理员。



在Debian 11中,软件包task-gnome-desktop推荐软件包synaptic,因此在Debian Installer中安装Gnome桌面环境会安装synaptic,可以使用它来安装gnome-system-tools。从软件中心安装gnome-system-tools似乎仍然是不可能的。
因此,Debian 11 中的 Gnome 对此问题的两种 GUI 方案是:

  • 使用synaptic安装gnome-system-tools,然后使用“用户和组”实用程序
  • 在设置中心中新建一个管理员账户

user-manager属于 KCM ( KConfig Module),所以它可以在“系统设置”中找到。


我对该问题的建议是,告诫桌面用户:

请不要为 root 账户设置密码,这会使您无端增加配置 sudo 的工作量。

如果在安装时没有为 root 用户设置密码,root 用户将被禁用,新建的用户将被加入 sudo 组,使它能够通过sudo命令获得管理员权限(这也是 Ubuntu 的默认设置)。
许多用户抱怨说他们收到了错误:“我的用户不在sudoer中。”许多用户的 root 用户的唯一用途仅在于将他们经常使用的用户加入 sudo 组。
在这种用例下,可以说 root 用户唯一的功绩就是使用户增加配置的工作量。在这种情况下,最好的办法是告诉用户:

请不要为 root 账户设置密码。

1 个赞

我回想了一下,好像我使用root账户的时候,确实只是为了把普通用户加入到sudo组~

后续我按你的建议,安装时把root账户密码置为空~

root密码置空就会自动添加sudo组是哪个版本开始有的功能?debian10 ?

From sudo - Debian Wiki :

Creating new user while installing OS
As of Debian Squeeze, if you give root an empty password during installation, sudo will be installed and the first user will be able to use it to gain root access (currently, the user will be added to the sudo group). The system will also configure gksu and aptitude to use sudo. You should still verify group membership after logging in as the installed user.

这是从 Debian……6开始的。

:rofl:

我已经发了《Linux入门指南》视频,里面安装过程中设置root密码时,我采用了你的建议,把root密码置空~