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