Running Cyrus Imap under a different user

Gabriele Bulfon gbulfon at sonicle.com
Wed Nov 3 18:47:31 EDT 2010


Thanx, I understand what you mean, but I'm also supposed to stop and start the same deamon
from this user again, manually, without su.
I already solved the sudo problem, by wrapping the master launch inside a shell that will
set the environment for it, and infact it does.
What happens is later, when master forks and change user.
Why is it again loosing my environment?
I just want the binaries to override system libs with mine :)
(of course I could set system environemnt inside master profile or elsewhere, but this is not what I want to do. I can't touch any root system behaviour)
Thanx again :)
Gabriele.
-= Mail sent through WebTop2 =-
----------------------------------------------------------------------------------
Da: Clement Hermann (nodens)
A: info-cyrus at lists.andrew.cmu.edu
Data: 3 novembre 2010 20.59.53 CET
Oggetto: Re: Running Cyrus Imap under a different user
Le 03/11/2010 18:03, Gabriele Bulfon a écrit :
Thanx for the quick reply ;)
Yes, environment is correctly exported.
Maybe there is something I can tell to Linux so that it gives my
environement to anyone
changing user to myuser?
You are not supposed to use sudo to do this. The correct way is to login
as root (or change identity via su -, or let init run the init script
for you at startup), and launch the init script to start cyrus master,
which will drop privileges when forking to child processes (imapd,
pop3d, etc).
sudo *will* remove some environment variables, as a security mesure.
It could be that the best way to achieve what you want is to modify an
existing binary package of cyrus imapd for your distribution, modifiying
only the user-related configure options and configuration scripts.
Cheers,
--
Clement Hermann (nodens)
- "L'air pur ? c'est pas en RL, ça ? c'est pas hors charte ?"
Jean in L'Histoire des Pingouins, http://tnemeth.free.fr/fmbl/linuxsf/
Vous trouverez ma clef publique sur le serveur public pgp.mit.edu.
Please find my public key on the public keyserver pgp.mit.edu.
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20101103/9f868a16/attachment.html 


More information about the Info-cyrus mailing list