我在 RPi 2 上有一个 NUT 服务器,我已经配置好了。从另一个客户端,我可以通过端口 3493 连接并监控 UPS 状态。但是,我的问题是,我可以输入任何用户名/密码,或者完全不输入,但仍然可以连接。我不想这样。我不明白是什么导致了这种行为。有人对此有什么想法吗?
如何防止远程客户端不使用用户名/密码登录?
现在我无需从远程客户端进行身份验证即可执行此命令:
upsc [email protected]
或者upsd.users不应该以这种方式使用?
我的配置文件如下所示:
nut.conf
MODE=netserver
upsd.conf
LISTEN 0.0.0.0 3493
upsd.用户
[admin]
password = pass
actions = SET
actions = FSD
instcmds = ALL
[local]
password = pass
upsmon master
[remote]
password = pass
upsmon slave
[monuser]
password = pass
upsmon slave
upsmon配置文件
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 30
DEADTIME 25
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 90
MONITOR apc-bx1600@localhost 1 local pass master
upssched.conf
CMDSCRIPT /bin/upssched-cmd
文件权限
-rw-r--r-- 1 root root 1113 Jan 22 23:40 hosts.conf
-rw-r----- 1 root nut 15 Jan 22 17:29 nut.conf
-rw-r----- 1 root nut 248 Jan 22 23:12 ups.conf
-rw-r----- 1 root nut 19 Jan 22 23:29 upsd.conf
-rw-r----- 1 root nut 253 Jan 23 16:53 upsd.users
-rw-r----- 1 root nut 232 Jan 23 17:27 upsmon.conf
-rw-r----- 1 root nut 4201 Jan 25 2023 upssched.conf
-rw-r--r-- 1 root root 1432 Jan 23 11:23 upsset.conf
-rw-r--r-- 1 root root 3699 Jan 25 2023 upsstats.html
-rw-r--r-- 1 root root 6408 Jan 25 2023 upsstats-single.html