So now if I try the whole process from the beginning again, after inserting
sudo visudo "/private/etc/sudoers.d/$LOGNAME" + password enter + R
I'm seeing this error.
Any idea what is it about?
So now if I try the whole process from the beginning again, after inserting
sudo visudo "/private/etc/sudoers.d/$LOGNAME" + password enter + R
I'm seeing this error.
Any idea what is it about?
This is basically complaining that the previous two attempts were not ended successfully.
(I'll spare you a rant about vim
being a stupidly user-hostile default in 2025.)
I would delete the files thusly:
sudo rm /private/etc/sudoers.d/.mac.tmp.swp
sudo rm /private/etc/sudoers.d/mac.tmp
then I would edit the file using pico
:
sudo pico "/private/etc/sudoers.d/$LOGNAME"
which should look something like this:
Then paste in the two lines:
%admin ALL=NOPASSWD: chown -R mac:staff /Library/Audio/Plug-Ins
%admin ALL=NOPASSWD: chmod -R 755 /Library/Audio/Plug-Ins
so now it should look like this:
Then press CONTROL+X (not Command ⌘)
Press Y to confirm you want to save the changes
and then press Enter/Return to use the file name shown.
Thanks for your help—I really appreciate it.
I kind of lost you in the beginning. Could you let me know what files I should delete and how to do that?
Suppose now I'm at the same error window.
Get out of the error window and enter these two lines in Terminal, they will delete the errant files:
sudo rm /private/etc/sudoers.d/.mac.tmp.swp
sudo rm /private/etc/sudoers.d/mac.tmp
Tjluoma, could you help me with this, please?
How do I continue with this error?
It says No such file or directory
, which means the file has already been deleted. Although...did you run each of the commands separately, or did you paste both in at the same time? Because they need to be run one at a time. So perhaps try that to make sure both files are in fact gone. Then you should be able to carry on from this point:
So I just ran that command from the beginning and got this result—I’m not exactly sure what it means, but Keyboard Maestro is still mentioning a password issue.
Do you happen to know what’s going on here?
This all seems a bit more complicated than I anticipated. I really thought it would be a quick fix.
The first image is after deleting the files with the commands seperatly one by one as hemicyon suggested, and the second is after running the rest of the command.
It still appears to me that you are entering multiple lines at a time, including lines meant for the config file, into the terminal.
Please confirm this is what you are doing in your terminal (if you're going to copy from here, don't copy the mac@Mac ~ %
bit—I've included it here only to illustrate how it should appear to you in your terminal after entering the command):
mac@Mac ~ %
sudo rm /private/etc/sudoers.d/.mac.tmp.swp
Then, you hit the <return>
key. You are prompted for your password. You enter it, and hit the <return>
key again. If the file doesn't exist to delete, it tells you No such file or directory
.
Then you enter the next command:
mac@Mac ~ %
sudo rm /private/etc/sudoers.d/mac.tmp
Then, you hit the <return>
key. You are prompted for your password. You enter it, and hit the <return>
key again. If the file doesn't exist to delete, it will tell you No such file or directory
.
Then you enter the command to open pico:
mac@Mac ~ %
sudo pico "/private/etc/sudoers.d/$LOGNAME"
Then, you hit the <return>
key. You are prompted for your password. You enter it and hit the <return>
key again.
An 'artistic' rendering of how your terminal should look (more or less) after going through all the commands one after another:
mac@Mac ~ % sudo rm /private/etc/sudoers.d/.mac.tmp.swp
Password:
mac@Mac ~ % sudo rm /private/etc/sudoers.d/mac.tmp
Password:
rm: /private/etc/sudoers.d/mac.tmp: No such file or directory
mac@Mac ~ % sudo pico "/private/etc/sudoers.d/$LOGNAME"
Password:
Then pico opens and should look (more or less) like @tjluoma's very helpful screenshots in the post above. At this point, I hope it's clear how you need to proceed.
Thanks for your help,
As you can see in the images, I did it again just to help you understand.
I opened a Terminal, copied the first command exactly as shown in the image, pasted it, and pressed enter once—and here’s what happened.
Thanks for confirming. Unfortunately, you'll need to wait for someone else to help out because I don't know why that would be happening.
You're trying to use the sudo
command to delete the temporary file, but your sudoers
file has an error in it so sudo
can't parse it and throws an error. You should still be able to delete the file by entering your password.
Check your Forum DMs -- I sent you a private message a while ago offering to set up a Zoom call to help you with this, which'll be a lot easier than doing it via async Forum posts. But I quite understand if remote video support from a total stranger sounds a little suspicious and you'd rather not go there!