LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Automatic Login on CentOS 5.5 (http://www.linuxquestions.org/questions/linux-newbie-8/automatic-login-on-centos-5-5-a-830685/)

Squirrelly 09-06-2010 10:08 PM

Automatic Login on CentOS 5.5
 
I have installed CentOS 5.5 successfully and I have VNC working. This server will be a headless box that will reside in a server rack. I intend to perform any necessary maintenance on the machine remotely though my desktop computer. My problem is that when CentOS is on the login screen, I cannot connect with VNC. Once I have logged into a user account, then I can connect.

I would like the server to automatically login to one of my users each time it boots so that the VNC connection will be opened. Currently I have two users, root and Zachary. I would like the server to automatically login to the user Zachary.

In the CentOS Gnome GUI, when I go into System > Administration > Login Screen, and then click on the Security tab there is an option to "Enable Automatic Login." If you check this box a select form field becomes active; however, there are no user accounts showing in that select field. I tried typing in the user name that I wanted to automatically login, but after closing the screen it clears that username. What am I missing?

Thank you in advance for any assistance.

grim76 09-06-2010 10:19 PM

Personally I would recommend that you not do that. Anyone that happens to get physical access to your server then is able to get into the machine with an account. Should you require a GUI to administer the server use something like freenx to connect to the server.

http://www.nomachine.com

jmc1987 09-07-2010 01:30 AM

I don't think anybody has to be logged in for vncserver to run. I believe you just need to set it to start at boot with "chkconfig --levels 235 vncserver" besure to sub out vncserver for what ever the service is called. I don't have centos installed no more so I can't check.

Squirrelly 09-07-2010 02:13 AM

@grim76 - I will look into this. Adding more complicated software is probably not a direction I would like to go in, but it cannot hurt to check it out.

@jmc1987 - Thank you for your reply. I tried your command in the terminal as the root user and I got back "only one runlevel may be specified for a chkconfig query." Any ideas?

TYPELiFE 10-26-2010 07:58 PM

Make sure to have 'Include users from the /etc/passwd file' checked (this option is on the last tab) before trying to use automatic or timed login.

chrism01 10-27-2010 01:40 AM

http://linux.die.net/man/8/chkconfig
Actually, it's

chkconfig --level 235 vncserver

no 's' in 'level'

phil_s_stein 11-03-2010 05:17 PM

Well to actually answer the question instead of treating you like a child playing with matches:

Go to System->Administration->Login Screen->Users. Add yourself (or whomever you want to automatically login as) to the "face browser" "Include" list. Just hit '+ Add', then type the user id. The user name will now show up in both the "Enable Automatic Login" and "Enable Timed Login" drop down menus.

(If they have physical access, game's over anyway. It's not like they'll be sitting around trying to guess user id/passwords.)


All times are GMT -5. The time now is 08:15 PM.