• Jeeves

    I have tried this, but OS updates overwrite this file.

  • I too seen that after yum update. This happens if CentOS update initscripts package. This package update rarely, so once changed it will work until they release update for initscripts.

  • RobertPro

    excellent! it’s working, i have a question about how can i run a program after auto login?, i really want to know, if you can help me please, because i am working in a live cd minimal kiosco aplication

  • patrick

    I’ve tried this and the problem is it auto-logged in the user on all 6 virtual terminals! I’m trying to get where it will just auto login the user on one virtual tty, leaving the other 5 open. My larger goal is to automatically launch a virtualbox VM session when the machine first boots with a dedicated user login. Getting the VM to launch automatically and only once has been the easy part… sigh! I know I’m off just one little detail somewhere…

  • Pingback: auto login centos 6()

  • Pingback: automatic login centos 6()

  • David Sánchez Martín

    DO NOT DO NOT DO NOT DO NOT modify /etc/init/tty.conf it would be rewritten in the next update!

    Instead, make a new file with name “/etc/init/tty.override” with this content:
    #### CUT-HERE ####
    if [ x$TTY = x”/dev/tty1″ ]; then
    export AUTOLOGIN=”–autologin”
    export USER=”gui”

    exec /sbin/mingetty $AUTOLOGIN $USER $TTY
    end script
    #### CUT-HERE ####

    Obviously, substitute “gui” for a real user you want to autologin. This makes autologin only in first tty, that is what you are probably trying to achieve.

    This works for me, and should work for Ubuntu too (CentOS 6 apparently uses the Ubuntu upstart init).