Roger Price
2021-Mar-07 19:01 UTC
[Nut-upsuser] Request For Additional Status Confirmation
On Sun, 7 Mar 2021, Jon Kinne via Nut-upsuser wrote:> I don't understand. I edited the rc.local script to what you indicated ( sudo > -u nut ...) and now when the Pi reboots I don't get any messages. I'm afraid > I'm too much of a beginner to see what you mean.When sudo doesn't do anything, then the problem is usually in the file /etc/sudoers which says who has the authority to issue which commands. See man sudoers. The best approach is to use command visudo as root to modify this file. If you prefer to use emacs as your editor, use command VISUAL=/usr/bin/emacs visudo -f /etc/sudoers There is a detailed visudo tutorial at https://www.digitalocean.com/community/tutorials/how-to-edit-the-sudoers-file Roger
Harlan Stenn
2021-Mar-07 19:27 UTC
[Nut-upsuser] Request For Additional Status Confirmation
Why use sudo instead of su for this case? Sent from my iPhone - please excuse brevity and typos> On Mar 7, 2021, at 11:01 AM, Roger Price <roger at rogerprice.org> wrote: > > ?On Sun, 7 Mar 2021, Jon Kinne via Nut-upsuser wrote: > >> I don't understand. I edited the rc.local script to what you indicated ( sudo -u nut ...) and now when the Pi reboots I don't get any messages. I'm afraid I'm too much of a beginner to see what you mean. > > When sudo doesn't do anything, then the problem is usually in the file /etc/sudoers which says who has the authority to issue which commands. > > See man sudoers. > > The best approach is to use command visudo as root to modify this file. If you prefer to use emacs as your editor, use command > > VISUAL=/usr/bin/emacs visudo -f /etc/sudoers > > There is a detailed visudo tutorial at https://www.digitalocean.com/community/tutorials/how-to-edit-the-sudoers-file > > Roger > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser >
On Sun, 7 Mar 2021, Jon Kinne via Nut-upsuser wrote:>> I don't understand. I edited the rc.local script to what you >> indicated ( sudo -u nut ...) and now when the Pi reboots I don't get >> any messages. I'm afraid I'm too much of a beginner to see what you >> mean. > > When sudo doesn't do anything, then the problem is usually in the file > /etc/sudoers which says who has the authority to issue which commands. > > See man sudoers. > > The best approach is to use command visudo as root to modify this > file.? If you prefer to use emacs as your editor, use command > > ?VISUAL=/usr/bin/emacs visudo -f /etc/sudoers > > There is a detailed visudo tutorial at > https://www.digitalocean.com/community/tutorials/how-to-edit-the-sudoers-file > > OK, I have one user, "pi".? Here is the list of permissions:Matching Defaults entries for pi on raspberry-pi: ??? env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bi n, ??? env_keep+=NO_AT_BRIDGE, env_keep+="http_proxy HTTP_PROXY", ??? env_keep+="https_proxy HTTPS_PROXY", env_keep+="ftp_proxy FTP_PROXY", ??? env_keep+=RSYNC_PROXY, env_keep+="no_proxy NO_PROXY" User pi may run the following commands on raspberry-pi: ??? (ALL : ALL) ALL ??? (ALL) NOPASSWD: ALL Given that, I don't see what you would have me do. I'm sure it all seems obvious to you, but if "pi" can do everything, why doesn't the command run?> > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser