Have an experienced user look at your shell's
setup files (
There could be some obvious mistakes that you didn't catch.
Log in to another account and use the
the stuck account uses Bourne-type shells) or the
su -f stucklogin
command (if the stuck account uses
) to the home directory.
Rename the account's setup files
so the shell won't see them as you
If you can log in after that, you know that the problem is with the
account's setup files.
Set shell debugging (
From another account or as the superuser, start an editor and put
the following line at the top of an
-like setup file (like
It'll tell you whether
is being read at all and where it hangs:
You'll see each line read from the
and the commands executed
on the screen. If you don't see anything, then the shell probably didn't
C shell users should put this command at the top of
set echo verbose
Note that on many UNIX systems, the shell won't read its startup files
if the files aren't owned by you.
You might use
Look at the entry in the
for this user.
Be sure it has the correct number of fields (separated by
Also, see if there's another user with the same login name.
(If your system has the commands
your system administrator should be using them to edit and check the
They avoid many of these problems.)
Does your account use any
directories remotely mounted (by NFS) (
If the remote host or network is down, and any command in your startup
) tries to access those
directories, the shell may hang there.
To fix that problem,
to the account as explained above and take the
command or directory name out of your startup file.
Or, if this problem happens a lot, the system administrator can mount an
NFS filesystem "soft" (instead of the default, "hard") and limit the number
What looks like a "hang" might also be that you just aren't getting any output
to the terminal, for some very weird reason.
wouldn't help you.
In that case, try adding this line to the start of the
exec > /tmp/sh.out.$$ 2>&1
If the Bourne shell starts reading the
, it'll make a file in
with output from the commands and the
There's no command like that for the C shell.