如何在bash脚本(redhat6)中设置Vncserver [英] How to set Vncserver in bash script (redhat6)
本文介绍了如何在bash脚本(redhat6)中设置Vncserver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用脚本来自动设置计算机.我需要为该用户分配一个密码到vnc服务器,通常使用vncserver命令来完成.但是,它会提示用户输入并重新输入密码,而脚本均不能执行此操作.
I am using a script to automatically set up a computer. I need to assign a password to the vnc server for the user, which is normally done using the vncserver command. However, it prompts for the user to enter and re-enter their password, neither of which the script is capable of doing.
那么,如何在没有交互式提示的情况下设置VNC密码?
So, how can I set up the VNC password without an interactive prompt?
推荐答案
请尝试以下bash脚本示例:
Please try following bash script sample:
#!/bin/sh
vncpasswd << EOF
123456
123456
EOF
这篇关于如何在bash脚本(redhat6)中设置Vncserver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文