I have a user with a blank password, but now I can't run sudo
with that account.
sudo ls
Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
sudo: 3 incorrect password attempts
Is there any way around this?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityI have a user with a blank password, but now I can't run sudo
with that account.
sudo ls
Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
sudo: 3 incorrect password attempts
Is there any way around this?
sudo
on macOS requires the account to have a password:
https://support.apple.com/en-us/HT202035
Therefore it is not possible to just press ENTER to continue at the prompt, like you would expect from some other systems.
This behaviour is enforced through a configuration of the PAM subsystem. You can change the settings for that in /etc/pam.d
, where you have a sudo
file that setups the authentication requirements for the sudo
command.
WARNING: Changing the contents of the files in /etc/pam.d
incorrectly can deny you from logging to your system at all. Only make changes if you know what you're doing, you have a backup - and you feel confident in booting in Recovery mode to undo your changes if it should fail.
/etc/pam.d/sudo
to allow user with empty password to use sudo?