Since few updates I see every times something like this:
(17/19) Looking for Pacnew/Pacsave created.
sudo: unknown user michaldy
sudo: plugin initiation error of audit sudoers_audit
error: command was not performed correctly
This doesn’t seem to create any problems, but my user is “michaldybczak”, not “michaldy” so this alone shows some issue. I have no idea what this part is for and why the problem occurred, but it seems it won’t go away by itself.
Any suggestions?
omano ~ $ cat /usr/share/libalpm/scripts/pacnew-check
#!/bin/bash
#Test if pacnew/pacsave are created and create the spy file
/usr/bin/test "$(/usr/bin/pacdiff -o)"
if [[ "$?" -eq "0" ]]; then
last_user=$(last | head -1 | cut -d' ' -f1)
sudo -u $last_user usr/bin/touch /tmp/pacnew-check.file
fi
If user exists, then it was a race condition I guess, and the expected username was not at the expected position when that part of the script executed. If the user doesn’t exist, then more investigation is needed to understand where and what broke.
The message is triggered because it doesn’t find the “$user” in sudoers when trying to run the sudo -u $user command, and that $user is the first word of the first line of the last command output. Without any answer from michaldybczak, it is pointless to continue to try to help finding the reason. Output of last command? Output of cut -d: -f1 /etc/passwd?
No hooks in first location, plenty in the second one.
/usr/share/libalpm/hooks/pacnew-checker.hook:Description = Looking for Pacnew/Pacsave created.
sudo: unknown user usr/bin/touch
sudo: intitiation error of audit plugin sudoers_audit
I guess we have a winner. This is the culprit - the pacnew-check script, generating the same error with “audit”. Besides, the place where the error shows suggests also that this is the script that is not working well. I could uninstall it, but it would be nice to have some automatic solution for pacnew files.
There was an app, “pacnew-chaser” written by some Manjaro member, and it worked well for years, but it was not developed anymore and is also producing errors, so I uninstalled it. It was way more convinient then this script…
All the various greps suggested here return my whole username, so it’s hard to spot the incorrect, shortened version. However, if we know this is the part of that new script, what now?
Can’t you use your file manager to do the search?
I don’t usually use the graphical tools, so I do not know how to use them.
I use “mc” - you could try that …
If I read it correctly, the script is digging out some incorrect username from somewhere, then applying it, then failing, since it doesn’t exists. So I need to find where the name is located…?
As to:
This also finds full “michaldybczak” name in results. However, I copied the result into text editor, removed the full name and searched for “michaldy” and… nothing.
Is it possible that the scrip is doing unexpected action dynamically truncating my user name, and this it doesn’t exist anywhere, but is error of that script?
Maybe it’s just better to use this command to manage pacnew files:
sudo DIFFPROG=meld pacdiff
which works fine, instead of some convoluted script that is a clear downgrade compared to already existing, old pacnew-chaser app, that should have been forged and upgraded, so it would simply work.
Just to check it, I reinstalled the script, run some update (I’m on unstable branch) and the issue still exists.