Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Colin_In_Belgium

macrumors newbie
Original poster
Feb 2, 2020
7
0
Belgium
Sudo stopped working yesterday with the following message:

sudo: 4294967295: invalid value

I was trying to delete a TM backup : sudo tmutil deletelocalsnapshots 2020-01-22-092840

I have tried other commands with the same error message.
Any idea how to fix this, without reinstalling the o/s?
I'm logged in as Admin.
The sudo version command still works (sudo -V):

Sudo version 1.8.29
Sudoers policy plugin version 1.8.29
Sudoers file grammar version 46
Sudoers I/O plugin version 1.8.29


The permissions are:
-r-s--x--x 1 root wheel 438672 Jan 24 10:14 /usr/bin/sudo

Thanks.
 
Backup (just in case) and reinstall "in place" by running the current installer for Mojave from App Store. Reinstall in place (simply run over existing system without wiping the disk) will preserve data, Apps, and settings; it will reinstall system files and may reset this. It is quite fast (~30 minutes on my system at most) and can heal the system.
 
What has changed since yesterday? Installed any software, updated the system?

How does your /etc/sudoers file look? Any configurations in /etc/sudoers.d? Does sudo visudo -cs work and return an error?
 
Backup (just in case) and reinstall "in place" by running the current installer for Mojave from App Store. Reinstall in place (simply run over existing system without wiping the disk) will preserve data, Apps, and settings; it will reinstall system files and may reset this. It is quite fast (~30 minutes on my system at most) and can heal the system.
Thanks Honza. If nothing else works, I'll do that next week.
 
What has changed since yesterday? Installed any software, updated the system?

How does your /etc/sudoers file look? Any configurations in /etc/sudoers.d? Does sudo visudo -cs work and return an error?
I believe it was working for the last time just before 29 Jan.
And, on 29th, there were Security Updates installed:
Screenshot 2020-02-02 at 18.02.52.png

Unfortunately, sudo visudo -cs gives me the same error.
I copied the sudoers file and attached it, just in case that's useful.
/etc/sudoers.d is empty.
Screenshot 2020-02-02 at 18.18.59.png
 

Attachments

  • sudoers_copy.txt
    2.2 KB · Views: 257
The sudoers file looks fine.

It probably isn’t a coincidence that it stopped working after installing a security update, as sudo is a system component that should’t have control over. Coincidentally, the latest security update did modify sudo.

Have you tried using sudo with an absolute path? e.g. /usr/bin/sudo visudo -cs

What is the output of echo $PATH?
 
Last edited:
It does seem that sudo is throwing the error. It must be getting some wrong input from somewhere. The number 4294967295 (being the highest number of a 32-bit unsigned integer and usually being reserved for the -1 in programs) can denote an input error.

Are the user and group IDs set correctly? → id (should include “80(admin)”)
Does the sudoers file have to correct permissions? → ls -l /etc/sudoers (should be “-r--r----- 1 root wheel”)

Without anything else to go by, I would also suggest you try the reinstall/repair route suggested above.
 
[...] Are the user and group IDs set correctly? → id (should include “80(admin)”)
Does the sudoers file have to correct permissions? → ls -l /etc/sudoers (should be “-r--r----- 1 root wheel”)

Without anything else to go by, I would also suggest you try the reinstall/repair route suggested above.
This is what I see for Id and permissions:
Screenshot 2020-02-03 at 06.38.42.png

So, permissions seem ok...
Id includes 80(admin).
I compared the results with those of my partner's Mac (same model with Mojave).
On her machine, sudo works okay.

The only difference I see is that I have :
701(com.apple.sharepoint.group.1)​
702(com.apple.sharepoint.group.2)​
703(com.apple.sharepoint.group.3)​

and she has:
701(com.apple.sharepoint.group.1)​
703(com.apple.sharepoint.group.2)​

A bit strange maybe that her sharepoint groups are 1 with 701 and 2 with 703, and not with 702.

So, unless this changes something, it looks like we all agree, a reinstall is the way to go.
I really appreciate your excellent help, and that of Honza1.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.