Admin account does not have sudo
I have a work laptop, and I recently suddenly lost `sudo` access even I am an admin on my laptop.
I originally found the thread at https://discussions.apple.com/thread/7654548
However, my UUID is inside of Directory Utility -> Directory Editor -> Administrators -> GroupMembers
I got many issues such as
> brew install hyperkit
Error: The following directories are not writable by your user:
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
You should change the ownership of these directories to your user.
sudo chown -R $(whoami) /usr/local/share/zsh /usr/local/share/zsh/site-functions
And make sure that your user has write permission.
chmod u+w /usr/local/share/zsh /usr/local/share/zsh/site-functions
> visudo
visudo: /etc/sudoers: Permission denied
> sudo -l -U homiao
Password:
Sorry, user homiao is not allowed to execute 'list' as homiao on LUSC02F40QRMxxx.
MacBook Pro (2020 and later)