Re: How to change the unix passwd from 4gl /SPL
Posted in 1996
-- FLAME ALERT -- Gee, Mike, Your jab about having an AOL account really shows net maturity. And I'm supposed to trust _your_ opinion as a security consultant? ...Terry. -- FLAMES OUT -- Regarding not using Expect, and rather using "C"... I must recommend against using putpwent, as these functions are not support by SUN (the man page recommends against using them, saying their specs may change, ...); that is if another option is available. I had no difficulting convincing my systems area to use Expect/Tcl. It is really not a big deal. In fact, the method was preferred since it does not require writing an SUID root program (which causes other security concerns). However, the decision is yours -- learning Expect / Tcl might take longer than C (putpwent or equivalent), but you might also find other uses for it (e.g., FTP scripts?). As to an earlier post regarding return codes from system calls within Stored Procedures... The best you can do is get the "return" value from the called script/program. I wrote a cover script to the Expect program which generates meaningful return codes (i.e., bad userid, bad old password, bad new password, failed call to passwd, etc.), based on return codes in the Expect script (and so on; layered). The stored procedure, in turn, passes these codes back to the calling client, so that the client knows what happened. Works fine. ...Terry R. Gauchat Systems Consultant. tgauch@aol.com tgauch@msn.com tgauchat@iia.org