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

Can't create .Xauthority for users



I'm setting up a new machine with 2.6.8-2-686 kernel on sarge. Things
seem to be working except for one thing: Users can't start the x
server (root has no problem). 

When user does startx, the nVidia splash screen appears momentarily,
but I'm thrown back to the console. The startx messages only say that
.Xauthority is being created. However, no .Xauthority shows up in the
user's home directory. 

In ~/Xsession-errors, I get: 

  Xsession: X session started for user at ...
  open: Permission denied

I assume the lack of permission is the result of their being no
.Xauthority file actually created in user's account.

/var/log/auth.log records that a session has opened for user, but no
errors are reported.

I tried

  # su - user
  $ startx
  xauth: creating new authority file /home/user/.Xauthority
  /usr/bin/X11/startx: line 132: cannot create temporary file for here 
    document: Permission denied
  X: user not authorized to run the X server, aborting
  xinit: Server error.
  xauth: creating new authority file /home/user/.Xauthority
  Couldn't get a file descriptor referring to the console

The section in /usr/bin/X11/startx:

  for displayname in $authdisplay $hostname$authdisplay; do
    if ! xauth list ""displayname" | grep "$displayname " 
        >/dev/null 2>&1; then
      xauth << EOF

Line 132 is this last line. The /etc/X11/Xsession is writable by
anyone. At this point I get in way over my head and don't see any
creation of a temporary file.

When root does on a similarly configured sarge 2.4.8 machine::

  $ xauth list
  teufel.hartford-hwp.com/unix:0  MIT-MAGIC-COOKIE-1  ...
  localhost.localdomain:0  MIT-MAGIC-COOKIE-1  ...
  hartford-hwp.com/unix:0  MIT-MAGIC-COOKIE-1 ... 
  64.227.154.66:0  MIT-MAGIC-COOKIE-1  ...
  teufel/unix:0  MIT-MAGIC-COOKIE-1  ...
  teufel.hartford-hwp.com:0  MIT-MAGIC-COOKIE-1 ...
  127.0.1.1:0  MIT-MAGIC-COOKIE-1  ... 

When root does on the targe 2.6.8 machine: 

  # xauth list  
  teufel.hartford-hwp.com:0  MIT-MAGIC-COOKIE-1 ...
  teufel/unix:0  MIT-MAGIC-COOKIE-1 ...
  192.168.1.1:0   MIT-MAGIC-COOKIE-1 ...

it is clear something is wrong with network configuration which might
affect xauth, for on an old running machine with much the same
configuration: 

  $ xauth list
  teufel.hartford-hwp.com/unix:0  MIT-MAGIC-COOKIE-1  ...
  localhost.localdomain:0  MIT-MAGIC-COOKIE-1  ...
  hartford-hwp.com/unix:0  MIT-MAGIC-COOKIE-1 ... 
  64.227.154.66:0  MIT-MAGIC-COOKIE-1  ...
  teufel/unix:0  MIT-MAGIC-COOKIE-1  ...
  teufel.hartford-hwp.com:0  MIT-MAGIC-COOKIE-1 ...
  127.0.1.1:0  MIT-MAGIC-COOKIE-1  ... 

Missing on the target machine is the loopback device and other
lines. I suspect the lack of loopback might prevent creation of the
user .Xauthority files. Is that true?

The /etc/hosts and /etc/hostname files on the two machines are the
same. A difference is that the old machine uses /etc/resolv.conf,
while the new machine uses the resolvconf utility.

A clue may come from the result of running # ifconfig -a , for there
are two ethN interfaces listed (I'm using only the MAC on my Asus A8N 
motherboard and no NIC. The two machines address a hardware
firewall). 

The eth0 interface is down, and so lacks the lines enjoyed by eth1: 

  Link encap: Ethernet HWadd... and the line
  inet addr: ...
  Interrupt:NNN Base address:NNN

In /etc/network/interfaces I must use "iface eth1 inet dhcp" because
the eth0 is down and does not support communications. 

-- 

       Haines Brown
       KB1GRM       




Reply to: