How to disable auto login in openSUSE

openSUSE by default sets to automatically log in user without having to authenticate with username and password. While convenient, this is a security risk as anyone with physical access to your machine could simply boot it up and access your account.

The option is set up during the installation process but if you've missed that or just simply want to change the setting after the fact, you could still do it via YaST or the command line.

Disable auto login in openSUSE via YaST

  1. Launch YaST from the launcher.
  2. Navigate to Security and UsersUser and Group Management.
  3. Click on Expert OptionsLogin Settings on the lower right of the window.
  4. Uncheck the Auto login box and click OK.
  5. Click OK again in the main window.

Disable auto login in openSUSE from command line

  1. Edit /etc/sysconfig/displaymanager using your favorite editor.
    > sudo nano /etc/sysconfig/displaymanager
  2. Search for DISPLAYMANAGER_AUTOLOGIN directive.
    ## Type: string
    ## Default:
    #
    # Define the user whom should get logged in without request. If string
    # is empty, display standard login dialog.
    #
    DISPLAYMANAGER_AUTOLOGIN="user"
  3. Remove the username from the directive.
    DISPLAYMANAGER_AUTOLOGIN=""
  4. Save and exit the editor.