Re: USER in informix
Posted in 2004
Not completely correct. If you log in as someuser, and then sudo to
runuser, then NAME will be "runuser". (This is a BIG pain). At least
on HP-UX 11.i IDX 7.31 UD6.
rkusenet wrote:
> I have written a perl program to connect to an external box. The DBI->connect
> requires user name and password. In order to avoid hardcoding password in
> the perl text file I followed this approach:-
>
> $password=`PrintPassword`
> chop($password);
>
> PrintPassword is an ESQL/C program which simply printf the password.
> (of course I have taken care to ensure that strings PrintPassword does
> not reveal the password). Since the password is to be supplied to only
> one user I am checking like this:-
>
> $ select count into :wcount
> from systables
> where USER = 'abc' ;>
> This works like a charm. Unless I log on as 'abc', the program does not
> print the password. However I want to confirm how does Informix
> check USER. AFAIK it goes by real user id and not effective user id. That
> is the takes the user name by which someone logons to the box or connects
> to the database. Is there a hole in my assumption?
>
> TIA.
>
> Ravi
>
--
( ______
)) .-- Scott MacKenzie; Dine' College ISD --. >===<--.
C|~~| (>--- Phone/Voice Mail: 928-724-6639 ---<) | ; o |-'
| | \\--- Senior DBA/CARS Coordinator/Etc. --/ | _ |
`--' `-- E: scottm at dinecollege dot edu -' `-----'
sending to informix-list