<font color='black' size='2' face='arial'>I <font size="2">really do </font>appr<font size="2">eciate your reply, but please note that, through additional trial and error, I have determined that it is in fact possible to interact with an existing dbus session through sudo ...<br>
<br>
I was previously attempting to do this by exporting the DBUS_SESSION_BUS_ADDRESS value stored in the file located within /home/Louise/.dbus/session-bus/<br>
<br>
This didn't work, and I have just now figured out why ... the DBUS_SESSION_BUS_ADDRESS value stored in this file does not match the one reported by /usr/bin/env for user Louise.<br>
<br>
If I manually take the DBUS_SESSION_BUS_ADDRESS from env (run by Louise) and put it into the script that gets sudo'd as Louise from root, it works ...<br>
<br>
So my new question is: why doesn't the value for DBUS_SESSION_BUS_ADDRESS in /home/Louise/.dbus/session-bus/ match the value reported for Louise by env? I see that the file hasn't been modified since March 13th. It was my impression that the file should be updated any time Louise gets a new DBUS_SESSION_BUS_ADDRESS...? Is there any other more appropriate way for me to retrieve the current DBUS_SESSION_BUS_ADDRESS for user Louise?<br>
</font>
<div> <br>
</div>
<div> <br>
</div>
<div> <br>
</div>
<div style="font-family:arial,helvetica;font-size:10pt;color:black">-----Original Message-----<br>
From: Thiago Macieira <thiago@kde.org><br>
To: dbus <dbus@lists.freedesktop.org>; Louise Baldwin <louiserbaldwin@aol.com><br>
Sent: Tue, Mar 18, 2014 4:44 pm<br>
Subject: Re: How to interact with existing dbus session through sudo?<br>
<br>
<div id="AOLMsgPart_0_48598b42-3939-4a3f-99e6-88b6d997d397" style="margin: 0px;font-family: Tahoma, Verdana, Arial, Sans-Serif;font-size: 12px;color: #000;background-color: #fff;">
<pre style="font-size: 9pt;"><tt>Em ter 18 mar 2014, às 14:22:45, Louise Baldwin escreveu:
> Why not?
>
> I need to be able to run tasks consecutively for two different users (root
> and Louise). How do you suggest this be accomplished if it's "impossible"
> to use sudo with dbus?
It's not permitted because the bus daemon disconnects if it detects a
connection from a different user. It's been like that for 8 years.
Maybe the solution to your problem is to use something other than D-Bus.
Moreover, if one of the processes is running as root, you need to do a
thorough verification of the incoming data to avoid exploits leading to
privilege escalation.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
</tt></pre>
</div>
<!-- end of AOLMsgPart_0_48598b42-3939-4a3f-99e6-88b6d997d397 -->
</div>
</font>