LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Delay Problem With SU command (https://www.linuxquestions.org/questions/linux-newbie-8/delay-problem-with-su-command-885354/)

z99 06-09-2011 03:21 AM

Delay Problem With SU command
 
hi every one,
when i run the su command it takes more time than usual,
someone else suggest to edit /etc/hosts file , [as i changed my host name to Fedora during the installation of fedora 15] and add the host name to the end of the 2 lines,
i did that:
Code:

[root@Fedora etc]# cat hosts
127.0.0.1  localhost localhost.localdomain localhost4localhost4.localdomain4 Fedora
::1        localhost localhost.localdomain localhost6 localhost6.localdomain6 Fedora

but the su command still runs with delay,
will changing the host name to fedora's default,solve the problem?
what else could cause this problem?
thanks in advance

divyashree 06-09-2011 03:31 AM

You can try by changing the hostname to fedora's default hostname.

I think this problem may be related to pam_xauth , which is responsible for authentication for su with keys.

Create a .xauth/export in your ~ and lets check.

run this :
Quote:

man pam_xauth

z99 06-09-2011 09:29 AM

thank you divyashree,i just create a file called .xauth in my home directory and this solve the problem.
reason for delay [got it from somewhere else]:
Quote:

In short: by default, x-windows authentication tokens are only passed from
user to root (and not from root to user). After a couple of "su's", your
x-authentication token is lost and pam_xauth searches 15 secs trying to
find one.

divyashree 06-09-2011 10:16 PM

Quote:

Originally Posted by z99 (Post 4380995)
thank you divyashree,i just create a file called .xauth in my home directory and this solve the problem.
reason for delay [got it from somewhere else]:


Yes, it may take a delay upto 15 seconds, if the xauth key is not found.


All times are GMT -5. The time now is 09:12 PM.