changing password in a sh script

changing password in a sh script

Post by Andrea M Dunh » Sun, 16 Aug 1992 02:11:23



Hi Folks,
  Will someone please post how to change/set passwords after using Sun's  
add_user script.  It doesn't seem to work to (from the script) just use
        ==  script stuff ==
        passwd <uname>
        <password>
        <password>
        ==  other script stuff ==

Any help is much appreciated.
                * AndREa *

 
 
 

changing password in a sh script

Post by Scott Bradl » Mon, 17 Aug 1992 18:04:39



>Hi Folks,
>  Will someone please post how to change/set passwords after using Sun's  
>add_user script.  It doesn't seem to work to (from the script) just use
>    ==  script stuff ==
>    passwd <uname>
>    <password>
>    <password>
>    ==  other script stuff ==
>Any help is much appreciated.
>            * AndREa *


passwd requires interaction with user and can't be scripted short of
using something like 'expect,' which comes with a sample script to
do exactly what you want.  (see comp.unix.questions FAQ)