[Nut-upsuser] 2.2.1 to 2.4.1 migration (allowfrom/tcp_wrappers)

Thomas Jarosch thomas.jarosch at intra2net.com
Mon Jan 18 15:42:01 UTC 2010


Hello,

I just upgraded my nut 2.2.1 setup to 2.4.1. The "upsdrvctl shutdown" 
command now works using a APC Backup-UPS CS350 via USB. Great!

The removed ACL/allowfrom functionality can be replaced by tcp_wrappers. 
Unfortunately there isn't much documentation about the migration.

First you have to compile nut with "--with-wrap".

I have a special "nutadmin" user with read/write permissions
and a nut user with "read only" permissions.
The transformed setup looks like this:
-----------------------------------------------------
[root at intratest2 init.d]# cat /etc/ups/upsd.users:
[nutadmin]
password = nutadmin
actions = SET
instcmds = all
upsmon master

[nut]
password = nut
upsmon slave

[root at intratest2 init.d]# cat /etc/hosts.allow
upsd : nutadmin at 127.0.0.1 : allow
upsd : nutadmin at ALL : deny
-----------------------------------------------------

The "nut" user will be allowed by default
as it didn't match an explicit rule.

I hope this will give someone else a good starting point
regarding the tcp_wrappers migration.

Cheers,
Thomas



More information about the Nut-upsuser mailing list