Linux – getpassword error: Inappropriate ioctl for device vnc error

centos-6.6linuxtigervnc

I installed tigervnc-server package in server.

[root@localhost ~]# rpm -qa tigervnc
tigervnc-1.1.0-16.el6.x86_64

Created a vnc user and created vncpasswd also for that user.

[root@localhost ~]# useradd vnc
[root@localhost ~]# vncpasswd vnc
Password:
Verify:
[root@localhost ~]# 

In /etc/sysconfig/vncserver I changed these 2 lines

VNCSERVERS="2:vnc"
VNCSERVERARGS[2]="-geometry 800x600"

While starting service it's giving this error.

[root@localhost ~]# service vncserver start
Starting VNC server: 2:vnc 
You will require a password to access your desktops.

getpassword error: Inappropriate ioctl for device
Password:                                                  [FAILED]
[root@localhost ~]# 

Why I am getting this error ?

Best Answer

This error occurs most often because the configured user doesn't have a vncpasswd set. To fix this, as the user simply execute 'vncpasswd' and follow the prompts. It's just like passwd so you should already be familiar with it.

Related Question