LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 05-21-2015, 04:39 PM   #1
linuxtest21
LQ Newbie
 
Registered: May 2015
Posts: 1

Rep: Reputation: Disabled
[CentOS6 x64] Shell Script - Auto-set VNC password?


Hey guys,

I'm running CentOS6 x64.

I have a shell script to basically do all the commands I've requested. The only problem is that the user is asked to set a "VNC Password".

Can anyone assist so I can allow the user to set the VNC Password in the shell script itself so there is no user interaction required?

It must enter a password, then it must enter it again to verify it. That's all it requires from the user.

Command to install VNC:

Code:
yum install -y tigervnc-server

Here's an image of that the PuTTy requests.



Last edited by linuxtest21; 05-21-2015 at 04:41 PM.
 
Old 05-24-2015, 08:09 AM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
You can try:
Code:
[someuser@localhost ~]$ (echo mypass; echo mypass) | vncpasswd
or
Code:
[someotheruser@localhost ~]$ echo -e "otherpass\notherpass" | vncpasswd
Note: the '\n' when used in combination with the '-e' option of echo is interpreted as a newline.

Up to you how to implement in your particular shell script.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to auto pass password in shell script ! cafecoc85 Programming 6 10-01-2012 02:08 AM
Auto execute shell script on startup, right before use sgware Fedora 2 11-13-2007 12:10 AM
Auto ftp shell script mcrosby Linux - Newbie 9 06-27-2007 06:09 AM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
auto execute shell script ykirankumar Linux - Software 3 09-22-2004 07:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 01:26 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