Use the non-interactive version of passwd which is autopasswd.
mkpasswd is interactive.

On Thu, 16 Apr 1998, J. Douglas Alden Jr. wrote:

> Hello everyone, I saw a similar topic to this on the list not too long ago,
> but never saw a definite answer, so I'm hoping that maybe someone can give
> me an answer, either on this list, or via private e-mail.
> 
> I am looking to set up password changing abilities, which would be done via
> a web interface.  A certain select group of people would have access to this
> password-protected web page, and they could change the password for any
> account on the system (of course I'll block out the system accounts so that
> those can't be changed).  I figured that I would do this with a perl script
> that would take the data inputted from the form (username), and then call
> the mkpasswd script that comes with the expect distribution.  However, on my
> system (a clean RedHat 5.0 install with all eratta installed), when I run
> "mkpasswd <some_account>, the process just seems to sit there forever.  If I
> run "mkpasswd -v <some_account>, then the process completes, but the
> password doesn't actually get changed.  I have also tried writing my own
> simple wrapper for the passwd command, but it fails to change the password,
> as well.
> 
> I've considered writing the whole routine in perl, and not calling an expect
> script, but I'm not sure of the proper locking mechanisms for the password
> file.  I notice that when I run adduser, an /etc/.pwd.lock file gets created
> (but not removed), and even with that file existing, I can still manually
> change a password, so I'm assuming (perhaps incorrectly) that the
> /etc/.pwd.lock file is a legacy issue that doesn't get used in redhat 5.0,
> and that the adduser command may actually be broken.
> 
> If anyone can offer any suggestions, I would be very grateful.  If you need
> more info, I'll gladly supply it.
> 
> Thanks in advance!
> 
> Doug
> 
> 
> 
> -- 
>   PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
> http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
>          To unsubscribe: mail [EMAIL PROTECTED] with 
>                        "unsubscribe" as the Subject.
> 


=--------------------
_/ Benjamin M. de los Angeles Jr.                       (632) 812-5820  _/
_/ Surf Shop Inc., System Administrator                 (632) 818-1654  _/
_/ UG7 Herrera Tower, Makati City, Phil.          <Fax>|(632) 845-0588  _/
                                                  -----------------------=


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to