Create/rebuild a new .Xauthority file


This document describes the procedure for rebuilding a /$HOME/.Xauthority file. The information in this document applies to AIX 5.1 and higher.


If you get an MIT magic cookie error when trying to gain remote access the CDE or Xdm, you may be able to solve the problem by rebuilding the .Xauthority file in the home directory of the user trying to log in.

Follow these steps to create a /$HOME/.Xauthority file.

Log in as user and confirm that you are in the user's home directory.


Rename the existing .Xauthority file by running the following command

mv .Xauthority old.Xauthority


Generate a new .Xauthority file by running the following command:

xauth generate :0 . trusted


At the command line, create a new magic-cookie key by entering the following:

randomkey=`/usr/bin/ksh -c 'echo $(( $RANDOM * $RANDOM * 2 ))'`


Add a new entry for another server by running the following command:

xauth add ${HOST}:0 . $randomkey


To view a listing of the .Xauthority file, enter the following

xauth list

Comments

Popular posts from this blog

Installing and configuring the storage agent (AIX)

Move a file system to another volume group

Xmanger does not work