From: David K. <da...@ke...> - 2020-08-06 21:38:07
|
Lonnie, No, I had @MASTER_PASS@ properly in my file. The problem was that I did not stop first before doing the init... so files were generated in etc, but the daemons were not told to reload them. I still think that should be fixed... if the daemons are running and init updates the files, then they should be told to reload. David On Thu, Aug 6, 2020 at 4:29 PM Lonnie Abelbeck <li...@lo...> wrote: > Hi David, > > My thought was to temporarily add "admin" permissions, hence edit > /etc/ups/upsd.users and "restart". Not something I wanted to have stick > around in /mnt/kd/ups/ . > > But looking at /etc/init.d/ups, editing /mnt/kd/ups/upsd.users and "stop", > "init" should work just fine as well. Look at what gets autogenerated when > /mnt/kd/ups/upsd.users is not defined, and start with that ... but you must > replace the master password in /mnt/kd/ups/upsd.users with the @MASTER_PASS@ > token which is randomly generated and shared across the files. > > -- /mnt/kd/ups/upsd.users snippet -- > [master] > password = @MASTER_PASS@ > upsmon master > -- > > I suspect that was your original problem. (ERR ACCESS-DENIED) > > Lonnie > > > > > On Aug 6, 2020, at 2:23 PM, David Kerr <Da...@Ke...> wrote: > > > > Lonnie, > > I see that you were editing the file /etc/ups/upsd.users. I was > editing the file /mnt/kd/ups/upsd.users (because that is what the > instructions said to do as the one in /etc is generated from that). So my > edits would persist across reboots, yours would not (at least I don't think > so... have not tried... unionfs comes into play too). My expectation was > that having edited the file in /mnt/kd/ups and doing a service ups init, > that would have caused the new file to get picked up. But it was not. > > > > I had looked at the etc/init.d scriipt and observed that I needed to do > an init to pick up the changes in mnt/kd. I did not realize I also had to > do a restart, that was not expected. So I stand by my original statement > that doing an init should not just rebuild the /etc files, it should also > make sure that they are read. > > > > Regards, > > David > > > > On Wed, Aug 5, 2020 at 10:24 PM Lonnie Abelbeck < > li...@lo...> wrote: > > Hi David, > > > > Years ago I wanted to disable the beeper on a Tripp-Lite UPS, below are > the steps I used. Possibly it might help you. Step 1 was key. > > > > > > 1) Edit /etc/ups/upsd.users and add the lines: > > -- > > [admin] > > password = pass > > instcmds = all > > -- > > > > 2) Apply the change without rebuilding the config files. > > -- > > service ups restart > > -- > > > > 3) List what commands are available > > -- > > upscmd -l ups > > -- > > > > 4) In this case "beeper.disable" was the desired command > > -- > > upscmd -u admin -p pass ups beeper.disable > > -- > > > > 5) Display UPS responses > > -- > > upsc ups > > -- > > > > 6) Restart "ups" rebuilding the config files. > > -- > > service ups stop > > service ups init > > -- > > > > > > Lonnie > > > > > > > On Aug 5, 2020, at 8:18 PM, David Kerr <Da...@Ke...> wrote: > > > > > > As I prepare to enjoy multiple days without power or internet I have > been trying to reconfigure my UPS as it is sending LOWBATT far too early. > I tried to use upsrw command to set values into the UPS but kept getting... > > > > > > Unexpected response from upsd: ERR ACCESS-DENIED > > > > > > Even after editing upsd.user file. After which I would do a > > > service ups init > > > Well it turns out that is not good enough. It regenerates all the > config files but it does not reload the new config files. It has to be > followed by a > > > service ups restart > > > > > > Or... the init script could do a stop before the init? > > > Or... the init script could send a reload to upsd? > > > > > > Thanks > > > David > > > > > > _______________________________________________ > > > Astlinux-devel mailing list > > > Ast...@li... > > > https://lists.sourceforge.net/lists/listinfo/astlinux-devel > > > > > > > > _______________________________________________ > > Astlinux-devel mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/astlinux-devel > > _______________________________________________ > > Astlinux-devel mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/astlinux-devel > > > > _______________________________________________ > Astlinux-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/astlinux-devel > |