Re: How to change the unix passwd from 4gl /SPL
Posted in 1996
Terry Gauchat wrote: > > I also recommend a stored procedure call over SPC, since we know any > Informix client can call a stored procedure with no new front-end > pieces. > > However, I'd recommend against writing a C program which directly > modifies the passwd/shadow file. > > Instead, according (with much thanks to Lester Knutsen, who responded > to my earlier question), try the public domain utility to interact > with TTY programs (such as "passwd") called "Expect". > > It is available on the Internet: Use your favorite search engine, > since I don't have the address handy. > > ...Terry. > tgauch@aol.com Writing a stored procedure call and then issue the "expect" command is probably the easiest approach. Writing a stored procedure to call a C code is more difficult, especially for System V environment where shadow passwords are used. I certainly will appreciate Koen to share his program with us and save us some programming effort. However, Informix stored procedures have limited system error codes. The stored procedure that call the C code will not be able to handle many possible errors that an RPC call can handle. Maybe other database packages can pass more system errors back to the stored procedure. I am not sure. Can a stored procedure guru help me here? This is the main reason (not the only reason) that we decided to implement an RPC instead. Chao Din