LinuxQuestions.org
Visit Jeremy's Blog.
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 09-03-2013, 06:05 PM   #1
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Rep: Reputation: 3
I merged .Xauthority between my root and user accounts, not sure how to undo it.


So, I followed this:
Code:
echo $DISPLAY                  # you'll be needing this value 3 lines below
sudo -i                        # or "su -" on older Slackwares
xauth merge ~alien/.Xauthority # use your own username here instead of "alien"
export DISPLAY=:0.0            # use the value of DISPLAY you've seen 3 lines before
But I can't figure out how to unmerge them.
 
Old 09-03-2013, 11:28 PM   #2
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Original Poster
Rep: Reputation: 3
Update: checked a few things, discovered that .Xauthority in my user's directory is owned by root, and has no read, write, or executable permissions. I tried chown [my user] .Xauthority and it changed the ownership to myself, then sudo chmod -0755 .Xauthority and it didn't change anything. Changed to su, and ran it again, and it still didn't work. I'm back to square one.
 
Old 09-04-2013, 02:06 AM   #3
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
I'm not clear what you are trying to accomplish and why you would want to share your .Xauthority with root. I hope it isn't to run your gui as root. Anyway, on my machine .Xauthority looks like this:
Code:
~$ ls -l .Xauthority 
-rw------- 1 jdkaye jdkaye 168 set  2 09:11 .Xauthority
What does yours look like at the moment?
jdk
 
Old 09-04-2013, 02:28 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,104

Rep: Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267
yes, probably there is a much better way to accomplish what do you really need.
 
Old 09-04-2013, 02:35 AM   #5
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by jdkaye View Post
I'm not clear what you are trying to accomplish and why you would want to share your .Xauthority with root. I hope it isn't to run your gui as root. Anyway, on my machine .Xauthority looks like this:
Code:
~$ ls -l .Xauthority 
-rw------- 1 jdkaye jdkaye 168 set  2 09:11 .Xauthority
What does yours look like at the moment?
jdk
Mine looks like this:

Code:
~$ ls -l .Xauthority
---------- 1 slacker_ root 103 sep 2 10:54 .Xauthority
I think this means it's part of group root. I don't know how to adjust groups on individual files.

Quote:
Originally Posted by pan64 View Post
yes, probably there is a much better way to accomplish what do you really need.
I'm building a new kernel, and according to the slackbook article I linked to in my first post, it was to allow launching of X applications from su.
 
Old 09-04-2013, 02:38 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529
Quote:
Originally Posted by slacker_ View Post
sudo chmod -0755 .Xauthority and it didn't change anything.
What should that accomplish?..


Quote:
Originally Posted by slacker_ View Post
I can't figure out how to unmerge them.
0) 'man xauth', # find out the options
1) 'xauth -f ~/.Xauthority list', # list contents
2) 'xauth -f ~/.Xauthority remove some.host.name:0', # remove entry for "some.host.name:0".
 
Old 09-04-2013, 02:48 AM   #7
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by unSpawn View Post
What should that accomplish?..



0) 'man xauth', # find out the options
1) 'xauth -f ~/.Xauthority list', # list contents
2) 'xauth -f ~/.Xauthority remove some.host.name:0', # remove entry for "some.host.name:0".
It was to apply read write execute permission for me, and read execute for all others. Honestly this is the first I've ever had to deal with these tools so I'm confused


step 1) didn't produce anything. I'm assuming it was supposed list the contents of the file.

Last edited by slacker_; 09-04-2013 at 03:21 AM.
 
Old 09-04-2013, 07:09 PM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529
Quote:
Originally Posted by slacker_ View Post
It was to apply read write execute permission for me, and read execute for all others.
What I'm trying to convey is one shouldn't change perms unless one understands why and the implications of doing so. In this case nobody suggested it and besides it's an authorization database so it would never require exec perms in the first place.


Quote:
Originally Posted by slacker_ View Post
step 1) didn't produce anything. I'm assuming it was supposed list the contents of the file.
OK. So what does this return:
Code:
stat ~/.Xauthority; strings ~/.Xauthority
 
