Posted on 08-28-2021 03:01 PM
I have a pool of systems where sudo is stuck - entering any command into the terminal that you need to elevate using sudo gets hung - sudo never requests the password, and the command never runs.
The only common denominator at the moment is that all the systems with this issue are running Big Sur. But it's definitely not all of them. I've checked the system log for errors and am not seeing anything useful is being logged when I run the sudo command, at least to my eyes.
Interestingly, if you enable the root account on the system, set the root password, and then you use su instead of sudo, that works fine. Also, no issues entering admin credentials in the UI, like for example, to make changes to admin locked System Preferences - this issue is isolated to terminal commands.
Anyone else see this? My google-foo is failing me on this one. Trying to find any troubleshooting for sudo is so tough since it's a part of so many commands people post online... and it doesn't seem to be a widespread issue.
Thanks in advance!
Posted on 08-28-2021 10:38 PM
I think in Jamf you don't need sudo as it runs your commands as root user
Posted on 08-29-2021 06:34 AM
I’m using the jamf command from the terminal itself - this does require sudo for most uses of it, unless something has changed recently. The sudo lockup also occurs when running other commands that require it as well.
Posted on 08-29-2021 08:54 AM
Posted on 08-29-2021 08:57 AM
Thank you - however, the sudoers file looks fine. I compared the sudoers file on a system having the problem to one that's not having any issues and they are identical, so I'm hesitant to touch anything else there.
Posted on 08-29-2021 12:10 PM
I'd give a try to wait for several minutes (about 10 as it says in the guide) if it is so - I'd change one Mac just for sake of curiosity 🙂
Posted on 08-29-2021 08:48 AM
Does it happen regardless of the logged-in user account, or if you manually create a new local admin? How were the user(s) created? How was the OS installed, or was it (ugh) cloned in some fashion? Does the same behavior exist when booted into Safe Boot mode?
Posted on 08-29-2021 08:53 AM
The user was created during the enrollment process - it's the same administrator account used by jamf to manage the system.
I haven't cloned a system in about 4 years - if a system needs to be "imaged", it's done either though recovery, internet recovery, or the macOS installer using the erase option.
I haven't tried safe mode or building a new account yet to see if it persists across different accounts. Safe mode might be tough because most of my work is done remotely.
Thanks for the suggestions.
Posted on 08-30-2021 06:19 AM
@taugust04 Any possibility that the Macs exhibiting this problem have installed a sudo plugin that may be failing?
Posted on 08-30-2021 07:22 AM
Hi - they are managed lab systems without anyone having administrative access other than IT staff, so the chances are low. TBH, I didn't realize there was such a think as a sudo plugin. What should I be looking for to see if one is installed or not?
Posted on 08-30-2021 10:33 AM
08-30-2021 07:30 AM - edited 08-30-2021 07:31 AM
First, I want to thank everyone who has offered ideas into this. I don't think I was very good at describing the entire situation and the troubleshooting I've performed, and that's on me, let me give some better specs and troubleshooting done so far:
08-30-2021 08:12 AM - edited 08-30-2021 08:14 AM
Did you by chance have any restrictions placed on the Terminal app? I once did that for a small group and forgot about it...drove me mad until I remembered it.
*Edit. I guess if that were the case you'd not be able to launch it. More coffee...sorry.