【发布时间】:2014-09-19 07:23:18
【问题描述】:
我正在尝试设置一个 bash 脚本来安装 nagios3 及其所有依赖项。我明白了:
apt-get install -y nagios3
负责所有这些。
现在我担心的是绕过 nagios3-cgi 的设置屏幕 到目前为止我有这个:
#!/bin/bash
PASS="0"
REPASS="1"
while [ $PASS != $REPASS ]; do
read -s -p "Password: " PASS; echo
read -s -p "Retype: " REPASS; echo
done
debconf-set-selections <<< "postfix postfix/mailname string your.hostname.com"
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
apt-get install -y postfix
apt-get install -y nagios3
我能够通过以下方式绕过 postfix conf 屏幕:
debconf-set-selections <<< "postfix postfix/mailname string your.hostname.com"
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
我怎样才能用 nagios3-cgi 做同样的事情?
我试过了,但没用:
mkdir /etc/nagios3
htpasswd -cb /etc/nagios3/htpasswd.users nagiosadmin $PASS
【问题讨论】:
标签: bash ubuntu automation passwords