title: How to check password in Linux by using C or shell?
body: <p>I have a program written in C running on a embedded Linux, sometimes it want to check the password of a system user. </p>
  
  <ol>
  <li>If I can get the crypt salt of <em>/etc/passwd</em>, I can use crypt() to check the correction of user password.</li>
  <li>Is there any script of shell can help me check the password? Such as check_passwd username password, then it return a value for correct or incorrect?
  Thanks!</li>
  </ol>