2

I would like maintain tightVNC through puppet, I was able to install using chocolatey provider.

How I can maintain the configuration (password set) of tightVNC through puppet?

Are there any tightVNC commands available to set the password, so that I can run the commands using puppet (exec resource)

Thanks.

gangadhar r
  • 111
  • 1
  • 9
  • TightVNC on Windows stores its configuration in the registry. Use the [registry provider](https://forge.puppet.com/puppetlabs/registry) for writing the (encrypted) password to the respective registry value. – Ansgar Wiechers May 03 '17 at 22:38
  • Thanks for the work around. How I can encrypt the password and assign to the key while declaring in puppet? – gangadhar r May 04 '17 at 23:09
  • 1
    From what I heard TightVNC uses a hard-coded encryption key, so you could probably install TightVNC somewhere, set the password manually, read the value from the registry and put that into your config. – Ansgar Wiechers May 04 '17 at 23:58
  • If you are using master-agent setup you can use something like [https://github.com/voxpupuli/hiera-eyaml](hiera-eyaml) to store encrypted password in manifests that will be decrypted when compiling manifest on puppet server. – Cosaquee May 10 '17 at 07:18
  • Yes you can do it like this: https://stackoverflow.com/a/61532640/2073804 – ron190 Apr 30 '20 at 21:04

2 Answers2

2

You can set tightvnc password in windows regedit directly.

Reg path : HKEY_CURRENT_USER\Software\TightVNC\Server

But, Tight vnc storing password in encrypted form.

So you have to encrypt password first.

For encryption then password there are ready available vncpasswd utility are there

For Vncpasswd utility : https://github.com/trinitronx/vncpasswd.py

Yash Bathia
  • 43
  • 1
  • 13
1

Configure TightVNC server using the GUI and set the password you want. Then run from an elevated command prompt:

reg export HKLM\Software\TightVNC\Server foo.reg

The generated file foo.reg contains your password in vnc-encrypted format and your other preferences for the TightVNC server. Review the file using Notepad if desired.

To install your password and preferences on another machine, copy foo.reg and merge it into the registry from an elevated command prompt:

reg import foo.reg

Restart the TightVNC service if needed:

sc stop tvnserver
sc start tvnserver