|
||||||||
|
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
"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 |
|
#4
|
|||
|
|||
|
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. |
![]() |
| Tags |
| automated, change, password, vnc |
| Thread Tools | |
| Display Modes | |
|
|