美文网首页
[Rich]Ubuntu禁用访客会话

[Rich]Ubuntu禁用访客会话

作者: 李若贤 | 来源:发表于2018-02-05 01:56 被阅读0次

    适用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名称的文件并加入配置才有效,一旦改名便失效。

    相关文章

      网友评论

          本文标题:[Rich]Ubuntu禁用访客会话

          本文链接:https://www.haomeiwen.com/subject/jctbzxtx.html