Can anyone suggest where to look?
hi,
try searching CPAN.
http://search.cpan.org/
alfred,
[EMAIL PROTECTED] wrote:
How can we test if a user is allowed to login? How can we exec programs as another user?
I'm writing a script to translate SASL usernames into UNIX usernames, test if the user is allowed to login, & run Procmail as the user if so. (Users authenticate to our Postfix server using SASL & want to write custom filters for their outgoing mail, so this script is intended as a Postfix content filter.)
I'm at a loss how to test if a user is allowed to login. I looked at Authen-PAM & googled, without finding anything relevant.
I tried following perlsec on how to exec programs as another user:
$UID = getpwnam $translated_sasl_username; $ENV{"PATH"} = "/bin/:/user/bin/"; exec $program;
But unfortunately the program is not execed as $UID. Using $EUID in place of $UID had no effect. Here again, google couldn't help.
We're running Debian unstable.
Anyone know how to test if a user is allowed to login, or how to exec programs as another user? Can anyone suggest where to look?
Thanks!
Jack
--
