Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-06-2010, 10:08 PM   #1
LQ Newbie
Registered: Aug 2010
Posts: 5

Rep: Reputation: 0
Question 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.
Old 09-06-2010, 10:19 PM   #2
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308

Rep: Reputation: 50
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.

Last edited by grim76; 09-06-2010 at 10:21 PM. Reason: Forgot the links
Old 09-07-2010, 01:30 AM   #3
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 879

Rep: Reputation: 113Reputation: 113
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.
Old 09-07-2010, 02:13 AM   #4
LQ Newbie
Registered: Aug 2010
Posts: 5

Original Poster
Rep: Reputation: 0
@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?
Old 10-26-2010, 07:58 PM   #5
LQ Newbie
Registered: Oct 2010
Posts: 1

Rep: Reputation: 0
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.
Old 10-27-2010, 01:40 AM   #6
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,565

Rep: Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425
Actually, it's

chkconfig --level 235 vncserver

no 's' in 'level'
Old 11-03-2010, 05:17 PM   #7
LQ Newbie
Registered: Nov 2010
Posts: 1

Rep: Reputation: 0
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.)

Last edited by phil_s_stein; 11-03-2010 at 05:20 PM. Reason: added snark


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Automatic login el10 Linux - General 2 07-30-2010 06:12 PM
Virtual term login displayed between usplash and automatic login... debiant Ubuntu 0 02-01-2010 10:32 AM
automatic login Centos 4.4 ihopeto Red Hat 1 11-16-2008 04:58 PM
LXer: Oracle's 11g Automatic Storage Management on CentOS (x86_64) LXer Syndicated Linux News 0 10-30-2007 09:50 PM
Automatic Login kilobravo Linux - General 1 02-15-2002 02:01 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration