Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I login server as root through ssh, I only see following message printed, but the prompt string is missing:

Last login: Wed Dec 21 08:12:26 2011 from xxx.xxx.xxx.xxx

I can type, but all command doesn't work. Only after I press ctrl-c, the prompt string shows up:

[root@xxxxxx~]#

Moreover, sftp does not work also for root. All other user on the system do not have such problem: no need ctrl-c to login, and sftp works well. Reboot doesn't solve the problem.

Anyone knows why?

share|improve this question

migrated from stackoverflow.com Dec 21 '11 at 16:21

This question came from our site for professional and enthusiast programmers.

1  
What is root's shell defined as in /etc/passwd? –  Garrett Dec 21 '11 at 16:29
add comment

1 Answer

up vote 2 down vote accepted

Check root's .login or .profile file and look to see whether it starts a program (perhaps accidentally).

For example, if root's .profile contains (note the typo)

filename=/something.txt
cat $filkname > /tmp/foo

this would cause the symptoms you describe

share|improve this answer
    
You are right. Something unexpected is in bashrc. Thanks –  user607722 Dec 23 '11 at 18:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.