Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
su takes several seconds ?!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
xiaweitang
Apprentice
Apprentice


Joined: 26 Feb 2010
Posts: 152

PostPosted: Mon Mar 01, 2010 6:01 am    Post subject: su takes several seconds ?! Reply with quote

This is very strange. When i want to change to root user from normal user by "su", it sometimes takes several seconds before showing the new prompt! I have never seen this in using Linux.
Back to top
View user's profile Send private message
InExile
n00b
n00b


Joined: 29 Jan 2010
Posts: 13

PostPosted: Mon Mar 01, 2010 6:06 am    Post subject: Reply with quote

Do you have any external authentication configured like winbind or nis or ldap?
Back to top
View user's profile Send private message
xiaweitang
Apprentice
Apprentice


Joined: 26 Feb 2010
Posts: 152

PostPosted: Mon Mar 01, 2010 7:33 am    Post subject: Reply with quote

I don't think so. I don't even understand what are winbind or nis or ldap.
Back to top
View user's profile Send private message
patrikas
Tux's lil' helper
Tux's lil' helper


Joined: 28 Nov 2009
Posts: 106

PostPosted: Mon Mar 01, 2010 9:40 am    Post subject: Reply with quote

I have seen situations like this with huge shell startup (.bashrc, .cshrc, profile) scripts. My laptop takes more than a second with many bash completions enabled.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Mon Mar 01, 2010 12:58 pm    Post subject: Reply with quote

Certainly depend on that bug, and will be also be fix https://forums.gentoo.org/viewtopic-t-817522-highlight-.html

Sure it's the time taken to fail to resolve the dns
Back to top
View user's profile Send private message
xiaweitang
Apprentice
Apprentice


Joined: 26 Feb 2010
Posts: 152

PostPosted: Mon Mar 01, 2010 6:04 pm    Post subject: Reply with quote

I tried the suggested /etc/hosts file, but the prolem remains. Note that it's not happening always, but randomly.
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2609

PostPosted: Wed Mar 03, 2010 2:36 am    Post subject: Reply with quote

Do you also see a delay between hitting "enter" after typing your username and the password prompt appearing?
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
xiaweitang
Apprentice
Apprentice


Joined: 26 Feb 2010
Posts: 152

PostPosted: Wed Mar 03, 2010 5:50 am    Post subject: Reply with quote

NathanZachary wrote:
Do you also see a delay between hitting "enter" after typing your username and the password prompt appearing?

No, there is no delay between typing su and the password prompt.
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2609

PostPosted: Wed Mar 03, 2010 5:33 pm    Post subject: Reply with quote

Try stopping all network-related services temporarily, and then issuing the su command. For instance:

Code:

/etc/init.d/net.eth0 stop
/etc/init.d/net.wlan0 stop


and so on for your interfaces. Leaving only the loopback started, try using su to see if the delay is gone.
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
xiaweitang
Apprentice
Apprentice


Joined: 26 Feb 2010
Posts: 152

PostPosted: Wed Mar 03, 2010 7:34 pm    Post subject: Reply with quote

NathanZachary wrote:
Try stopping all network-related services temporarily, and then issuing the su command. For instance:

Code:

/etc/init.d/net.eth0 stop
/etc/init.d/net.wlan0 stop


and so on for your interfaces. Leaving only the loopback started, try using su to see if the delay is gone.


No, the delay is not gone.
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2609

PostPosted: Wed Mar 03, 2010 7:39 pm    Post subject: Reply with quote

Okay, then it is probably not anything to do with your network. Try changing your password for your root user. Just temporarily, make it something short and simple.
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
xiaweitang
Apprentice
Apprentice


Joined: 26 Feb 2010
Posts: 152

PostPosted: Wed Mar 03, 2010 7:51 pm    Post subject: Reply with quote

I changed the password to only two letters, but the problem remains.
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2609

PostPosted: Wed Mar 03, 2010 8:12 pm    Post subject: Reply with quote

I will see what else I can find about the problem, but those were the two potential reasons I knew (networking and password change).
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
xiaweitang
Apprentice
Apprentice


Joined: 26 Feb 2010
Posts: 152

PostPosted: Fri Mar 05, 2010 7:13 pm    Post subject: Reply with quote

It seems the delay only happens in X, not in console.
Back to top
View user's profile Send private message
xiaweitang
Apprentice
Apprentice


Joined: 26 Feb 2010
Posts: 152

PostPosted: Fri Mar 19, 2010 3:56 pm    Post subject: Reply with quote

I'm almost sure the problem only happens when firefox is running.
Back to top
View user's profile Send private message
Raptor85
Apprentice
Apprentice


Joined: 29 Dec 2007
Posts: 208

PostPosted: Fri Mar 19, 2010 7:15 pm    Post subject: Reply with quote

Have you had flash running in firefox at times when this is happening? I've seen flash eat up tons of resources bogging the entire system, causing delays like this, even when all the tabs no longer have it actively running. Try running "top" while this is happening and look at memory usage/cpu usage.
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Fri Mar 19, 2010 9:34 pm    Post subject: Reply with quote

Try running the command:
Code:
pwconv

Maybe it can help. See: man pwconv for details.
Back to top
View user's profile Send private message
xiaweitang
Apprentice
Apprentice


Joined: 26 Feb 2010
Posts: 152

PostPosted: Sat Apr 03, 2010 4:39 am    Post subject: Reply with quote

Mike Hunt wrote:
Try running the command:
Code:
pwconv

Maybe it can help. See: man pwconv for details.

No, this doesn't help.
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Sat Apr 03, 2010 1:09 pm    Post subject: Reply with quote

Try this:
  • logout your X session to a console
  • run:
    Code:
    :> ~/.Xauthority

  • login your X session


and post the output of this please:
Code:
id <username>
Back to top
View user's profile Send private message
Deathwing00
Bodhisattva
Bodhisattva


Joined: 13 Jun 2003
Posts: 4087
Location: Dresden, Germany

PostPosted: Wed Apr 07, 2010 8:57 am    Post subject: Reply with quote

Moved from Installing Gentoo to Networking & Security.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum