On Monday 22 June 2020 09:50:50 Larry Fahnoe wrote:> On Mon, Jun 22, 2020 at 8:27 AM Gene Heskett <gheskett at shentel.net>wrote:> > > On Jun 22, 2020, at 8:52 AM, Gene Heskett wrote: > > > > pi at rpi4:~ $ upscmd myups *test.battery.start.quick* > > > > Username (pi): > > > > Password: > > > > Unexpected response from upsd: ERR ACCESS-DENIED > > > > [pi] > > password = xxxxxxxxxxxxx > > instcmds = *test.battery.start* > > instcmds = test.battery.stop > > calibrate.start > > calibrate.stop > > Hi Gene, > > Looks like it might be that you're allowing test.battery.start but > executing test.battery.start.quick. You'd think one would imply the > other, but maybe not.Apparently not: pi at rpi4:~ $ upscmd myups test.battery.start Username (pi): pi Password: Unexpected response from upsd: ERR CMD-NOT-SUPPORTED It's working, but me goes away scratching what little hair I have left. So I just edited /etc/nut/upsd.users to add both the commands it claims to have but get this response to either: pi at rpi4:~ $ upscmd myups test.battery.start.quick Username (pi): pi Password: Unexpected response from upsd: ERR ACCESS-DENIED pi at rpi4:~ $ upscmd myups test.battery.start.deep Username (pi): pi Password: Unexpected response from upsd: ERR ACCESS-DENIED Back to scratching head. That gets boring too. Thanks, Larry.> --LarryCheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
On Mon, Jun 22, 2020 at 12:26 PM Gene Heskett <gheskett at shentel.net> wrote:> So I just edited /etc/nut/upsd.users to add both the commands it claims > to have but get this response to either: > > pi at rpi4:~ $ upscmd myups test.battery.start.quick > Username (pi): pi > Password: > Unexpected response from upsd: ERR ACCESS-DENIED > pi at rpi4:~ $ upscmd myups test.battery.start.deep > Username (pi): pi > Password: > Unexpected response from upsd: ERR ACCESS-DENIED >What about "instcmds = ALL" as a test, perhaps to rule out a parsing error? -- Larry Fahnoe, Fahnoe Technology Consulting, fahnoe at FahnoeTech.com Minneapolis, Minnesota www.FahnoeTech.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20200622/1cf564a6/attachment.html>
On Jun 22, 2020, at 1:26 PM, Gene Heskett wrote:> > So I just edited /etc/nut/upsd.users to add both the commands it claims > to have but get this response to either:In your original example, you had multiple “instcmd =“ lines for one user- I think the allowed commands all need to be listed on one instcmd line.
On Monday 22 June 2020 15:26:23 Larry Fahnoe wrote:> On Mon, Jun 22, 2020 at 12:26 PM Gene Heskett <gheskett at shentel.net>wrote:> > So I just edited /etc/nut/upsd.users to add both the commands it > > claims to have but get this response to either: > > > > pi at rpi4:~ $ upscmd myups test.battery.start.quick > > Username (pi): pi > > Password: > > Unexpected response from upsd: ERR ACCESS-DENIED > > pi at rpi4:~ $ upscmd myups test.battery.start.deep > > Username (pi): pi > > Password: > > Unexpected response from upsd: ERR ACCESS-DENIED > > What about "instcmds = ALL" as a test, perhaps to rule out a parsing > error?Same result: pi at rpi4:~ $ sudo nano /etc/nut/upsd.users pi at rpi4:~ $ upscmd myups test.battery.start.deep Username (pi): pi Password: Unexpected response from upsd: ERR ACCESS-DENIED Interesting maybe, user 'nut' and group 'nut' own that whole diretory and contents. OTOH, pi is a member of group 'nut' ??? Thanks Larry. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
On Monday 22 June 2020 15:36:21 Charles Lepple wrote:> On Jun 22, 2020, at 1:26 PM, Gene Heskett wrote: > > So I just edited /etc/nut/upsd.users to add both the commands it > > claims to have but get this response to either: > > In your original example, you had multiple “instcmd =“ lines for one > user- I think the allowed commands all need to be listed on one > instcmd line.They are now # commented, and instcmds = ALL added in a new line. Made zero diff. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
On Jun 22, 2020, at 3:36 PM, Charles Lepple wrote:> > On Jun 22, 2020, at 1:26 PM, Gene Heskett wrote: >> >> So I just edited /etc/nut/upsd.users to add both the commands it claims >> to have but get this response to either: > > In your original example, you had multiple “instcmd =“ lines for one user- I think the allowed commands all need to be listed on one instcmd line.Ignore this, I misremembered (and didn't read far enough down the URL I sent). Multiple allowed commands are specified with one command per instcmd.