Hi all !
There was posting in the net few days back how to change the passwd
of Inf5.0 user from Windows. Have not seen an answer (sorry if I have over
looked). I propose the following way but would be glad to get a
better solution. Here goes my sol. Basically we need to cange the
unix passwd from Windows. If there is some Windows API for this
then need not read the sol !
1) Write a C program which uses the UNIX logic to encrypt
passwd. You can get the source code for this from the
free s/w section of UNIX freeware site. The
C program should take a string argument.
2) The C program should replace the password entry in the
/etc/passwd file by the encrypted password. Ofcourse
for this you must have root privilege. A shell script
should be easier way of doing this.
3) Now write a procedure in Informix that takes the new
password from the GUI app. In the procedure run the
the C program using system command and pass the
new password to it which in turn will replace the
encrypted password in the /etc/passwd file.
4) For this the user must have th root previlege in UNIX
or it should be root itself.
This is a tidious way of doing this. But any better way anyone
know ?
If you really need to implement this can go ahead.
Bye and good luck,
Jaminikant
--
------------------------------------------------------------------
HCL Consulting Ltd. C/O Ajay Pradhan
3, Udyog Vihar Phase I Qr-86/C, DDA Flats
Gurgaon-122016, Haryana Phase II, Mosjid Moth,
INDIA Ph : +91 124 342371,342971 New Delhi - 110048, INDIA
------------------------------------------------------------------