Indiana University

IU Webmaster

Login Environment Issues

Command line login environment issues on Webserve and their solutions

Table of Contents


Known issues

When logging into an account on Webserve using SSH, some may notice the following issues:

  • UNIX commands (such as "ls", "cd", "more") return a "Command not found" error message.

    Reason: The login files on the previous web servers (Veritas and Champion) changed over time. For accounts that initially existed on those servers, some of the login files have paths set that are not compatible with Webserve and result in the above error.

  • You may see the following error message upon logging in:
    stty: invalid argument `new'
    Try `stty --help' for more information.
    

    Reason: Setup of login environments may be done through the use of an "stty" command in initialization files which may result in display errors, such as the one above, on differing architectures as was the case between the previous web servers (Veritas/Champion) and Webserve.

Correcting login issues

There are four options available to you should you experience the above issues when logging into your Webserve account:

  1. Run the "ezreset" utility
  2. Edit the initialization files
  3. Specify the full path of the UNIX command
  4. Change your shell

Recommendation:
Most will find the first option the best solution, particularly if you have never modified your login files (the "dot" files located in your login directory, such as .login).

Instructions on each of these options can be found below.

1. Run the "ezreset" utility

A utility named "ezreset" has been created to provide you with an automated way to correct the issues identified above.

Running the ezreset utility
Before running the command, be sure to read the "important note" below to understand how this utility will alter your login files.

To run the ezreset utility for your account on Veritas/Champion and on Webserve, you will need to connect to your account using an SSH client and type:

/usr/local/bin/ezreset
Once you run this utility, you will be able to use SSH on Webserve without receiving the error messages listed above.

Important Note:

This utility will make a backup copy of the login files prior to changing them. These backup copies have the date you ran the ezreset utility (YYYYMMDD format) appended to the file name. For example, if you ran the utility on July 1, 2008 you would see files such as: ".login.20080701" in the login directory of your account.) In the event that you experience any issues after running this utility, you can restore the original login files. To revert back to the original login files, simply copy the backups into place. Using the example file referenced above you would type:


cp .login.20080701 .login
This would copy the original file (.login.20080701) over the current login file (.login). You would do this with each of the files for which "ezreset" created a backup. If you have any questions about this, please contact IU Webmaster prior to copying any files.

2. Edit the initialization files

Care should be taken when making such edits, taking into account the differences between architecture and shells.

If you are experiencing "command not found" error messages when running UNIX commands in your account on Webserve, add the following to your path in your .chsrc and .login files:

/bin

To get rid of the 'stty' error message when logging into your account on Webserve, remove the following line from your .login and .profile files:

stty dec crt new

3. Specify the full path of the UNIX command

If you receive a "command not found" error message when running UNIX commands in your Webserve account, you can type the full path to the command. For example:

/bin/ls
/bin/cd
To find the full path of other commands, see the Knowledge Base article: In Unix, how can I find the correct path to an executable file?

This will permit you to run the Unix commands without receiving the 'command not found' error message. This method may be useful if you seldom login via SSH or you want a 'one time, quick solution'. For most accounts, though, the methods discussed above provide a more ideal solution.

4. Change your shell

You may change your shell on Webserve by logging into your account via SSH and executing the following command:

chsh -s /bin/bash 

Additional information

It is recommended that you use the default bash shell in the Webserve environment.

The reset commands are designed to accommodate tcsh and bash for former Veritas users or ksh and bash for former Champion users. No other shells are accommodated with the reset commands. If you have been using some other shell and have login environment problems, please contact IU Webmaster with the information.

Initialization files that will be copied to your directory when using the reset command include:

.bash_logout (for bash shell)
.bash_profile (for bash shell)
.bashrc (for bash shell)
.login (for tcsh shell)
.cshrc (for tcsh shell)
.profile (for bash and ksh shells)

The following is the order in which some shells read their available initialization files:

bashtcshksh
/etc/profile/etc/csh.cshrc /etc/profile
~/.bash_profile/etc/csh.login ~/.profile
~/.bash_login~/.tcshrc or ~/.cshrc  
~/.profile ~/.history 
~/.bash_logout ~/.login 
~/.bashrc (non-login shell)~/.cshdirs