4 blocked updates

Jonas Norlander jonorland at gmail.com
Sat Jun 6 11:42:19 UTC 2009


On Sat, Jun 6, 2009 at 8:20 AM, Nils Kassube<kassube at gmx.net> wrote:
> Muzer wrote:
>> I can't remember any examples unfortunately, but I have had apps that
>> deny me access to certain files in my home directory if I ever load
>> it with sudo rather than kdesudo.
>
> I don't think there are apps which deny you access if you use sudo but
> it is much more sinister. You start a GUI program for the first time
> ever and you start it with sudo. The program writes it's config files to
> "/home/$USER/.someconfigpath/configfile". Some time later you start the
> same DUI program without sudo and it doesn't start because the config
> file "/home/$USER/.someconfigpath/configfile" is now owned by root and
> isn't accessible to the user.
>
> If you want to see the difference between sudo and kdesudo, use these
> commands:
>
> sudo bash -c set >set1.txt
> kdesudo "bash -c set" >set2.txt
> diff -u set1.txt set2.txt >diff.txt
> kate diff.txt
>
> That will show that sudo preserves the $HOME of the user while kdesudo
> sets $HOME to the correct home directory for root which is "/root".
>
>

> Nils

I did something similar:

jonas at Tor:~$ sudo env > sudo.txt
jonas at Tor:~$ kdesudo env > kdesudo.txt
jonas at Tor:~$ diff -u sudo.txt kdesudo.txt
--- sudo.txt    2009-06-06 13:37:32.000000000 +0200
+++ kdesudo.txt 2009-06-06 13:37:57.000000000 +0200
@@ -2,9 +2,10 @@
<snip>
-HOME=/home/jonas
+HOME=/root
 LANGUAGE=sv_SE:sv:en_GB:en
 DISPLAY=:0
+XAUTHORITY=/tmp/kdesudo-th6945-xauth

and the only difference is the HOME and XAUTHORITY environment variable.

/ Jonas




More information about the kubuntu-users mailing list