Thursday, October 3, 2013

How To Set Auto Login - CentOS

I did this on CentOS 6.3

For GUI auto login:

--> Edit  /etc/gdm/custom.conf with the following items
[daemon]
AutomaticLoginEnable=true
AutomaticLogin=username


# reboot

For CLI auto login:

Step 1)

Edit /etc/init/tty.conf, replace "exec /sbin/mingetty $TTY" with "exec /sbin/mingetty --autologin=root $TTY" (no quotes).


With step 1 above we are already get auto login for root but system will randomly assign tty for root. To assign fix tty number, do step 2 below.

Step 2)

Add "aa:3:respawn:/sbin/mingetty --noclear --autologin root tty1" into /etc/inittab.

This will fix root autologin on tty1.
aa is just a label.


## if you found this article helps you, feel free to click any ads on this page. thank you ##

No comments:

Post a Comment