sudo password setting

Set Password For Sudo Commands Permanently OS X

When we write scripts, we want to embed sudo command with password automatically for our username. We need to edit the hidden etc/sudoers to add (usersname is our login name). usersname ALL=(ALL) NOPASSWD: ALL