Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

help with automated vnc password change

Reply
 
Thread Tools Display Modes
  #1  
Old 05-24-2004, 10:09 AM
Default help with automated vnc password change



Hi - I have tried in vain to automate setting the vnc password from
stdin. The docs say you can do it with vncpasswd -f:

eg:

echo myvncpassword|vncpasswd -f

This doesn't work (I can't log in using the vnc viewer). no error,
just some funny characters output, which I assumed was the encrypted
stdout)

so I tried putting the password in a file deleteme.tmp:

cat deleteme.tmp|vncpasswd -f

This doesn't work - same output.

Then I read it needs a carriage return so I put a cr in the
deleteme.tmp file:

This doesn't work - same output.

Then I put the password in twice into the file on the next line:

This doesn't work - same output.

I put the same password in manually, and everything works fine. What
am i missing here?

I'm using tightvnc on Redhat AS3.

Thanks in advance

Tony


Tony
Reply With Quote
  #2  
Old 05-25-2004, 11:36 PM
Danny Kaffki
Guest
 
Posts: n/a
Default Re: help with automated vnc password change

Here a script you can use. may help. You need expect on your system.

command: myvncpasswd mypassword

should do the rest for you.

its an ugly script. havn't used expect in a while.

Also my man page did not show a -f switch for vncpasswd.

john@sunnyday:~$ more myvncpasswd
#!/usr/bin/expect --

spawn vncpasswd
sleep 1
expect "Password: "
sleep 1
send "$argv\r"
sleep 1
expect "Verify: "
sleep 1
send "$argv\r"
sleep 1
expect "$"
john@sunnyday:~$

(E-Mail Removed) (Tony) wrote in message news:<(E-Mail Removed). com>...
> Hi - I have tried in vain to automate setting the vnc password from
> stdin. The docs say you can do it with vncpasswd -f:
>
> eg:
>
> echo myvncpassword|vncpasswd -f
>
> This doesn't work (I can't log in using the vnc viewer). no error,
> just some funny characters output, which I assumed was the encrypted
> stdout)
>
> so I tried putting the password in a file deleteme.tmp:
>
> cat deleteme.tmp|vncpasswd -f
>
> This doesn't work - same output.
>
> Then I read it needs a carriage return so I put a cr in the
> deleteme.tmp file:
>
> This doesn't work - same output.
>
> Then I put the password in twice into the file on the next line:
>
> This doesn't work - same output.
>
> I put the same password in manually, and everything works fine. What
> am i missing here?
>
> I'm using tightvnc on Redhat AS3.
>
> Thanks in advance
>
> Tony

Reply With Quote
  #3  
Old 05-26-2004, 02:17 AM
William Hooper
Guest
 
Posts: n/a
Default Re: help with automated vnc password change

"Tony" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
>
>
> Hi - I have tried in vain to automate setting the vnc password from
> stdin.


Why not just distribute the passwd file that VNC generates?

--
William Hooper

All computers wait at the same speed


Reply With Quote
  #4  
Old 05-28-2004, 02:48 PM
Tony
Guest
 
Posts: n/a
Default Re: help with automated vnc password change

Thanks to both of you - A combination of the two I think. The script
to change it on the main machine when I change all the other passwords
with a script, and then distribute the password file. Thanks again
guys.
Reply With Quote
Reply

Tags
automated, change, password, vnc

Thread Tools
Display Modes

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
Forum Jump


All times are GMT. The time now is 03:21 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.