Thank for your help.
I try "sql -ustudent @192.168.1.11,tcp_ip,II[student,12345]::demodb" as you suggested and the answer is as follows:
1. if student is OS administration,it is ok。
2. if student is OS normal account and Ingres normal account at the same time,then the terminal prompt: Please enter your password:. Then I input the password, and it passed.
3. if student is just an Ingres normal account, not a OS accout, then error message is: E_LC0001 GCA protocol service (GCA_REQUEST) failure. Internal service status E_GC000b -- Login failure: invalid username/password.
why? Does an user should be OS account and Ingres account at the same time?
I debuged and found that, if user is OS administration, then in function scs_initiate(scsinit.c), the scb->scb_sscb.sscb_state will be set to SCS_INPUT, and passed. But, if user is an ingres nomal account, scs_initiate will call the function scs_dbdb_info, and in scs_dbdb_info it will judge ust.du_pass, and ust.du_pass is not null(so user is password protected), then it will check the ics_rupass(check if user specified an initial password), but ics_rupass is null, and then it set the ics_uflags |= SCS_USR_RPASSWD and return to scs_initiate and then return to scsqncr.c, the scsqncr.c then prompt for password. But because no terminal in .net program, so no prompt for password, and then scsqncr.c will call scs_check_password with NULL password, failed in the end.
I think that ics_rupass should not be null, then it can compare with the ics_srupass, and passed if matched, but it is null actually. I don't konw what happed.
Help! Thanks!
|