How can I prevent the administrator password prompts?

When deleting files, installing new applications, running AppleScript code, etc, I am prompted to enter my administrator password:

Administator Prompt

How can I set it so that everything I do is authorized to where it doesn't require a password?

Note: I'm running OS X Yosemite v10.10.5 (14F27).


Solution 1:

You can use the root user. This is highly unrecommended, but it will never show you an administrator privileges dialog.

Solution 2:

This method does work, but I'm not sufficient a nix guru to know if there could be unforeseen side effects, so a) proceed with caution & b) if anyone knows better or has useful caveats, please let us know.

You could set the permissions to group wheel instead of admin or staff, then add yourself to the wheel group if you're not already a member.

The wheel group historically behaves like admin or staff but doesn't require a password if you are a member of it. It also is not an automatic addition when setting up a new admin account, it must be conferred manually.

You can test on the root level of the boot drive, as that's one place where creating or deleting a file will always ask for your password if group is set to admin or staff, rather than wheel.
Don't recklessly 'Apply to enclosed'.

I find BatChmod's GUI interface easy to understand & simpler to use than terminal.
Horizontal lines mean 'no change'. This will preserve existing ownership & Everyone perms whilst changing the group permissions in the example below.
Apply to enclosed will recursively change all the contents of your chosen folder, so use with extreme care.

enter image description here

to check what groups you are already in, use Terminal
id myname
You should already be in admin & staff, amongst others.

If you're not already a member of wheel
sudo dscl . append /Groups/wheel GroupMembership myname
which will request your password & add you to that group. Test again with id myname

This appears to require a relog before the system recognises the change.