LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-22-2014, 04:01 AM   #1
student23
LQ Newbie
 
Registered: Jan 2012
Posts: 21

Rep: Reputation: Disabled
VNC connection from Windows 7 to CentOS 6.5 for one user not authenticating


Hello everyone,

I have installed VNC (tigervnc-server.x86_64) on CentOS 6.5 successfully. These are the entries of /etc/sysconfig/vncservers

VNCSERVERS="1:user"
VNCSERVERARGS[1]="-geometry 1280x768"
VNCSERVERS="2:root"
VNCSERVERARGS[2]="-geometry 1280x768"

These are my firewall entries allowing VNC on CentOS 6.5:

[root@server ~]# cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5902,6001:6002 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

Yes, I know it's a bad idea to connect as root but I created it as a test.

I have set the vncpasswd for both accounts and made sure the vncserver is running.

Originally both users were able to connect fine from a Windows 7 system with VNC Viewer 5.2.1 on port on port 5901 for the user account and 5902 for the root account. However, both computers rebooted and now I'm unable to connect with the user account. I can connect fine with root account but the user account.

I have ranned the vncserver :1 command for the user account and I receive this message:

[user@server .vnc]$ vncserver :1
A VNC server is already running as :1
[user@server .vnc]$

I have checked the logs but in /home/user/.vnc/server.local:1.log for anything obvious but nothing get's logged.

I have eliminated this being an firewall issue by stopping iptables. The errors that I receive on Windows 7 VNC Viewer are "Authentication failure" and "Too many security failures"

To summarize, I'm able to connect with the root account on port 5902 but not as the regular user on 5901. This happened after a reboot. Thanks in advance for your advise on this issue.

Last edited by student23; 10-22-2014 at 04:16 AM.
 
Old 10-22-2014, 05:34 AM   #2
student23
LQ Newbie
 
Registered: Jan 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Ok, I found out that I have to run the vncserver :1 command with the user account for my VNC ports (5901, 6001) to open up and connect. However, I don't have do this for the root account, the ports (5902, 6002) because they start automatically.

I added this entry to the /etc/syconfig/vncservers file

VNCSERVERS="1:user 2:root"

I have searched online and they suggest to run the command chkconfig vncserver on but I did already and it's on.
 
Old 10-22-2014, 08:52 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Thanks for the update and solution. I assume it is fixed?
 
Old 10-23-2014, 02:49 AM   #4
student23
LQ Newbie
 
Registered: Jan 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
For now yes. However, if I reboot the computer the vncserver session or profile for the user account won't start automatically. I guess I will have to add a script to run the command for the user account when it logs in to run this command 'vncserver :1'. I don't understand why it will work for the root account and not for a regular account.
 
  


Reply

Tags
centos6, vnc



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
Vnc client on iPad looses connection to a Centos 6.5 server ruffault Linux - Networking 1 09-24-2014 07:41 AM
VNC server connection failure on Centos 6.2. rmadhira Linux - Server 2 04-26-2013 11:58 AM
VNC displays 'terminal window' that can't be closed after VNC connection to CentOS Hispacific Red Hat 1 10-15-2010 03:44 PM
Centos samba server authenticating with windows LDAP server GuodMan Linux - Server 4 10-03-2008 01:56 AM
VNC connection to SUSE Linux 10 from a Windows XP VNC Viewer determin2excel Linux - Software 13 10-03-2007 09:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:45 AM.

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