Created
March 27, 2015 12:44
-
-
Save Hacksore/a2f09fb5e87475d5d271 to your computer and use it in GitHub Desktop.
Set vncpasswd with expect to remove the need for user input. Useful for automation scripts such as provisioning.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect | |
set PASS [lindex $argv 0]; | |
spawn vncpasswd | |
expect "Password: " | |
send "$PASS\r" | |
expect "Verify: " | |
send "$PASS\r" | |
expect "Would you like to enter a view-only password (y/n)? " | |
send "n\r" | |
expect eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment