How the UNIX login process works
When you use
ssh to connect to the TACC machines, if you
have not placed your public key on that system (see the
ssh
manual page for details), the login processor will prompt you for your
password, for example:
login@lonestar's password:
Enter your login password and press
<RETURN>.
The system will match the password you supply with the encrypted password
stored in the password file to validate your access. If you have placed
your public key file on the supercomputer, then
sshd will
prompt you for your passphrase, as shown below:
Enter passphrase for RSA key 'login@your-workstation':
Type in the passphrase that you used when you generated your
ssh
key. Once your access has been validated, the system will present a banner
that looks similar to this:
                The University of Texas at Austin
              Advanced Computing Center for Engineering
& Science
    Academic Computing and Instructional Technology Services
             *** UNAUTHORIZED ACCESS PROHIBITED  ***
TACC staff may monitor and record user activity to detect unauthorized
access. By using this system you are consenting to such observation.
--
Assuming your authentication was successful, the login processor
will set some default environment variables (like $HOME, the
path to your home directory as given in the password file) and will spawn a
command shell for you using the name of your command shell as given
in your password file entry. When your shell launches, it will look for its
start-up files in your
$HOME directory and, if these are found, execute the commands
therein, allowing you to customize your setup as you wish. When the shell's
start-up process completes, it will prompt you for a command and you may
begin working.
Your first login session
When a new project is awarded time on a TACC supercomputer, we will create
a login for the principal investigator (PI) and inform him or her of the
password when we send notice of the award. Once the PI's login has
been initialized (see below), he or she can use the
amgr
utility to create additional logins for co-workers & other individuals
who will work on the project.
When a login is created, the
accounting system makes an entry into the system's password file
(/etc/passwd) and we seed that entry with a special shell called
the Welcome! shell (wsh).
The first time you login to the system,
wsh will walk you through a short introductory
dialogue so that you can do a number of tasks that people routinely
do when they start working on a new UNIX system, including:
- changing your initial password (a good idea)
- setting your name in the system password file (it's up to you)
- changing your login name (takes about 24 hours to take effect)
- selecting a command shell (if you're not sure which one to pick,
start with
/bin/csh; you can always change it later.)
Shell and session start-up files
Earlier, we mentioned that when a command shell begins executing, it looks
for its start-up files in your
$HOME directory. The Welcome!
shell completes its work by ensuring that your
$HOME directory
exists and that copies of the system's default shell and session start-up
files are placed into it so that your command shell will be properly
initialized whenever you login interactively or submit an NQS batch job,
as shown below:
Start-up file | System master | Function |
|
/usr/local/etc/cshrc
|
C shell run commands that are executed each time a C-style
(e.g., csh or tcsh) shell is spawned |
|
/usr/local/etc/login
|
C shell session initialization commands that are executed once at the
start of an interactive session or batch job |
|
/usr/local/etc/profile
|
Bourne shell run commands that are executed each time a Bourne-style
(e.g., sh, ksh or bash) shell is
spawned |
The system-supplied versions of the shell start-up files are nothing more
than stubs whose purpose is to source the master copies from
/usr/local/etc. However, it
is important that you not change the contents of the system-supplied
.cshrc, .login and .profile files
because we set system-wide default values for things like your shell's
command search path
($PATH), the path to the online programmer's manual pages
($MANPATH), the path to your $ARCHIVE directory,
and so forth in the master versions. If you modify the system-supplied
start-up files, you run the risk of changing things so that the start-up
procedure won't execute properly. If you wish to customize your login setup,
use your favorite text editor to create the following companion start-up files
with the exact names given below in your $HOME directory:
Start-up file | Companion file | Function |
.cshrc
|
.cshrc_user
|
Place C shell commands that you would normally put into .cshrc
into your .cshrc_user file.
|
.login
|
.login_user
|
Put your C shell session start-up commands into your
.login_user file. |
.profile
|
.profile_user
|
Place your Bourne shell start-up commands into your
.profile_user file. |
Reseeding the default start-up files
If you accidentally delete the default start-up files from your
$HOME directory, it is simple matter to reseed them. Login
to the system as normal (but remember that not much initialization will
have been done for you) and enter the following commands:
/bin/cp /usr/local/etc/cshrc $HOME/.cshrc
/bin/cp /usr/local/etc/login $HOME/.login
/bin/cp /usr/local/etc/profile $HOME/.profile
Once the files have been copied, logout and then reconnect to the system.
When you get the command prompt in the new session, check that your
environment is configured properly with the
env(1) command,
viz.:
lonestar% env
Standard command shells
The UNICOS and UNICOS/mk operating systems on the supercomputers at TACC
support two standard command shells:
/bin/csh - the C shell
-
csh is normally used for interactive work. It supports a
full-featured shell programming language and has optimized $PATH
lookup, command history & extensive job control features. csh
is stable and mature, and has been a staple of UNIX timesharing for many years.
Most TACC users use csh as their shell for interactive sessions.
Start-up files: |
$HOME/.cshrc, executed whenever csh
is spawned.
|
|
$HOME/.login, executed after .cshrc has been
processed whenever a C shell login session is initiated.
|
/bin/ksh - the Korn shell
-
ksh was originally a product of Bell Laboratories and was
initially released with System V UNIX. The Korn shell is also known as
the POSIX shell because it conforms to the POSIX 1003.2 specification for
command interpreters. ksh is a superset of the older Bourne
shell (/bin/sh), offering a full-featured shell programming
language, command history and command-line editing with excellent functionality
for scripting and subprocessing. On UNICOS and UNICOS/mk systems,
ksh and sh are one and the same and most TACC users
use ksh as the command processor for their NQS jobs.
Start-up files: |
$HOME/.profile, executed whenever ksh
is spawned.
|
Other command shells
In addition to the standard shells discussed above, we provide two
additional command shells that you can use if you so choose. Be aware
that, if you encounter bugs or other problems using them, we may not
be able to address the problem other than by reporting it to the
authors of the software.
/usr/local/bin/tcsh - an enchanced C shell
-
tcsh is an enhanced but completely compatible version of the
Berkeley C shell with command-line editing, programmable word completion
including filename completion, spelling correction and improved job history
and control mechanisms over csh.
Start-up files: |
$HOME/.cshrc, executed whenever tcsh
is spawned.
|
|
$HOME/.login, executed after .cshrc has been
processed whenever a tcsh login session is initiated.
|
/usr/local/gnu/bin/bash - the Bourne-again shell
-
bash is an sh-compatible command interpreter
from the Free Software Foundation that incorporates useful features from
the Korn and C shells. It supports full-featured scripting and shell
programming, job history and control as well as command-line editing and
programmable word completion. bash is ultimately intended
to be a faithful implementation of the POSIX standard for command interpreters.
Start-up files: |
$HOME/.bashrc, executed whenever bash
is spawned.
|
|
$HOME/.bash_profile, executed after .bashrc has been
processed whenever bash login session is initiated.
|
Complete documentation on each of these command processors is available
via the
man command on each system, e.g.,
lonestar% man tcsh
 |
 |
 |
|
|
 |
 |