ubuntu安装xinetd服务报错 invoke-rc.d: policy-rc.d denied execution of restart解决
1、下载xinetd安装包
wget http://archive.ubuntu.com/ubuntu/pool/universe/x/xinetd/xinetd_2.3.15.3-1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/n/netkit-telnet/telnetd_0.17-41_amd64.deb
2、安装
dpkg -i xinetd_2.3.15.3-1_amd64.deb telnetd_0.17-41_amd64.deb
3、如果遇到报错invoke-rc.d: policy-rc.d denied ,请尝试以下解决方案
printf '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
printf 'service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure = HOST
}' > /etc/xinetd.d/telnet
systemctl restart xinetd.service