Enable auto login in Ubuntu

Jack Wallen
Aug 25, 2009
Updated • Feb 13, 2018
Linux
|
13

If you are the only user on your Ubuntu system (or if you have a default user on a Ubuntu system that should always be the user logged in) then you might want to consider setting up auto login. What auto login does is, upon boot (or restarting X Windows), the system will automatically login to that particular user.

This way the user does not have to interact with the log in prompt. The one major downfall to this is that no password has to be given in order for your user to be logged in. This can be a security issue. So if you are concerned with security, this is not for you.

If, however, security is not an issue with a particular user, than auto login is a simple way to make Ubuntu even more user-friendly than it already is. And fortunately, auto login is simple to set up. In this tutorial you will learn how to set up auto login as well as tweak your log in screen.

The tool

The tool used to configure auto login is found in the Administration menu and is called "Login Window Preferences". When you go to launch this tool you will be required to enter your sudo password. When the window launches you will see six tabs:

  • General: General configuration.
  • Local: Login theme, color, welcome message.
  • Remote: Remote login.
  • Accessibility: Enable more GTK+ modules to be available.
  • Security: Auto login, timed login, security.
  • Users: Exclude users from login.
Figure 1
Figure 1

The tab used to set up auto login is the Security tab. Click on that to see the settings available (see Figure 1 - Click to enlarge).

To enable auto login you simply have to follow these steps:

  1. Click the check box for "Enable Automatic Login".
  2. Select the user who will be automatically logged in from the drop-down list.
  3. Set the "pause before logging in time".
  4. Close the window.

It's that simple. Now of course there is much more that can be done in this tab of the preferences window. So why not take advantage while you have it open?

If you want to be able to log on as the system administrator you can do so here. First you need to check the check box labeled "Allow local system administrator login". There is one catch. Remember that Ubuntu does not have, by default, a root user password. Because of this, even if you have this feature enabled, the administrator will not be able to log in. In order for this to work you have to give the root user a password. Understand the root user was not given a password in Ubuntu for a reason...simplicity. But if you would prefer to have an administrative user (and bypass having to use sudo) you can give the root user a password by following these steps:

  1. Open up a terminal window.
  2. Issue the command sudo passwd root.
  3. Enter your sudo password.
  4. Enter a new password for the root user.
  5. Enter the root password again for verification.

Now your local administrator can log in. A word of warning: I don't recommend loggin in as root. There may be times when it seems necessary, but before you do exhaust other possibilities first. Bad things can happen when you log in as root.

Custom welcome message

When your login screen appears there is a welcome message next to the logo in the greeter. You can personalize this greeting in the Local tab of the preferences window. Click on this tab and look at the bottom of the window where you will see the "Welcome Message' section. By default the message is simply "Welcome". To change this click the check box for "Custom" and then enter the greeting you want to use. Once you are done click close.

Final thoughts

Enabling auto login, when used in trusted locations, can be a time saver as well as a way to make your Linux installation more user-friendly. For some users, having to log in to their computer is a real hassel. Help those users out by setting up auto login.

Summary
Enable auto login in Ubuntu
Article Name
Enable auto login in Ubuntu
Description
If you are the only user on your Ubuntu system (or if you have a default user on a Ubuntu system that should always be the user logged in) then you might want to consider setting up auto login.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Previous Post: «
Next Post: «

Comments

  1. Anonymous said on January 19, 2011 at 8:36 am
    Reply

    help when i boot my comp the ubuntu

  2. elton said on November 23, 2009 at 9:42 pm
    Reply

    How do I “delete” automatic login when I’m unable to ‘unlock’ the setting in “login Screen Setting’ window..Using 9.10 and Kubuntu ??? When I boot-up/startup I don’t get a “welcome screen” but go straight to the Ubuntu desktop. (I would like to be able to select which desktop I want

    Thanks..

  3. Roman ShaRP said on September 5, 2009 at 1:20 pm
    Reply

    Thanks, that is useful tip for everyone trying to play a bit with Ubuntu, I think.

  4. jvector said on September 2, 2009 at 11:49 am
    Reply

    @kevin: can you say mere about the security concern? E.g., I am sole user of a home desktop system behind a broadband cable modem connection to internet, and an internal router / firewall. What is the vulnerability in this scenario? (This system stays on 24/7 anyway, and only gets rebooted very rarely so the login only arises infrequently. But I also have a laptop where this would actually be very handy from my point of view.)

  5. Kevin said on August 27, 2009 at 5:31 am
    Reply

    I can’t believe what I’m reading here. NO! DON’T DO THIS! At least not with any computer that has a network connection. This makes your machine more vulnerable than a Windows machine.

  6. Ulysses said on August 25, 2009 at 7:32 pm
    Reply

    I did exactly this to speed up boot time. It’s perfect for single user systems, although you lose the security. I may not do it in an office setting, but at home, it’s perfect solution. The only thing I miss is the latest and greatest cool login screens.

  7. jack said on August 25, 2009 at 5:16 pm
    Reply

    Claude: I agree. I only mentioned the root login because it is part of the tool. Maybe my warning should be stronger. I suppose I should have said:

    Even though this configuration option is there you should not use it!

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.