Networking Forums

Networking Forums > Computer Networking > Linux Networking > help with automated vnc password change

Reply
Thread Tools Display Modes

help with automated vnc password change

 
 
Tony
Guest
Posts: n/a

 
      05-24-2004, 09:09 AM
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
 
 
 
 
Danny Kaffki
Guest
Posts: n/a

 
      05-25-2004, 10:36 PM
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
 
William Hooper
Guest
Posts: n/a

 
      05-26-2004, 01:17 AM
"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
 
Tony
Guest
Posts: n/a

 
      05-28-2004, 01:48 PM
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

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in Change Password! Password Recovery Prasad Dannani Windows Networking 0 08-26-2005 07:57 PM
Cannot change password for ME Chris Ong Windows Networking 1 11-15-2004 01:51 PM
Windows 98 change password Chris Windows Networking 1 04-22-2004 01:40 AM
change password problem Hemasiri Karunanayake Windows Networking 0 08-04-2003 02:41 PM
change password charlie Windows Networking 1 07-10-2003 01:15 AM



1 2 3 4 5 6 7 8 9 10 11