我正在编写一个设置服务器的bash shell脚本。 为了防止它要求例如我使用的MySQL服务器根密码
debconf-set-selections <<< 'mysql-server mysql-server/root_password password roooot' debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password roooot'
当然我使用-y参数进行apt-get install 。
现在在Ubuntu 14.04 LTS上安装ssh时,会询问是否禁用根用户的SSH密码authentication。 我也想为此定义一个答案。
那么:这个问题的名字是什么? 在更一般的情况下:我怎样才能自己找出这些参数?
debconf-set-selections <<< 'ssh ?? boolean true/false'
感谢Zoredache,在已经安装了这个版本的ssh的机器上进行了debconf-get-selections。 在这种情况下
debconf-set-selections <<< 'ssopenssh-server openssh-server/permit-root-login boolean true'