title: OS X run bash command as another user with sudo privileges
body: <p>I have root access in my terminal and I am trying to run a command as another user with sudo privileges and I can't make it work.</p>
  
  <p>Here is the scenario:</p>
  
  <p>I am logged in as root and I want to execute <code>sudo echo hello world</code> as the user <code>javier</code>. </p>
  
  <p>I currently have <code>sudo -u javier sudo echo hello world</code> but it prompts for a password.</p>
  
  <p>Is there a way of running this without it prompting for a password?</p>