LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-09-2011, 04:21 AM   #1
z99
Member
 
Registered: Aug 2009
Location: Iran-Sari
Distribution: CentOS,Fedora,Slitaz
Posts: 136

Rep: Reputation: 20
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
 
Old 06-09-2011, 04:31 AM   #2
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,362

Rep: Reputation: 135Reputation: 135
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

Last edited by divyashree; 06-09-2011 at 04:35 AM.
 
1 members found this post helpful.
Old 06-09-2011, 10:29 AM   #3
z99
Member
 
Registered: Aug 2009
Location: Iran-Sari
Distribution: CentOS,Fedora,Slitaz
Posts: 136

Original Poster
Rep: Reputation: 20
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.
 
Old 06-09-2011, 11:16 PM   #4
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,362

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by z99 View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Why does 'route' command delay before output default gw? 10110111 Linux - Networking 4 11-04-2009 09:59 AM
Executing a command from shell, but with a delay? SirTristan Linux - Newbie 6 05-15-2008 01:23 AM
bash script - I want some time delay between each command is executed bbmak Linux - Newbie 2 12-21-2007 04:35 AM
Running a command after a delay of n secs anjanesh Linux - Newbie 5 05-28-2006 06:00 PM
how-to: repeat OR iterate shell OR bash command delay OR interval admarshall Linux - General 5 07-18-2005 11:47 PM


All times are GMT -5. The time now is 08:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration