Bugzilla – Bug 798
sudo not writing .Xauthority
Last modified: 2017-08-30 09:27:48 MDT
sudo running xauth list doesn't write .Xauthority even though it claims to do so: --> sudo -u metron xauth list 1356-364 xauth: creating new authority file /home/metron/.Xauthority --> ls -l /home/metron/.Xauthority ls: 0653-341 The file /home/metron/.Xauthority does not exist. Writing ordinary file works: --> sudo -u metron touch /home/metron/file --> ls -l /home/metron/file -rw-r----- 1 metron adm 0 30 Aug 14:19 /home/metron/file -->
This is not a sudo bug. Newer versions of xauth report an error when running "xauth list" if the .Xauthority file doesn't exist but the AIX version does not seem to. If you run "xauth list" on AIX without sudo you'll see the same behavior. For example on AIX 7.1 I see: -bash-4.3$ xauth list 1356-364 xauth: creating new authority file /usr/users/luser/.Xauthority -bash-4.3$ ls -l /usr/users/luser/.Xauthority ls: 0653-341 The file /usr/users/luser/.Xauthority does not exist. Basically, the AIX xauth will always report "creating new authority file" when the .Xauthority file is missing, even if it has not created it.