| UM SPH Home > SPH Informatics & Computing Services > Technical Guides & FAQs > UNIX Logins, Environment Variables and AFS Tips > The Login Process for SPH Solaris 2.5.1 Machines |
Classroom Services & Room Scheduling Unit E-Learning & Instructional Technology Related Sites Accessibility Statement. Privacy Statement.
|
The Login Process for SPH Solaris 2.5.1 MachinesStages of the login process
Processing of standard login files
Which of these files can the user customize?
What to do if a customization prevents a successful login
Figure 1: /afs/sph.umich.edu/common/skel/sys.cshrcThe file listed below has been edited from the version installed at SPH.
#!/bin/csh
#
# System-wide .cshrc file
# Path guidelines:
# - afs path up front
# - local dirs near front
# - X11 near back, openwin at very back
# - /usr/ucb, /usr/ccs near back
# - prefer MANPATH here rather than .login because xterms may not have
# login shells -- JDA 950629
# - Our Keysymdb is modified for SPH to work with SAS and so is
# pointed to here
set path=($path /usr/local/bin)
set os=`uname`
set osversion=`uname -r`
if ($os == ULTRIX-32) set os=ULTRIX
if ($os == SunOS && $osversion == 5.5) set os=SOLARIS
if ($os == SunOS && $osversion == 5.5.1) set os=SOLARIS
umask 022
set history = 40
set savehist = 40
# unset savehist # Disable .history creation
set filec
### The command search path must be different for different platforms
### Sun SunOS 4.1.x
if ( $os == SunOS ) then
set path=(/usr/local/bin /usr/afsws/bin /usr/afs/bin \
/usr/sph/bin /usr/sph/X11R5/bin /usr/ucb \
/bin /usr/bin /usr/etc /etc /usr/sph/bmdp/bin \
/usr/sph/wp60/wpbin .)
setenv LD_LIBRARY_PATH /usr/lib:/usr/sph/f77/SC1.0:/usr/sph/nag/nagfl15df:/usr/sph/X11R5/lib:/usr/sph/lib:/usr/openwin/lib
setenv OPENWINHOME /usr/openwin
setenv TERMINFO /usr/share/lib/terminfo
if ($?prompt) then
setenv MANPATH /usr/sph/man:/usr/sph/generic/man:/usr/man:/usr/openwin/man:/usr/sph/X11/man:/usr/share/man
setenv XKEYSYMDB /usr/sph/lib/XKeysymDB
stty erase ^H
endif
### Sun Solaris 2.5.1
else if ( $os == SOLARIS ) then
set path=(/usr/local/bin /usr/sph/bin /usr/bin /usr/afs/bin \
/usr/sph/devpro_v5n1/SUNWspro/bin /usr/ucb /usr/openwin/bin \
/usr/sph/X11/bin /usr/ccs/bin /usr/sbin .)
setenv LD_LIBRARY_PATH /usr/lib:/usr/sph/X11/lib:/usr/sph/lib:/usr/dt/lib:/usr/sph/devpro_v5n1/SUNWspro/lib
if ( -d /usr/openwin/bin ) then
# set path=($path /usr/openwin/bin)
setenv OPENWINHOME /usr/openwin
setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:/usr/openwin/lib"
else
set path=($path /usr/sph/openwin/bin)
setenv OPENWINHOME /usr/sph/openwin
setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:/usr/sph/openwin/lib"
endif
alias ps 'ps -o ruser,pid,pcpu,pmem,osz,vsz,nice,s,stime,time,args'
if ($?prompt) then
setenv MANPATH /usr/sph/man:/usr/share/man:/usr/openwin/man
setenv XKEYSYMDB /usr/sph/lib/XKeysymDB
stty erase ^H
endif
setenv GR_HOME /usr/sph/xmgr-412
endif
### Set path for user's bin directory if they have one (except for root)
if ( ( -d ~/bin ) && ( ~/bin != //bin ) ) then
set path=(~/bin $path)
endif
### Set system-wide shell variables
if ($?prompt) then
set notify history=50 prompt="`/bin/hostname | sed 's/\..*//'`% "
unset autologout
setenv NNTPSERVER news.itd.umich.edu
setenv SHOME /usr/sph/splus-3.4
setenv WWW_HOME http://www.sph.umich.edu/
# From Gebert (no good here unless modified):
#setenv %D:/usr/X11R6/lib/X11/%T/%N%S:/usr/local/lib/X11/%T/%N%S
# Set NLS dir for netscape and backward compatability with R5 apps
setenv XNLSPATH /usr/sph/X11/lib/X11/nls
setenv XLOCALEDIR /usr/sph/X11/lib/X11/locale
# Set system-wide command aliases
alias rm rm -i
alias mv mv -i
alias cp cp -i
alias j jobs
alias h history
#alias ls ls -F
alias cd 'cd \!*;echo $cwd'
### Jeff's "gotta-have" aliases
if ( $os == SunOS ) then
alias psg 'ps -augwx | egrep '
else
alias psg 'ps -ef | egrep '
endif
alias dir ls -alg
alias catmac "tr '\015' '\012' <"
alias catdos "tr -d '\015' <"
alias ud 'telnet totalrecall.rs.itd.umich.edu 9501'
if ( $os == SOLARIS ) then
setenv TEXMF /usr/sph/tetex/texmf
endif
endif
Figure 2: ~/.cshrc
#!/bin/csh
###############################################################################
# This section determines which campus organization has configured the system.
if ( -e /usr/vice/etc/ThisCell ) then
set OURCELL=`cat /usr/vice/etc/ThisCell`
else
set OURCELL=sph.umich.edu
endif
# The next section sources a system-wide setup file.
# REMOVE THIS ONLY "AT YOUR OWN RISK!"
if ($OURCELL == "sph.umich.edu") then
source /afs/sph.umich.edu/common/skel/sys.cshrc
else
source /afs/umich.edu/group/generic/defaults/sys.cshrc
endif
###############################################################################
# ADD YOUR OWN CUSTOMIZATIONS HERE:
#
setenv BMDP_DIR /usr/sph/bmdp
Figure 3: /afs/sph.umich.edu/common/skel/sys.loginThe file listed below has been edited from the version installed at SPH.
# System-wide .login file
#
# Original version created by vishy, 31 Oct 1994.
# Modified regularly since then.
### Set a vendor/os identifier
set os=`uname`
set osversion=`uname -r`
if ($os == ULTRIX-32) set os=ULTRIX
if ($os == SunOS && $osversion == 5.5) set os=SOLARIS
if ($os == SunOS && $osversion == 5.5.1) set os=SOLARIS
### Set up terminal
if ( $?DMLOGIN ) then
set term=apollo
else
if ( ! $?term ) set term
endif
set noglob ; eval `tset -I -Q -s` ; unset noglob
# Carry out login-time tasks
if ( $?prompt ) then
set host=`hostname | awk -F"." '{print $1}'`
if ( -f /afs/sph.umich.edu/common/announce/daily.mesg ) then
/bin/cat /afs/sph.umich.edu/common/announce/daily.mesg
endif
(/usr/afs/bin/tokens | grep Expires | grep sph.umich.edu >&/dev/null)
if ($status && ($os != DomainOS)) then
cat <<EOF
*******************************************************************************
You are not currently authenticated to AFS. Many commands and applications
will not operate correctly unless you perform an AFS authentication using the
"kinit" and "aklog" commands.
*******************************************************************************
EOF
endif
endif
Figure 4: ~/.login
#!/bin/csh
###############################################################################
# This section determines which campus organization configured the system.
if ( -e /usr/vice/etc/ThisCell ) then
set OURCELL=`cat /usr/vice/etc/ThisCell`
else
set OURCELL=sph.umich.edu
endif
# The next section sources a system-wide setup file.
# REMOVE THIS ONLY "AT YOUR OWN RISK!"
if ($OURCELL == "sph.umich.edu") then
source /afs/sph.umich.edu/common/skel/sys.login
else
source /afs/umich.edu/group/generic/defaults/sys.login
endif
###############################################################################
# ADD YOUR OWN CUSTOMIZATIONS HERE:
Figure 5: /afs/sph.umich.edu/system/skel/sys.xsessionThe file listed below has been edited from the version installed at SPH.
#!/bin/csh
#
# System .xsession file used by X-windows
#
# ****WARNING****
# This file, as is, will not stand alone because it merely sets the STOP_HERE
# variable and does not execute it. If you wish to copy this file to
# ~/.xsession for modification, you must either place $STOP_HERE at the end,
# or actually exec a program instead of setting the STOP_HERE variable.
# ***************
set OS=`uname`
set osversion=`uname -r`
if ($OS == SunOS && $osversion == 5.5) set OS=SOLARIS
if ($OS == SunOS && $osversion == 5.5.1) set OS=SOLARIS
if (-f /afs/sph.umich.edu/common/skel/sys.common) source /afs/sph.umich.edu/common/skel/sys.common
if ( $OS == SOLARIS ) then
set MWM="/usr/sph/X11/bin/mwm"
set TWM="/usr/contrib/bin/X11/twm"
set WM=$MWM
set XTERM="/usr/openwin/bin/xterm"
set XCONSOLE="/usr/openwin/bin/xconsole"
set XCLOCK="/usr/openwin/bin/xclock"
set XSETROOT="/usr/openwin/bin/xsetroot"
else if ( $OS == SunOS ) then
set MWM="/usr/sph/X11R5/bin/mwm"
set TWM="/usr/sph/X11R5/bin/twm"
set WM=$MWM
set XTERM="/usr/sph/X11/bin/xterm"
set XCONSOLE="/usr/sph/X11R5/bin/xconsole"
set XCLOCK="/usr/sph/X11R5/bin/xclock"
set XSETROOT="/usr/sph/X11R5/bin/xsetroot"
else
set MWM="/usr/bin/X11/mwm"
set TWM="/usr/bin/X11/twm"
set WM=$MWM
set XTERM="/usr/bin/X11/xterm"
set XCONSOLE="/usr/bin/X11/xconsole"
set XCLOCK="/usr/bin/X11/xclock"
set XSETROOT="/usr/bin/X11/xsetroot"
endif
set XCONSOLE_OPTIONS="-exitOnFail"
set STOP_HERE="exec /usr/sph/X11/bin/xlogout -geometry +0+0 -iconic"
# Turn off key click
xset -c
xhost +`hostname`
#
# Should only have machine dependencies in switch
#
switch ($OS)
case SunOS:
xmodmap -e "keysym F19 = Find"
xmodmap -e "keycode 27 = Up"
xmodmap -e "keycode 31 = Left"
xmodmap -e "keycode 34 = Down"
xmodmap -e "keycode 35 = Right"
xmodmap -e "keycode 130 = F35"
xmodmap -e "keycode 103 = F29"
xmodmap -e "keycode 59 = F27"
# xmodmap -e "keycode 81 = R13"
echo "Xterm*ttyModes: erase ^?" | xrdb -merge
# xmodmap ~/.xmodmaprc
breaksw
case SOLARIS:
xmodmap -e "keysym F19 = Find"
xmodmap -e "keycode 130 = F35"
xmodmap -e "keycode 103 = F29"
xmodmap -e "keycode 59 = F27"
echo "Xterm*ttyModes: erase ^?" | xrdb -merge
breaksw
default:
set WM=$MWM
breaksw
endsw
#
# This loads .Xresources file in home dir and any of the SPH Resources
#
/usr/sph/X11/bin/loadxres
#
# Now start up the standard clients. It is possible to keep particular clients
# from starting by setting an environmental variable in your own .xsession
# file. For example if you didn't want xclock to come up then just put the
# following line into your .xsession file:
#
# setenv NO_XCLOCK 1
#
# Note1: Don't include the "#".
# Note2: This line must come before the following line:
#
# source /usr/local/skel/sys.xsession
#
if (! $?NO_XCONSOLE && -f $XCONSOLE) then
if ($?XCONSOLE_OPTIONS) then
$XCONSOLE $XCONSOLE_OPTIONS -iconic &
else
$XCONSOLE -iconic &
endif
endif
if (! $?NO_XSETROOT && -f $XSETROOT) then
$XSETROOT -solid dimgrey
endif
if (! $?NO_WM && -f $WM) then
# $WM >& /dev/console &
$WM &
endif
if (! $?NO_XTERM && -f $XTERM) then
$XTERM -ls -n $NODENAME -geometry 80x24+40+50 &
endif
if (! $?NO_XCLOCK && -f $XCLOCK) then
$XCLOCK -geometry 108x113-0+0 &
endif
Figure 6: ~/.xsession#!/bin/csh # ----------------------------------------------------------------------------- # The following line (beginning with the word "source") causes all of the # standard CAEN applications (xclock, xman, etc.) to be started. If you take # it out, you will no longer get the standard CAEN login environment on CAEN's # X workstations. However, you may wish to do so anyway in order to customize # your login. Do this at your own risk. If you *do* remove it, make sure that # you either set the STOP_HERE variable to something which will not terminate, # or replace the last line of this script to do something that won't terminate. # An example of setting the STOP_HERE variable might be: # # set STOP_HERE="exec xterm -C -T Console -n Console -iconic" # # When this script terminates, you will be logged out. The STOP_HERE variable # is used to prevent the script from terminating. # ----------------------------------------------------------------------------- source /afs/sph.umich.edu/common/skel/sys.xsession # ----------------------------------------------------------------------------- # Place any additions to the standard login sequence here, below this line, # and above the next set of comments. # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # The following line (which says "$STOP_HERE") must be left here in order for # you to remain logged in during your session. The "source" line at the top of # this file defines STOP_HERE as a command which will keep you logged in. # ----------------------------------------------------------------------------- $STOP_HERE |