{"id":33979,"date":"2021-06-17T14:08:28","date_gmt":"2021-06-17T14:08:28","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=33979"},"modified":"2021-06-17T14:08:28","modified_gmt":"2021-06-17T14:08:28","slug":"hide-user-accounts-ubuntu-20-04-login-screen","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2021\/06\/hide-user-accounts-ubuntu-20-04-login-screen\/","title":{"rendered":"How to Hide All The User Accounts in Ubuntu 20.04, 21.04 Login Screen"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/12\/gnome-icon250.png\" alt=\"\" width=\"250\" height=\"250\" class=\"alignleft size-full wp-image-33105\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/12\/gnome-icon250.png 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/12\/gnome-icon250-150x150.png 150w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/p>\n<p>Ubuntu lists all the available user accounts in the GDM login screen. You can however remove them to protect your privacy.<\/p>\n<p>Gnome, the default desktop environment, has a hidden option to force users to type the username and then password to login. If you&#8217;re working on public places, it will be good to enable this option for privacy concern.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/ubuntu-type-user.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/ubuntu-type-user-600x358.jpg\" alt=\"\" width=\"600\" height=\"358\" class=\"aligncenter size-large wp-image-33982\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/ubuntu-type-user-600x358.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/ubuntu-type-user-300x179.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/ubuntu-type-user-768x458.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/ubuntu-type-user.jpg 862w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>1.) Firstly open terminal either from system app launcher or by pressing Ctrl+Alt+T on keyboard. Because the login screen is handled by <code>gdm<\/code>, you have to firstly run command to allows it to make connections to X server.<\/p>\n<pre style=\"border:none;\">xhost SI:localuser:gdm<\/pre>\n<p>Though it says for X, you also need to run the command in Wayland session to avoid error to disable user list.<\/p>\n<p>2.) Now run <code>gsettings<\/code> command to disable user list via user gdm:<\/p>\n<pre style=\"border:none;\">sudo -u gdm gsettings set org.gnome.login-screen disable-user-list true<\/pre>\n<p><i>Type user password, no asterisk feedback, for sudo prompt and hit Enter.<\/i><\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/disable-userlist.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/disable-userlist-600x177.jpg\" alt=\"\" width=\"600\" height=\"177\" class=\"aligncenter size-large wp-image-33980\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/disable-userlist-600x177.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/disable-userlist-300x89.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/disable-userlist-768x227.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/disable-userlist.jpg 796w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>In next boot, you will no longer see the user accounts. Instead, you need to type username and then password to login.<\/p>\n<h3>How to Reset:<\/h3>\n<p>To restore the login screen setting, also run both <code>xhost<\/code> and <code>gsettings<\/code> commands in a terminal window.<\/p>\n<p>To be lazy, I&#8217;ll combine the two commands into single, so it will be:<\/p>\n<pre style=\"border:none;\">xhost SI:localuser:gdm && sudo -u gdm gsettings reset org.gnome.login-screen disable-user-list<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/reset-userlist.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/reset-userlist-600x202.jpg\" alt=\"\" width=\"600\" height=\"202\" class=\"aligncenter size-large wp-image-33981\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/reset-userlist-600x202.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/reset-userlist-300x101.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/reset-userlist-768x259.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/reset-userlist.jpg 786w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>In addition for more Login Screen settings, e.g, disable &#8216;Power Off&#8217; menu option, toggle authentications, you can open <b>Dconf Editor<\/b> (<code>install it first from Ubuntu Software<\/code>) via user gdm:<\/p>\n<pre style=\"border:none;\">xhost SI:localuser:gdm && sudo -u gdm dconf-editor<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/login-screen-settings.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/login-screen-settings-600x395.jpg\" alt=\"\" width=\"600\" height=\"395\" class=\"aligncenter size-large wp-image-33983\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/login-screen-settings-600x395.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/login-screen-settings-300x197.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/login-screen-settings-768x505.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/06\/login-screen-settings.jpg 965w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Ubuntu lists all the available user accounts in the GDM login screen. You can however remove them to protect your privacy. Gnome, the default desktop environment, has a hidden option to force users to type the username and then password to login. If you&#8217;re working on public places, it will be good to enable this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":33938,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[780],"class_list":["post-33979","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-gdm"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/33979","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=33979"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/33979\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/33938"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=33979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=33979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=33979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}