Old 09-04-2013, 10:34 PM   #9
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by unSpawn View Post
What I'm trying to convey is one shouldn't change perms unless one understands why and the implications of doing so. In this case nobody suggested it and besides it's an authorization database so it would never require exec perms in the first place.
Well I suppose I should do deeper research before just following the guides and trying thinga. I didn't realize it didn't require perms.


Quote:
Originally Posted by unSpawn View Post
OK. So what does this return:
Code:
stat ~/.Xauthority; strings ~/.Xauthority
stat .Xauthority returns
Code:
   File: '.Xauthority'
   Size: 103          Blocks: 8          IO Blocks: 4096    regular file
Device: 801h/2049d    Inode: 1333802     Links: 1
Access: (0000/----------)  Uid: ( 1000/      ra)   Gid: (    0/    root)
Access: 2013-09-04 02:39:29.000000000 +0400
Modify: 2013-09-02 10:54:00.000000000 +0400
Change: 2013-09-03 23:25:05.000000000 +0400
 Birth: -
and strings .Xauthority returns
Code:
         ra-laptop
MIT-MAGIC-COOKIE-1
MIT-MAGIC-COOKIE-1
Now what does this mean?
 
Old 09-05-2013, 02:03 PM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529
'stat' shows the file is still owned by group root instead of your user and has zero access perms instead of octal 0600. 'strings' shows two authorization cookies but only one hostname so that can't be right. Maybe it would be quicker to just generate a new file.
 
Old 09-05-2013, 06:21 PM   #11
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by unSpawn View Post
Maybe it would be quicker to just generate a new file.
And how would one do that?
 
Old 09-05-2013, 09:53 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,818

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
as a normal user run
Code:
mv ~/.Xauthority ~/.Xauthority.old
reboot
or as root
Code:
mv /home/slacker_/.Xauthority /home/slacker_/.Xauthority.old
also you might want to remove that underscore from your user name
it might cause all kinds of problems

Last edited by John VV; 09-05-2013 at 09:56 PM.
 
Old 09-05-2013, 09:57 PM   #13
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,600

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Quote:
Originally Posted by John VV View Post
Code:
mv ~/.Xauthority ~/.Xauthority.old
reboot
No need to reboot.

Just delete the file, logout, and login again. The GUI login will create another one.

And don't merge Xauthority files. You are far more likely to destroy the key you need to keep.

Last edited by jpollard; 09-05-2013 at 09:58 PM.
 
Old 09-06-2013, 03:47 AM   #14
slacker_
Member
 
Registered: Aug 2013
Distribution: Arch, Debian, Slackware
Posts: 333

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by jpollard View Post
No need to reboot.

Just delete the file, logout, and login again. The GUI login will create another one.

And don't merge Xauthority files. You are far more likely to destroy the key you need to keep.
Well ok then, thanks! I'll have to remember not to follow along to guides word for word then.
 
Old 09-06-2013, 04:25 AM   #15
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by slacker_ View Post
Well ok then, thanks! I'll have to remember not to follow along to guides word for word then.
Two factors about guides:
A. Their age. How recent is the guide?
B. There's more than one way to skin a potato.
jdk
 
  


Reply

Tags
slackware 14, startx, xauthority


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
How use this command /root/.bashrc: export XAUTHORITHY=/home/<user>/.Xauthority linuxer2013 Linux - Newbie 8 01-08-2013 10:06 AM
Root and all user accounts disabled mht17 Linux - Newbie 3 05-10-2011 07:23 PM
Adding root privaliges to user accounts or auto login as root Val-Ent Linux - General 15 03-02-2010 05:27 PM
Limiting the number of root user accounts barleykorn Linux - General 2 03-25-2005 11:51 AM
can i view user accounts with root? guggenheim Linux - General 2 03-17-2004 06:35 PM


All times are GMT -5. The time now is 03:57 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration