Re: [Exim] PAM for SMTP auth

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Adrian Daminato
Fecha:  
A: exim-users
Asunto: Re: [Exim] PAM for SMTP auth
Christof Meerwald wrote:
>
> >
> >I'm not sure, but I think I'm missing something. Do I need to have the
> >SMTP auth use the user of the localuser attempting to authenticate? Or
> >is my PAM setup incorrect?
>
> Most likely pam_pwdb needs to have root privileges (meaning exim must run as
> uid root) to get access to your shadow password file (at least the pam_unix
> module supplied with Linux-PAM-0.69 doesn't work with shadow passwords if it
> doesn't have root privileges)
>


I managed to get it to work, to an extent. It was looking for the
password for my exim user. I tried to seteuid at the point of the PAM
calls, but it fails. I want to be able to run exim as it's own user,
only taking root privileges as it needs - how to I get exim to become
root, seteuid as the user authenticating, then go back to it's 'regular'
user? I've got most of it coded to save the current euid/uid/egid/gid,
then switch back - but I can't switch because I'm not root. How does
exim regain root privileges when it needs them?

--
Adrian Daminato
TUCOWS International Corp.
http://www.tucows.com