Vi opens automatically when i login to a unix box

When I login to a unix box using a putty session , I'm landed in a vi editor, instead of my home directory,I'm guessing instead of pointing me to my home directory, the system points me to /usr/bin/vi. As a result, everytime I log into the system I open up a vi editor and am in there. how do i overcome this problem. how do i fix it. Any help is appreciated

thanks
Ram

I'm guessing you have /usr/bin/vi as your shell instead of something normal like /bin/ksh. If you have root access you could do :sh from vi to get to a command line then edit your entry in the password file. If you don't have root you'll need an admin to fix it for you.

thank you, appreciate your time.

It could possibly be an "exec vi" in your .profile/.login/.bashrc ( depends on the shell ). It may not be the /etc/passwd entry. You might want to check your initialization file to see if that is what is dumping you into the vi session.