PDA

View Full Version : [ubuntu] 11.10 Encrypted Home Directories + "X11 connection rejected because of wrong authenti



drenze
January 8th, 2012, 04:38 PM
I have a desktop machine at home running Ubuntu 11.10 Oneiric Ocelot and which has encrypted home directories configured. I've also got a laptop that I mostly use. The desktop is configured to allow SSH login using OpenSSL authentication only - no passwords.

Earlier today, I attempted to login to the desktop from the laptop and open an X application, something I frequently do when the wife is logged in and using the desktop. I wasn't able to open the session, due to the following error:


X11 connection rejected because of wrong authentication.I quickly figured out that this was because I use the encrypted filesystem, so I mounted the filesystem manually, then tried again, and still received the same error when trying to launch my app. Can anybody advise? I don't get this error if somebody is already logged in on the desktop.


me@laptop:~$ ssh -X me@desktop
Welcome to Ubuntu 11.10 (GNU/Linux 3.0.0-14-generic x86_64)

* Documentation: https://help.ubuntu.com/

6 packages can be updated.
5 updates are security updates.

Last login: Sun Jan 8 09:13:46 2012 from laptop
/usr/bin/xauth: timeout in locking authority file /home/me/.Xauthority
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

me@desktop:~$ ls
Access-Your-Private-Data.desktop README.txt
me@desktop:~$ ecryptfs-mount-private
Enter your login passphrase:
Inserted auth tok with sig [SIGNATURE] into the user session keyring

INFO: Your private directory has been mounted.
INFO: To see this change in your current shell:
cd /home/me

me@desktop:~$ cd
me@desktop:~$ ls
[Contents of my home directory]

me@desktop:~$ gedit&
[1] 5919
me@desktop:~$ X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
Cannot open display:
Run 'gedit --help' to see a full list of available command line options.

[1]+ Exit 1 gedit
me@desktop:~$ logout
Connection to desktop closed.
...I suspect that the key is in the xauth timeout and that I may need to manually run xauth. But I'm not certain with what arguments. OTOH, is there a way to force Ubuntu to automount the home filesystem? I.e., add my OpenSSL key as an "authorized" key to decrypt the filesystem?

Any help would be welcome. If there is already an answer to this, please feel free to point me in that direction.

Thanks.