I work on a server using OpenSuse 12.3 installed with no GUI (no KDE, no Gnome, only terminal : it’s a server).
Auto login is enabled, and i want to disable it.
I surfed on search engines and forums, but everywhere the solution is to use graphical YaST2 interface, and i can’t.
I don’t have any /etc/sysconfig/displaymanager file to edit.
Do you know what command line to use, or what configuration file to edit ?
Thanks in advance,
When it is correct what the OP says, that he uses no GUI at all, there is no
displaymanager either. Thus configuring something there is of no use (most probably /etc/sysconfig/displaymanager does not even exist) .
If you use the KDE or GNOME desktop environment you can configure *Auto Login* for a certain user as well as *Passwordless Login* for all users. Auto login causes a user to become automatically logged in to the desktop environment on boot. This functionality can only be activated for one user at a time. Login without password allows all users to log in to the system after they have entered their username in the login manager.
So how did you configure it in the first place? It definitely wasn’t enabled out of the box.
> Unfortunately, in YaST2 ncurses mode, i only have these items in the
> menu :
>
>
> Code:
> --------------------
> Software
> Hardware
> System
> Network services
> Support
> Miscellaneous
> --------------------
>
>
> No user management here.
Install it.
YaST2 - menu @ Telcontar.valinor
┌───────────────────────────────────────────────────────────────┐
│ YaST Control Center │
└───────────────────────────────────────────────────────────────┘
┌─────────────────┐ ┌───────────────────────────────────────────┐
│Software │ │AppArmor Configuration │
│Hardware │ │CA Management │
│System │ │Common Server Certificate │
│Network Devices │ │Firewall │
│Network Services │ │Security Center and Hardening │
│Security and User│ │Sudo │
│Virtualization │ │User and Group Management │
│Support │ │ │
│Miscellaneous │ │ │
│ │ │ │
│ │ │ │
└├──────────────┤─┘ └───────────────────────────────────────────┘
[Help] [Quit]
F1 Help F9 Quit
You are missing many yast modules. You probably installed the minimal
pattern; IMNSHO, the minimal pattern is too minimal, I install instead
the minimal X pattern (even when X is not needed).
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
The package “yast2-users” is now installed, i can see “Security and Users” > “User and Group Management” > “Expert Options”
As you said, i can’t configure auto-login here, the only valid options are “Password Encryption” and “Write Changes Now”…
In the first place i created a suse studio appliance with Server base template.
During appliance creation, in the configuration tab there is a checkbox “Automatically log in user”, and -what a pity- it has been checked.
Since on 12.3 systemd is used, the second part with the inittab doesn’t apply anymore. That --autologin has to be specified somewhere else I guess (some systemd unit). Maybe grep for “autologin” in /etc/systemd and /usr/lib/systemd?
But removing that “NO_PASSWORD_CONSOLE” line from /etc/login.defs should at least prevent the automatic login, provided that’s there in the first place of course.
And maybe even remove /etc/systemd/system/autologin@.service …
But I cannot test this right now, so no guarantees!
PS: For reference, suse_studio_firstboot does this on first boot:
# enable console autologin for systemd distributions
enable_autologin_if_required() {
if -e /etc/systemd/system/autologin@.service ]; then
systemctl disable getty@tty1
systemctl -f enable autologin@tty1
# workaround for the fix of bnc#804158 (check bnc#807289 for further details)
ln -s /etc/systemd/system/autologin@.service /etc/systemd/system/getty@tty1.service
systemctl restart autologin@tty1
fi
}
Awesome, wolfi323 you got it ! I used your three command lines : it works perfectly.
No more autologin, thanks to you and to this great OpenSuse community
For the record Can you please explain what that autologin did do?
Do I understand it correctly that you had a text only installation and that after boot it loged in in the console autimaticaly without asking for any username (and password). And when yes, which user was used for that autologin. And again when yes, was this by default after the installation?
I ask, because I can hardly believe that I understand this as I outline above. Thus either I understand it wrongly, or there is something utterly wrong in the default text only installation.
And when yes, which user was used for that autologin. And again when yes, was this by default after the installation?
When you create an appliance in SUSE studio you can configure it to have a certain user auto-login. You have to create a user for that though, you are not allowed to have “root” auto-login.
So this has nothing to do with a standard openSUSE text mode installation.
You already have the option:
Yast - System - Sysconfig editor
Search for “AUTOLOGIN”
Remove the user’s name.
But, I doubt that autologin works at all, since it’s not meant for the system, but for the desktop environment, i.e. X.
When booting a headless server autlogin doesn’t do anything IIRC.
SUSE studio’s autologin feature creates an autologin@.service systemd unit (calls agetty with the -a option) and enables it instead of the standard getty.service.
And apparently this does work on a headless server, otherwise this thread wouldn’t exist!
Auto-login is default for a graphical installation.
Auto-login in text mode is definitely not enabled out of the box, and isn’t even possible with simply editing configuration files in /etc/sysconfig/.
That’s why I asked.