Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am again working on a web password changing script. Authentication and everything works, but the actual act of change the password does not. The script is suid root (a security issue, I know), and is supposed to call

system("nistbladm -e password=$new_password \'[name=$user]\',passwd.org_dir

However, at this point, the script just hangs at that spot and never continues. Any suggestions?

Replies are listed 'Best First'.
Re: System call to nistbladm hangs
by VSarkiss (Monsignor) on Nov 07, 2001 at 02:13 UTC

    Well, nobody's tried to answer this, so I'll venture a guess (I've never used nistbladm).

    It sounds like the program is waiting for input. Some password-changing programs will open the controlling TTY (through /dev/tty) directly rather than reading stdin or using command-line args. Is that the case here? (Note that there may be a bug where it opens and tries to read /dev/tty even when it's not supposed to.)

    HTH ... maybe a little