Can't get autologin to work

I have a minimal server install (so no X server) on a little netbook and I have been able to get everything configured how I like using Yast - EXCEPT for auto login.

What I like to do with minimal installs on my (single user) system is to log in as a regular user automatically, and use a strong root password. This way I don’t need to input the password to get work done, only to make system changes, or mount a USB etc.

I have used Yast to set “Passwordless Login” to on, and autologin of my user also to “on”.

I have also used the Yast config file editor to look at the display manager settings for this and “PASSWORD_LESS_LOGIN” is set to “yes” and Automatic login is set to my username. I didn’t change these, it seems to have stuck here from when I set it in user options.

No matter what I do, it is still asking for username and password on startup, and it’s infuriating because the password is long. Then if I AM doing some admin work, I must immediately enter it AGAIN.

Any idea what is happening here? It all seems configured correctly, but it just isn’t happening…

Only alternative I have thought of is setting root’s password to be different and user password to be blank. I would prefer no prompts at all though.

Open up YAST > /etc/sysconfig editor
Search using the keyword “login”


Enter the Username of the account you want to auto login, click “Finish” and exit.
You can now reboot to test.

That is the <only> thing you need to set, everything else should be left at default.


I set everything back how it was, and this did not work.

When going in to user settings and looking at the expert options the Auto Login was already set to on afte following your instructions (I turned it off prior to trying your suggestion) - so it seems it is the same thing as I already tried (not the passwordless thing, although that does not seem to work either, it shouldn’t prompt for password at login with that turned on - AFAIK).

I then tried setting a different root password and had to restore from a snapshot because it borked root access…

About the first thing the OP told in his first post is:

I have a minimal server install (so no X server)

There is no X-server and thus no Displaymanger and thus the above is a useless exercise.

As I understand the question. this is about a system that boots in multi-user mode (aka runlevel 3) and thus starts a getty process on the console (which will in turn start a login process as soon as a username is entered). AFAIK there is no automatic login feature for that.

Maybe one could try to start a bash process, with a particular user as owner, on the console instead. But as such things are now to be done through systemd and not through the earlier inittab, I have no experience with that.

Would be an interesting exercise though.

It appears you are correct, however I cannot get it to work.

I followed the instructions here: – and it borked me again :slight_smile:

The code there results in a lot of getty starting and stopping and eventually a hang at boot.

The burst of restarting of the getty process and then stopping the whole thing normaly means that the process is killed immedialtly. As the process is registered for respawn, it will be restarted by systemd affttr it stops, but when it does so many times within a small period of time, systemd will concluse that something is wrong. The same as earlier with init, the console message then being something like “to many respawns”

For what it is worth, I have an openSUSE 10.3 without X here. No monitor (but it has a keyboard, else the BIOS will not boot it). I have a serial console (VT100 type glass TTY connected to what MS-DOS people call COM1). These are my /etc/inittab entries for the getty processes:

1:2345:respawn:/sbin/mingetty --noclear tty1
2:2345:off:/sbin/mingetty tty2
3:2345:off:/sbin/mingetty tty3
4:2345:off:/sbin/mingetty tty4
5:2345:off:/sbin/mingetty tty5
6:2345:off:/sbin/mingetty tty6
S0:12345:respawn:/sbin/agetty -h 9600 ttyS0 vt220

Now this is antique. I do not know if it is still better to use mingetty instead of agetty on the virtual console.

I any case, You do tell you did configure things for systemd that did not seem to work for you, but it is always better to show such configurations. Else nobody will be able to find typos you made or misunderstandings you might have. In short: we do believe computer facts, we mistrust people’s stories :slight_smile:

you didn’t mention that the DEC VT100 supports ANSI escape sequences – the C curses library can draw on the screen.
On the other hand the “Moon lander” game also ran on the VT50 and VT52 terminals – using the proprietary DEC escape sequences.

  • Hard-core field service folks used the “Moon lander” [instead of the “proper” memory diagnostic] to check PDP 11/40 and PDP 11/45 (core) memory performance – set up the Lunar Lander to “fly” over the moon’s surface kicking up (moon) dust . . . :wink:

Sadly the VT05 terminal didn’t support this sort of thing, despite the Motorola TV set inside and, presence on the “Star Trek” set.
Never really saw much graphics being printed on the LA36 and LA120 hard copy terminals; the only thing that worked there were the Line Printer graphics (banners).And yes, my DEC badge number was . . . less than 100 000.

No, I did not mention it because it is of no importance for the problem IMHO.

I fact it is an HP 700/96 and not a genuine DEC VT. But it supports (the majority of) the ANSI sequences, And yes, Grub does use them for his boot menu.

You guys are correct, no display manager.

I’d have to think about logging in automatically without a display manager, but probably the short and easy answer would be if you don’t object to running a display manager, simply convert your system to run “Minimal-X” (I don’t know if you can simply do this by installing a packages Pattern, I assume that is possible but haven’t had to make this scenario work personally, before).

Running “Minimal-X” uses practically no more resources than a text-only system, and AFAIK by default the only new potential attack vector is through that display manager(running IceWM). Resource usage is virtually identical to a text-only system.

Of course, any new graphical apps you install could potentially expose significant security risks if that’s your objective running a minimal system.


I think the OP is working on the correct solution though.


man agetty

-a, --autologin username
Log the specified user automatically in without asking for a login name and password. The -f username option is added to the /bin/login command line by default. The --login-options option changes this default behaviour and then only \u is replaced by the username and no other option is added to the login command line.

It would realy be a bit overdone to litter the sysem with X (and what it all installs aditionaly), only because we would give up so soon to find out how this is done in a runlevel 3 system.

Yeah I am reluctant to install X server, and I like to tinker so going to keep trying to figure this out :slight_smile:

I’m going to try the drop in element again with the arguments from the end dropped. There’s also an option that makes it “quiet” apparently and not clutter up boot with messages.

Going to try this and I wil update.

I figured it out, and now it WORKS :smiley:

So the Arch instructions had led me astray (or rather, got me on the right track), but because I read up a bit on how these “drop in” components work I was able to work out what to do - “the systemd way”.

Basically the issue was that agetty on openSUSE runs from /sbin rather than /usr/bin – which is why it could not start. The service was trying to launch agetty from the wrong place.

I found this information out by inspecting the actual systemd component and the line of code that the drop-in file was overriding (facepalmed a bit TBH).

So this is exactly what I did:

  1. As root, navigated to the folder where the systemd component is:
# cd /etc/systemd/system
  1. Make the .d directory for the service:
# mkdir getty@tty1.service.d
  1. Go in there:
# cd getty@tty1.service.d

Create file “override.conf” with the following contents (with text editor of your choice):

ExecStart=-/sbin/agetty --autologin *username* --noclear %I $TERM
  1. Reboot.

Works perfectly.

Congratulations. Always very satisfactory when one finds the solution by oneselve (even if a few hints from the forums might help you looking to things from a different point).

And maybe, when you would have posted the contents of that file from the beginning, someone would have pointed you to the bin/sbin error. I hope you see that posting the exact statements/files is much better then telling stories. :wink:

Just a quick double check:1. Is the systemd pointing to

2. Are the sysconfig DISPLAYMANAGER_AUTOLOGIN/PASSWORDLESS_LOGIN variables set to their default values?

For 2. As there is no X, thus no displaymanager installed, The corresponding configuration file /etc/sysconfig/displaymanager should in fact not even exist.

And when it exists (some sloppy install process?) it’s’ contents is read by no software at all. So why asking about those parameters. It is sure that they do not influence the agetty and login processes.

Just double checking from a suggestion way back at the beginning of this thread and, you’re right: if no Display Manager then no configuration files present – except for dependencies.

If I remember correct, that can be the case. It seems that some package maintainers can not image that a text-only system means: a text-only system without any artefacts and leftovers from the GUI world. >:(

Perhaps this is the case - I will be more specific next time.

Increasingly the case - most packages are graphical by default now. Even emacs when I first tried to install it defaulted to installing x server and a bunch of gtk and qt packages by default. I had to specify the emacs-nox package to get it to install text only :slight_smile:

With that said - I think it is most likely that those configuration files were created the first time I messed with the setting in Yast.

Nice to hear from your experiences. It confirms that it is not that easy to get a clean text-only system nowadays.

I did a quick try if I could find which package installs /etc/sysconfig/displaymanager, Could not find it. It is also possible it is created during some action as you guess.