I receive every few minutes emails with subject line:
sudo /usr/local/hestia/bin/v-update-sys-queue restart
sudo /usr/local/hestia/bin/v-update-sys-queue backup
Content of this email is as follows:
Usage: v-update-sys-queue QUEUE
I do not know why it does this suddenly. As I am lack of time to trace this problem, I place this message here. May be someone knows a simple trick to stop this.
Yes, thanks. I saw than and had a mind blowing thought that this is a default cron script tht cannot issue this error. But I wonder if there is some permission missing that I need to check, which it may require and does not have. However, this was just a superficial thought. I think I will sit down after 2 days and track the issue down.
/etc/sudoers: syntax error near line 30 <<<
sudo: parse error in /etc/sudoers near line 30
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Vow, the script has become really nasty. After commenting the include above, it is not generating any emails anymore. This means I have changed to something wrong and have reset to the original. But that cannot be a solution.
Will report tom, if this happens again and under what circumstances, or if it does not happen. Amazing!
In the /var/log/cron, there appeared a stricking following difference:
Dec 7 22:22:01 server CRON[863748]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart)
Dec 7 22:20:01 server CRON[860440]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart)
Dec 7 22:18:01 server CRON[857875]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart)
Dec 7 22:16:01 server CRON[854981]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart)
Dec 7 22:14:01 server CRON[852454]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart)
Dec 7 22:12:01 server CRON[850031]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart)
Dec 7 22:10:01 server CRON[834277]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart^M)
Dec 7 22:08:01 server CRON[822488]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart^M)
Dec 7 22:06:01 server CRON[820051]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart^M)
Dec 7 22:04:01 server CRON[817723]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart^M)
Dec 7 22:02:01 server CRON[815222]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart^M)
Dec 7 22:00:01 server CRON[812192]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart^M)
Dec 7 21:58:01 server CRON[809712]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart^M)
I did try to generate out from Webmin Cron page of this script to find out what it outputs as admin. Since the above change, I get no emails anymore.
Dec 7 10:36:01 server CRON[487546]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart^M)
Dec 7 10:35:01 server CRON[487436]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue backup^M)
Dec 7 10:34:01 server CRON[487388]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart^M)
Dec 7 10:32:01 server CRON[487296]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart^M)
Dec 7 10:30:01 server CRON[486944]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart^M)
Dec 7 10:30:01 server CRON[486943]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue backup^M)
Dec 7 10:28:01 server CRON[485340]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart)
Dec 7 10:26:01 server CRON[408616]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart)
Dec 7 10:25:01 server CRON[377171]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue backup)
Dec 7 10:24:01 server CRON[376908]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart)
Dec 7 10:22:01 server CRON[367185]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart)
Dec 7 10:20:01 server CRON[365267]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart)
When I made an update, afterwards, it began to log above with “restart^M)”. This was not the case before.
It began to send me emails after I added a forward. Until then, there were resting emails in the queue, which I had deleted. Before deletion, I did not go through all those emails. Now I know what and how this problem got triggered.
There should be a space added in the line that causes “restart^M)”.
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "@include" directives:
@includedir /etc/sudoers.d
# Added by cloud-init v. 20.4.1 on Fri, 03 Sep 2021 07:11:29 +0000
#includedir /etc/sudoers.d
I will try tom. with your sudoer file. I see that it has includes twice, @ and #. I think this was due to some backward compatibility, but cannot remember while reading through fast.
But Eris, can you speculate what could be the reason why I see “restart^M)” after the update? Then, I had try to manually run from Webmin to see the output as admin visually. No output, my mistake in thoughts. But could it be that there was a space inserted and then it did this above?
BTW, since one hour no more emails like before, which began to appear after I added a correct forward. This is strange.
your sudoers file does not work in my Ubunto 20.4 LTS. I get the following message by email:
/etc/sudoers: syntax error near line 27 <<<
sudo: parse error in /etc/sudoers near line 27
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
In /var/log/cron, I get the following:
Dec 8 03:44:01 server CRON[2872523]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:42:01 server CRON[2872259]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:40:01 server CRON[2871915]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue backup)
Dec 8 03:40:01 server CRON[2871914]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:38:01 server CRON[2871613]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:36:01 server CRON[2871320]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:35:01 server CRON[2871001]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue backup)
Dec 8 03:34:01 server CRON[2870960]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:32:01 server CRON[2870697]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:30:01 server CRON[2870091]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue backup)
Dec 8 03:30:01 server CRON[2870090]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:30:01 server CRON[2870089]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue webstats^M)
Dec 8 03:28:01 server CRON[2870045]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:26:01 server CRON[2869782]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:25:01 server CRON[2869474]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue backup)
Dec 8 03:24:01 server CRON[2869214]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:22:01 server CRON[2869175]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:20:01 server CRON[2868607]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue backup)
Dec 8 03:20:01 server CRON[2868606]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:18:01 server CRON[2868340]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
Dec 8 03:16:01 server CRON[2868280]: (admin) CMD (sudo /usr/local/hestia/bin/v-update-sys-queue restart )
The end of line gives a clue as to something in the code misses. But I did not get any emails after there is no restart at the end of line “restart^M)
I can now corelate this trigger of emails and end of line stamp with upgrading the php version 7.4 to 8.0 becased on the time I did the update and when emails started pouring in my inbox. Although I am not definate. I need more time to play and repeat. Since this was done on my production server, I am restricted with the playground.
There should be no reason why sudoers have been changed during the change from 7.4 to 8.0.
Also the restart^M I have never seen before
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
Hi yes, that default file works. In your file, I wonder how you made the sudoers file with @includedir make it work because it throws exception on my server.
The default file did not change. I had uncommented includedir and then commented back. That is all.