适用OS
已测试系统
- Ubuntu 16.04
修改前
/etc/lightdm
├── lightdm.conf.d
│ └── guest.conf
└── users.conf
总结
方法一
创建/etc/lightdm/lightdm.conf
文件,并加入下面的配置。
[Seat:*]
allow-guest=false
方法二
在/etc/lightdm/lightdm.conf.d
目录下创建任意的以.conf结尾的文件(*.conf)。并加入以下配置。
[Seat:*]
allow-guest=false
无效方法
修改/etc/lightdm/users.conf
文件
以下两种加入配置的方法均失效。
#
# User accounts configuration
#
# NOTE: If you have AccountsService installed on your system, then LightDM will
# use this instead and these settings will be ignored
#
# minimum-uid = Minimum UID required to be shown in greeter
# hidden-users = Users that are not shown to the user
# hidden-shells = Shells that indicate a user cannot login
#
[UserList]
minimum-uid=500
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/sbin/nologin
[Seat:*]
allow-guest=false
与
#
# User accounts configuration
#
# NOTE: If you have AccountsService installed on your system, then LightDM will
# use this instead and these settings will be ignored
#
# minimum-uid = Minimum UID required to be shown in greeter
# hidden-users = Users that are not shown to the user
# hidden-shells = Shells that indicate a user cannot login
#
[UserList]
minimum-uid=500
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/sbin/nologin
allow-guest=false
在/etc/lightdm
目录下创建非lightdm.conf
文件
只有创建lightdm.conf
名称的文件并加入配置才有效,一旦改名便失效。