If your linux is essentially a single user system and you don’t have to worry about anyone else accessing your local console, here’s how to enable it:
Edit /etc/gdm/custom.conf to add the following two lines in the [daemon] section:
[daemon]
AutomaticLoginEnable=true
AutomaticLogin=username
AutomaticLoginEnable=true
AutomaticLogin=username
Cheers,
- Sudhaker
You just need to type “true” with a capital “T”, i.e.:
[daemon]
AutomaticLoginEnable=True
AutomaticLogin=username
My setup is working as expected with “true”. Not sure why do you say that “True” is needed.
Thanks for that tip. The user/manager of CentOS doesn’t provide that functionality.
Worked great for me with CentOS 6, thanks. I was expecting to find the “Login Screen” option under System > Administration like with previous versions.
for text based autologin in RHEL6, edit /etc/init/tty.conf
where: exec /sbin/mingetty $TTY
chgto: exec /sbin/mingetty –autlogin username $TTY
The problem I’m seeing with the text based way is that ALL tty’s do an auto login and any script made to start, all start at the same time. Thus causing things to crash and lock up on me. How can I do this with only tty1?
You can do something like this…
then
do my great stuff
fi
Thanks for listing this! I really appreciate it. This worked for me on my Scientific Linux 6.1 install.
This setup not working in redhat 6.
I got it to work by doing
/etc/init/start-ttys.conf
# This service starts the configured number of gettys.
start on stopped rc RUNLEVEL=[2345]
env ACTIVE_CONSOLES=/dev/tty[1-6]
env X_TTY=/dev/tty1
env TTY_AUTO_LOGIN=/dev/tty1
env AUTO_LOGIN_USER=mythtv
task
script
. /etc/sysconfig/init
for tty in $(echo $ACTIVE_CONSOLES) ; do
[ "$RUNLEVEL" = "5" -a "$tty" = "$X_TTY" ] && continue
if [ "$TTY_AUTO_LOGIN" = "$tty" ]
then
initctl start tty-auto-login AUTO_LOGIN_USER=$AUTO_LOGIN_USER TTY=$tty
else
initctl start tty TTY=$tty
fi
done
end script
and
/etc/init/tty-auto-login.conf.
Note this filename matches the second argument to initctl in /etc/init/start-ttys.conf above.
#
# This service maintains a getty on the specified device.
stop on runlevel [S016]
respawn
instance $TTY
instance $AUTO_LOGIN_USER
exec /sbin/mingetty --autologin=$AUTO_LOGIN_USER $TTY
or as timed login
[daemon]
TimedLoginEnable=true
TimedLogin=centoslive
TimedLoginDelay=10