Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening admintool as member of group sysadmin failing 1

Status
Not open for further replies.

TobyR

Technical User
Mar 29, 2001
16
0
0
DE
Dear all,

I can open admintool from the command line as root no problem, but as any user whose primary or secondary group is sysadmin I get the following error message:

Xlib: connection to ":0.0" refused by server
Xlib: Client is not authorised to connect to Server
Error: Can't open display :0.0

I noticed that while as root, 'echo $DISPLAY' gives the output :0.0. So I export the same for the normal users. It is of course no big deal that I am having this problem but I am beginning to study for an exam and have bumped into a question asking after the conditions for non-root users to open admintool and I am testing this out. Any help will be greatly appreciated. Thanks in advance.

Toby Russell
 
if root has the shell /sbin/sh do these commands:

as logged in user:
xhost +`uname -n`

as root:
DISPLAY=`uname -n`:0.0;export DISPLAY
admintool


should work :)
 
Dear Jad,

Thanks for taking the trouble to reply, however the problem for members of sysadmin group remains. Additionally I am not sure how I should enter xhost +`uname -n`. I have tried a couple of permutations as a non root user. Did you mean xhost=`uname -n`?. I tried that too and it does not work. The new error message is as follows:

Xlib: connection to "[`uname -n`]:0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
Error: can't open display: `uname -n`:0.0

Do you have any other suggestions?

Toby
 
ok ... what i meant was enter allow anyone from the current host to access your display

for instance if 'uname -n' returns 'apollo' then the command would be:
xhost +apollo

if this fails for any reason, then just 'xhost +' will allow access to write to your screen from anywhere (anywhere capable of accessing your machine).

the other command the 'DISPLAY= ... ' command was to set the DISPLAY variable to the local machine.

you could likewise type this as :
DISPLAY=apollo:0.0;export DISPLAY

hope this helps.

Jon
 
set following environment

xhost +
DISLAY=ipaddress or servername:0.0;
export DISPLAY

Before executing the admintool confirmed whether
the environment variables are correct.

 
Thanks guys, that did it, works perfectly now. I was looking at the solutions at the end of a long week and missed a couple of obvious things. Thanks again for your help.

Toby
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top