Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have a program I want to write that I need to change the uid the program is running as. It runs as a inet.d service, and when you connect it prompts for a username and password. I then need it to log in as the user and run a program. Any suggestions?

Replies are listed 'Best First'.
Re: Changing the uid
by Anonymous Monk on Apr 03, 2001 at 22:27 UTC
    You can change $UID, $EUID, $GID, and $EGID as appropriate. perldoc perlvar has a little more info.
      umm ... that doesn't work. I changed $EUID, $UID, $<, and $>. None of them worked.
        Were you root when you did it?