LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-26-2015, 12:40 AM   #1
jzoudavy
Member
 
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 188

Rep: Reputation: Disabled
x11 connection rejected due to wrong authentication


hi experts

I got a bit of problem with the below situation:

Code:
root@kvm_host1:/mnt/nfs# virt-manager &
[1] 4663
root@kvm_host1:/mnt/nfs# X11 connection rejected because of wrong authentication.

[1]+  Done                    virt-manager
root@kvm_host1:/mnt/nfs# su test
test@kvm_host1:/mnt/nfs$  virt-manager &
[1] 4679
As you can see, I ssh into my ubuntu host with user test, but during some nfs config I su into root, then try to launch virt-manager GUI via X11. Which obviously fails I guess since root wants to launch X11 session but I established the session as user test.

My question is this: Is there a way to stop this from happening? to allow my root to launch the GUI as well?

Thanks
 
Old 04-26-2015, 06:06 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
X doesn't work well when running as root (loss of security mostly, and the ease of "unintended results").

Virt-manager doesn't need root. What does need root is access to the service.

One of the things that MAY be happening (especially if an NFS mount is used for the user logins home directory) is that root is not granted access to the NFS mount. ssh creates/stores the X authentication using xauth, by default xauth will use /home/<user>/.Xauthority. If root isn't granted NFS access, then it cannot read the users .Xauthority file. The blocking (if the NFS server is Linux) is usually "root_squash", which maps uid 0 to the anonymous uid (nfsnobody).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
X11 connection rejected because of wrong authentication. anandp_s Red Hat 1 03-28-2014 12:37 PM
X11 connection rejected because of wrong authentication. mschnell Linux - Newbie 1 07-12-2011 12:55 PM
X11 connection rejected because of wrong authentication. vino87 Linux - Desktop 3 06-08-2011 09:45 AM
X11 connection rejected because of wrong authentication???????? Taylrl Linux - Newbie 4 12-07-2010 09:51 AM
X11 connection rejected because of wrong authentication wmasry Linux - Newbie 1 10-19-2010 06:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration