At Work with Linux: Automatic Logins

Password login in a lab setting can be onerous, especially when dealing with lots virtual machines. This simple change to custom.conf under /etc/gdm will automatically log a Linux-based virtual machine into a given login account. Automatic login is one of those small but important features that make working with a system more efficient and pleasant. On a virtual machine, it in essence turns a Linux VM into a meta application.

This, of course, is reasonable in a locked-down lab setting. For systems which are in a less controlled public-facing environment, automatic login may not be the best feature to enable.

Linux Automatic Login Enable
File Location/etc/gdm
File Namecustom.conf
Changes to MakeUnder the section labeled [daemon], add the following lines;
AutomaticLoginEnable=True
AutomaticLogin=username

Because this file is under /etc, you'll need root privileges to modify the file. Username, of course, is the user name you want the VM system to default to. And of course, if it automatically logs into a given username, then it can also kick off a script to start whatever suite of tools or applications you need on that particular desktop.

This feature works on contemporary distributions using Gnome as the desktop environment. I've tried it successfully on RHEL 5 and 6, Fedora 12 and later, CentOS 5, and Ubuntu 10.04 LTS (and Linux Mint derivatives). I can't speak for other distributions as I haven't tried them, but I see no reason why it wouldn't work. There used to be a GUI desktop tool that took care of this, but it changed its location over time, and today I couldn't find it if my life depended on it.

Comments

Popular posts from this blog

A Decade Long Religious Con Job

Ten Reasons to Ignore Ten Reasons to Dump Windows and Use Linux

Former Eclipse user re-evaluates Eclipse 3.3M5