3 Replies Latest reply: May 26, 2010 9:30 AM by 807559 RSS

    Shell script for password prompt

    807559
      Hi

      I am using Solaris9 and trying to change password of a user with command:

      passwd userid

      i want password to be given from text file or command line so that password is not prompted on the command line. Is there any way to do this?
      I guess i am able to force the carriage return to be entered while entering the password from command line.
      This is what I am doing:

      passwd userid << EOF
      newpassword
      newpassword
      EOF


      But after this, it still gives me New Password prompt. Any help will be appreciated.