title: how to login to user account from shell script with password in the script?
body: <p>I am writing a shell script to login to any user account with the password mentioned in the shell script itself. My shell Script is as follows:</p>
  
  <pre><code>mypass="helloworld"
  echo mypass&gt;su myaccount
  </code></pre>
  
  <p>After executing this shell script i am still in my current user account rather than in <code>myaccount</code></p>
  
  <p>TL;DR I want to know how to login to a user account via a shell script by just running it.</p>