Ubuntu 17.10:在GDM中禁用用户列表

我有以下系统:

$ lsb_release -a Distributor ID: Ubuntu Description: Ubuntu 17.10 Release: 17.10 Codename: artful $ gdm3 --version GDM 3.26.1 

我想在GDM中禁用用户列表并输入我的用户名和密码来登录。 我已经搜索了很多,但没有找到任何有价值的解决方案。

我怎样才能做到这一点?

此function目前有问题,请参阅: https : //bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1724944并标记自己受影响

如果您还没有安装dconf-editor工具,则需要安装:

 sudo apt install dconf-editor 

然后当你打开它时导航到:

 /org/gnome/login-screen 

并将’disable-user-list’按钮设置为’on’:

在此处输入图像描述


由于上面仍然存在错误,唯一的解决方案是现在通过终端编辑/etc/gdm3/greeter.dconf-defaults的以下行:

 #[org/gnome/login-screen] # disable-user-list=true 

至:

 [org/gnome/login-screen] disable-user-list=true 

请务必编辑这两行,否则您可能会完全崩溃登录。

一种选择:

编辑/usr/share/gdm/greeter.dconf-defaults并删除“#”以取消注释该行:

 disable-user-list=true 

另外一个选项:

使用gconftool-2或gconf-editor。 将此值更改为true:

 /apps/gdm/simple-greeter/disable_user_list 

参考

https://help.gnome.org/admin/gdm/stable/configuration.html.en
https://mike632t.wordpress.com/2016/05/28/gnome-3-customizing-the-login-screen/#userlist