Although Apple discourages it, users can create Mac OS X accounts without passwords. Starting with Mac OS X 10.5, Apple prevented these types of accounts from being able to use ‘sudo’ via the command line.
Why might this be a problem? In my case, I built a diagnostic OS (accessible via NetBoot) that sometimes needed this kind of access. If I wanted to install MacPorts, for example. The original reason was that I was required to get CopyCatX working in the diagnostic OS, but I really don’t want to come across as endorsing this product.
Anyway, the fix is pretty easy – you’ll need to edit the file /etc/sudoers. Although it’s recommended that you use visudo (as it does sanity checks on the file), I tend to use TextWrangler. Carefully.
Change the line that reads:
%admin ALL=(ALL) ALL
to say this instead:
%admin ALL=(ALL) NOPASSWD: ALL
(I’d recommend against copying and pasting – Bad Things can happen if this file is damaged.)
Save. You may need to reboot, as well.
Posted in Diagnostic OS
|