title: How can i run a sudo command in Bash script?
body: <p>I want to run the following sample bash script which needs sudo password for a command</p>
  
  <pre><code>#!/bin/bash
  kinit #needs sudo password
  vi hello.txt  
  </code></pre>
  
  <p>while running the above script it is asking for password.<br>
  How can i pass the username and password in the command itself or is there any better way i can skip passing my password in the script ?</p>