Authentication and SU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.
I noticed that each time that I execute su and then gedit I get the
following warning:
(gedit:2378): GnomeUI-WARNING **: While connecting to session manager:
Authentication Rejected, reason : None of the authentication protocols
specified are supported and host-based authentication failed.
Surfing Google i found the attached solution by Bruce Wolk, nevertheless
I wonder why does it work. In fact why do we need it at all?
I am not that good yet with scripts (I am newbie) but it looks
like it is executing gedit on an new shell session where the contents
of the current XUAUTHORITY were taken from root's .Xauthority.
Is it safe? And if that variable is important, why is it not changed
authomatically
when I execute su?
Also, I was checking for .Xauthority on my root directory and I saw not one
xauthority but several files starting with .xauth
Thaks!
Javier
------------------------------------------------------------
http://linux.derkeiler.com/Newsgroups/linux.redhat/2003-09/1193.html

Save the following script as something, say xroot. Then just
xroot gedit
You won't get the error.
*************
#!/bin/sh
if [ $# -lt 1 ]
then echo "usage: `basename $0` command" >&2
exit 2
fi
su - -c "exec env DISPLAY='$DISPLAY'
XAUTHORITY='${XAUTHORITY-$HOME/.Xauthority}'
"'"$SHELL"'" -c '$*'"

------------------------------
/_/
|O O| pepebuho@xxxxxxxxxxx
~~~~ Javier Perez
~~~~ While the night runs
~~~~ toward the day...
m m Pepebuho watches
from his high perch.


________________________________________________
Message sent using
Inter.net 2.7.2



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux