Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 11830 - autopasswd from expect package doesn't work as expected
autopasswd from expect package doesn't work as expected
Product: Fedora
Classification: Fedora
Component: tcltk (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Depends On:
  Show dependency treegraph
Reported: 2000-06-01 16:08 EDT by bednar
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-21 08:41:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description bednar 2000-06-01 16:08:00 EDT
The original /usr/bin/autopasswd, which should make it easy to change
passwords from scripts doesn't work as expected with passwd command, that
is supplied with redhat in package passwd. The fixed and working version
should look like this:

#!/usr/bin/expect -f
# wrapper to make passwd(1) be non-interactive
# username is passed as 1st arg, passwd as 2nd

set password [lindex $argv 1]
spawn passwd --stdin -f [lindex $argv 0]
expect "Changing password"
send "$password\r"
expect eof
Comment 1 Miloslav Trmac 2004-04-21 10:07:26 EDT
This is still an issue in expect-5.39.0-93.
Comment 2 Alan Cox 2004-06-21 08:41:16 EDT
Actually with pam even that won't work as the messages vary and
sometimes are not automatable (eg "insert smartcard now")

Removed autopasswd example.

Note You need to log in before you can comment on or make changes to this bug.