<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic user profiles and shell environments in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166638#M896715</link>
    <description>What are some of the ways to customize the (posix) shell environment in /etc/profile, ~/.profile, ~/.kshrc, ... ?&lt;BR /&gt;&lt;BR /&gt;As a small example of what I'd like to see, the HP manual "Shells: User's Guide", Chapter 23, gives the following interesting code:&lt;BR /&gt;&lt;BR /&gt;EXPORT ENV='${FILE[(_$-=1)+(_=0)-(_$-!=_${-%%*i*})]}'&lt;BR /&gt;export FILE=$HOME/.envfile&lt;BR /&gt;&lt;BR /&gt;which cuases the $HOME/.kshrc to be executed, unless you are in an interactive shell.&lt;BR /&gt;&lt;BR /&gt;If you have other examples that you've found useful for your environment, even if it's just setting up your TERM variable, please share them here.  Thanks,&lt;BR /&gt;&lt;BR /&gt;Mladen&lt;BR /&gt;</description>
    <pubDate>Fri, 16 Jan 2004 15:04:34 GMT</pubDate>
    <dc:creator>Mladen Despic</dc:creator>
    <dc:date>2004-01-16T15:04:34Z</dc:date>
    <item>
      <title>user profiles and shell environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166638#M896715</link>
      <description>What are some of the ways to customize the (posix) shell environment in /etc/profile, ~/.profile, ~/.kshrc, ... ?&lt;BR /&gt;&lt;BR /&gt;As a small example of what I'd like to see, the HP manual "Shells: User's Guide", Chapter 23, gives the following interesting code:&lt;BR /&gt;&lt;BR /&gt;EXPORT ENV='${FILE[(_$-=1)+(_=0)-(_$-!=_${-%%*i*})]}'&lt;BR /&gt;export FILE=$HOME/.envfile&lt;BR /&gt;&lt;BR /&gt;which cuases the $HOME/.kshrc to be executed, unless you are in an interactive shell.&lt;BR /&gt;&lt;BR /&gt;If you have other examples that you've found useful for your environment, even if it's just setting up your TERM variable, please share them here.  Thanks,&lt;BR /&gt;&lt;BR /&gt;Mladen&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Jan 2004 15:04:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166638#M896715</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2004-01-16T15:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: user profiles and shell environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166639#M896716</link>
      <description>These are in /etc/profile for all users - &lt;BR /&gt;How about checking for mail:&lt;BR /&gt;&lt;BR /&gt; # Notify if there is mail&lt;BR /&gt;&lt;BR /&gt;        if [ -f /usr/bin/mail ]&lt;BR /&gt;        then&lt;BR /&gt;                if mail -e&lt;BR /&gt;                then    echo "You have mail."&lt;BR /&gt;                fi&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;or for a really nice prompt with system name, working directory and who you are logged on as:&lt;BR /&gt;&lt;BR /&gt;export SYSNAME=`uname -n`&lt;BR /&gt;export PS1='${SYSNAME}:[ ${PWD} ]&lt;BR /&gt;${LOGNAME}&amp;gt; '&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Jan 2004 15:10:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166639#M896716</guid>
      <dc:creator>John Dvorchak</dc:creator>
      <dc:date>2004-01-16T15:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: user profiles and shell environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166640#M896717</link>
      <description>I use these options for anyone who logs in as root... creates history and .sh_user for each root user based upon their username...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# sets .sh_hist file to id of user&lt;BR /&gt;&lt;BR /&gt;if [ "`tty`" = "/dev/console" ]&lt;BR /&gt;then&lt;BR /&gt;        REAL=console&lt;BR /&gt;else&lt;BR /&gt;        REAL=`logname`&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;HISTFILE=$HOME/.sh_$REAL&lt;BR /&gt;export HISTFILE&lt;BR /&gt;HISTSIZE=1000; export HISTSIZE&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I also have a few aliases...&lt;BR /&gt;&lt;BR /&gt;# list of my aliases&lt;BR /&gt;alias dir='ls -la'&lt;BR /&gt;alias lt='ls -lt'&lt;BR /&gt;alias lrt='ls -lrt'&lt;BR /&gt;alias pp='ps -aef|grep'&lt;BR /&gt;alias lsfg='lsf |grep '\/''&lt;BR /&gt;alias tops='top -h -s 1'&lt;BR /&gt;alias ls='ls -l'&lt;BR /&gt;alias bpps='/opt/openv/netbackup/bin/bpps -a'&lt;BR /&gt;&lt;BR /&gt;##My users' prompt is as follows:&lt;BR /&gt;&lt;BR /&gt;export PS1="`hostname`:/\${PWD#*}&amp;gt; "</description>
      <pubDate>Fri, 16 Jan 2004 15:17:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166640#M896717</guid>
      <dc:creator>Todd McDaniel_1</dc:creator>
      <dc:date>2004-01-16T15:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: user profiles and shell environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166641#M896718</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;How abount a little ascii ART before you startup:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.chris.com/ascii/" target="_blank"&gt;http://www.chris.com/ascii/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.ascii-art.de/" target="_blank"&gt;http://www.ascii-art.de/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.arkworld.com/ascii/" target="_blank"&gt;http://www.arkworld.com/ascii/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Gideon</description>
      <pubDate>Fri, 16 Jan 2004 15:33:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166641#M896718</guid>
      <dc:creator>G. Vrijhoeven</dc:creator>
      <dc:date>2004-01-16T15:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: user profiles and shell environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166642#M896719</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;How about a little ascii ART before you startup:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.chris.com/ascii/" target="_blank"&gt;http://www.chris.com/ascii/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.ascii-art.de/" target="_blank"&gt;http://www.ascii-art.de/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.arkworld.com/ascii/" target="_blank"&gt;http://www.arkworld.com/ascii/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Gideon</description>
      <pubDate>Fri, 16 Jan 2004 15:33:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166642#M896719</guid>
      <dc:creator>G. Vrijhoeven</dc:creator>
      <dc:date>2004-01-16T15:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: user profiles and shell environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166643#M896720</link>
      <description>Hi Mladen,&lt;BR /&gt;&lt;BR /&gt;One of the things I did is to manipulate /etc/profile (and /etc/csh.login) not to allow certain users to login to the box. Write a bit of code that reads a file and compares it again $LOGNAME and exits if it matches.&lt;BR /&gt;&lt;BR /&gt;Other thing is to set a "readonly" TMOUT value like export TMOUT=20;readonly TMOUT&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Fri, 16 Jan 2004 15:35:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166643#M896720</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2004-01-16T15:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: user profiles and shell environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166644#M896721</link>
      <description>Actually, I have a TMOUT variable I use...&lt;BR /&gt;&lt;BR /&gt; if [ "$TMOUT" != 7200 ]&lt;BR /&gt;  then&lt;BR /&gt;    if [ $LOGNAME = "&lt;ORACLE user=""&gt;" ]&lt;BR /&gt;      then&lt;BR /&gt;      TMOUT=999999; export TMOUT; readonly TMOUT&lt;BR /&gt;      else&lt;BR /&gt;      TMOUT=7200; readonly TMOUT; export TMOUT&lt;BR /&gt;    fi&lt;BR /&gt;  fi&lt;/ORACLE&gt;</description>
      <pubDate>Fri, 16 Jan 2004 15:55:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166644#M896721</guid>
      <dc:creator>Todd McDaniel_1</dc:creator>
      <dc:date>2004-01-16T15:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: user profiles and shell environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166645#M896722</link>
      <description>We have multiple admins with root access - a neat thing we do is setup a separate .sh_history for each of us:&lt;BR /&gt;&lt;BR /&gt;# Setup logging&lt;BR /&gt;        HISTFILE=${HOME}/.sh_history_`who am i|awk '{ print $1 }'`&lt;BR /&gt;        date &amp;gt;&amp;gt;$HISTFILE&lt;BR /&gt;        export HISTFILE&lt;BR /&gt;        HISTSIZE=500&lt;BR /&gt;        export HISTSIZE&lt;BR /&gt;&lt;BR /&gt;        echo "WARNING:  YOU ARE SUPERUSER !!\n"&lt;BR /&gt;&lt;BR /&gt;HOST=`uname -n`&lt;BR /&gt;PS1="\$HOST:\$LOGNAME:\$PWD # ";export PS1&lt;BR /&gt;stty erase ^H&lt;BR /&gt;set -o vi&lt;BR /&gt;&lt;BR /&gt;So, when I su to root, all my commands go into:&lt;BR /&gt;&lt;BR /&gt;.sh_history_gwild&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Fri, 16 Jan 2004 16:01:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166645#M896722</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-01-16T16:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: user profiles and shell environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166646#M896723</link>
      <description>here is a few examples of things that can be done</description>
      <pubDate>Fri, 16 Jan 2004 17:50:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166646#M896723</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2004-01-16T17:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: user profiles and shell environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166647#M896724</link>
      <description>these are just text files, but i can only attach one at a time</description>
      <pubDate>Fri, 16 Jan 2004 17:52:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166647#M896724</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2004-01-16T17:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: user profiles and shell environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166648#M896725</link>
      <description>this is for the root user, attached is for a non root user&lt;BR /&gt;&lt;BR /&gt;################################################################################&lt;BR /&gt;# &lt;BR /&gt;# File:   root's .profile &lt;BR /&gt;#&lt;BR /&gt;# If the variable SECURITY is /sbin/true then &lt;BR /&gt;# login security information will be shown.&lt;BR /&gt;#&lt;BR /&gt;################################################################################&lt;BR /&gt;# set -x&lt;BR /&gt;  SECURITY=/sbin/false&lt;BR /&gt;&lt;BR /&gt;  set -u&lt;BR /&gt;&lt;BR /&gt;# Just for root&lt;BR /&gt;&lt;BR /&gt;  PATH=$PATH:/sbin&lt;BR /&gt;  PATH=$PATH:/usr/sbin&lt;BR /&gt;  PATH=$PATH:$HOME/bin&lt;BR /&gt;&lt;BR /&gt;# Perform this next stuff only if we are interactive&lt;BR /&gt;&lt;BR /&gt;  if $INTERACTIVESHELL&lt;BR /&gt;  then&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;# If using VUE or CDE, set the appropriate TERM type to use for&lt;BR /&gt;# our default prompt (and then unset TERM after)...&lt;BR /&gt;#&lt;BR /&gt;    set +u&lt;BR /&gt;    if [ "$VUE" ]&lt;BR /&gt;    then&lt;BR /&gt;       TERM=hpterm&lt;BR /&gt;    elif [ "$DT" ]&lt;BR /&gt;    then&lt;BR /&gt;       TERM=dtterm&lt;BR /&gt;    fi&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;# End of interactive tty-based settings&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;# To avoid improper environment inheritance, unset TERM if currently&lt;BR /&gt;# logging in to VUE or CDE...&lt;BR /&gt;#&lt;BR /&gt;   if [ "$VUE" -o "$DT" ]&lt;BR /&gt;   then&lt;BR /&gt;      unset TERM&lt;BR /&gt;   fi&lt;BR /&gt;&lt;BR /&gt;# You don't want to do this with CDE or other X session managers, most&lt;BR /&gt;# effectively do it for you, and doing it unconditionally can cause trouble...&lt;BR /&gt;&lt;BR /&gt;  if [ ! "$DT" -a ! "$SESSIONTYPE" ]&lt;BR /&gt;  then&lt;BR /&gt;     XENVIRONMENT=$HOME/.Xdefaults&lt;BR /&gt;     export XENVIRONMENT&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;# Track down the incoming $DISPLAY device (if necessary and possible)&lt;BR /&gt;# There might not be a controlling tty device (found in /etc/profile)&lt;BR /&gt;# so handle a batch startup condition too.&lt;BR /&gt;#&lt;BR /&gt;  if [ ! "$DISPLAY" -a ! "$REMOTEHOST" ]&lt;BR /&gt;  then&lt;BR /&gt;     if $TTYDEVICE&lt;BR /&gt;     then&lt;BR /&gt;        DISPLAYHOST=$(who -muR | awk '{print $NF}')&lt;BR /&gt;        DISPLAYHOST=${DISPLAYHOST%%:0.0}&lt;BR /&gt;        DISPLAY=$DISPLAYHOST:0.0&lt;BR /&gt;        echo&lt;BR /&gt;        echo "TERM=$TERM, DISPLAY=$DISPLAY"&lt;BR /&gt;     fi&lt;BR /&gt;   else&lt;BR /&gt;     if [ ! "$DISPLAY" ]&lt;BR /&gt;     then&lt;BR /&gt; DISPLAY=$REMOTEHOST:0.0&lt;BR /&gt;     fi&lt;BR /&gt;   fi&lt;BR /&gt;   if [ "$DISPLAY" ]&lt;BR /&gt;   then&lt;BR /&gt;     export DISPLAY&lt;BR /&gt;   fi&lt;BR /&gt;&lt;BR /&gt;  set -u&lt;BR /&gt;# Set up shell environment:&lt;BR /&gt;&lt;BR /&gt;  MAIL=/var/mail/$(whoami)&lt;BR /&gt;  EDITOR=/usr/bin/vi&lt;BR /&gt;  HISTSIZE=200&lt;BR /&gt;  HISTFILE=$HOME/.sh_history&lt;BR /&gt;  export MAIL EDITOR HISTSIZE HISTFILE&lt;BR /&gt;&lt;BR /&gt;# Setup a default printer (must customize as required)&lt;BR /&gt;&lt;BR /&gt;  export LPDEST=LPDESTisNOTset&lt;BR /&gt;&lt;BR /&gt;# Set root's shell to always timeout so forgotten logins will go away&lt;BR /&gt;&lt;BR /&gt;  readonly export TMOUT=3600&lt;BR /&gt;&lt;BR /&gt;# If interactive, setup some standard things&lt;BR /&gt;&lt;BR /&gt;  if $INTERACTIVESHELL&lt;BR /&gt;  then&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;# Single char aliases&lt;BR /&gt;#&lt;BR /&gt;    alias h='fc -l'&lt;BR /&gt;    alias m='more -e'&lt;BR /&gt;    alias n=nslookup&lt;BR /&gt;    alias c="tput khome;tput clear"&lt;BR /&gt;    alias e=expand_alias&lt;BR /&gt;    alias f='fnlookup -o'&lt;BR /&gt;&lt;BR /&gt;# Other quickies&lt;BR /&gt;&lt;BR /&gt;    alias lp='lp -onb'&lt;BR /&gt;    alias hgrep='fc -l 1 | grep'&lt;BR /&gt;    alias ls='/usr/bin/ls -aF'&lt;BR /&gt;    alias ll='/usr/bin/ll -aF'&lt;BR /&gt;    alias gpm='nohup /opt/perf/bin/gpm -sharedclr -nosave -bg navy -fg white &amp;gt; /dev/null &amp;amp; &amp;gt;&lt;BR /&gt;/dev/null'&lt;BR /&gt;&lt;BR /&gt;# Safety aliases&lt;BR /&gt;&lt;BR /&gt;    alias mv='/usr/bin/mv -i'&lt;BR /&gt;    alias cp='/usr/bin/cp -i'&lt;BR /&gt;    alias rm='/usr/bin/rm -i'&lt;BR /&gt;&lt;BR /&gt;# Character-mode versions for sam and swinstall&lt;BR /&gt;&lt;BR /&gt;    alias samc="(unset DISPLAY;sam)"&lt;BR /&gt;    alias swinstallc="(unset DISPLAY;swinstall)"&lt;BR /&gt;    alias cx="chmod u=+x,g=+x,o=+x"&lt;BR /&gt;    alias xjdm="/opt/hpnp/bin/xjdm -bg SlateBlue -fg white"&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;# Useful shell setups &lt;BR /&gt;# &lt;BR /&gt;# -o vi        = vi mode for command history &lt;BR /&gt;# -o viraw     = raw character-by-character processing in vi mode&lt;BR /&gt;# -o ignoreeof = Do not exit from the shell on end-of-file&lt;BR /&gt;# -o markdirs  = Append a trailing / to all directory name generation&lt;BR /&gt;# -o monitor   = An interactive shell associates a job with each pipeline.&lt;BR /&gt;&lt;BR /&gt;    set -o vi -o viraw set -o ignoreeof -o markdirs -o monitor&lt;BR /&gt;&lt;BR /&gt;# Terminal character enhancements&lt;BR /&gt;&lt;BR /&gt;    HV=$(/usr/bin/tput smso)&lt;BR /&gt;    IV=$(/usr/bin/tput bold)&lt;BR /&gt;    NV=$(/usr/bin/tput rmso)&lt;BR /&gt;    UL=$(/usr/bin/tput smul)&lt;BR /&gt;    EE=$(/usr/bin/tput sgr0)&lt;BR /&gt;&lt;BR /&gt;#  Setup the prompt string $PS1&lt;BR /&gt;&lt;BR /&gt;    if [ "$LOGNAME" = "root" ]&lt;BR /&gt;    then&lt;BR /&gt;       SUFFIX="#"&lt;BR /&gt;    else&lt;BR /&gt;       SUFFIX="$" &lt;BR /&gt;    fi &lt;BR /&gt;&lt;BR /&gt;    HN=$(/usr/bin/hostname)&lt;BR /&gt;    PS1='${HV}${HN} ${IV}${PWD##${PWD%/*/*}/}${EE} ${SUFFIX} '&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;# Else, just set a simple $PS1 in case it's needed&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;  else&lt;BR /&gt;    PS1='${HN}: ${PWD##${PWD%/*/*}/} ${SUFFIX} '&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;# For root users, show who else mught be logged on as root too&lt;BR /&gt;&lt;BR /&gt;  ROOTERS=$(who -R | grep root | wc -l)&lt;BR /&gt;  if [ $ROOTERS -gt 1 ]&lt;BR /&gt;  then&lt;BR /&gt;      echo&lt;BR /&gt;      echo "${HV}Note: ${IV} $ROOTERS root users currently logged in${EE}"&lt;BR /&gt;      echo "----------------------------------------"&lt;BR /&gt;      who -R | grep root&lt;BR /&gt;      echo&lt;BR /&gt;      echo "${HV}                                                 ${EE}"&lt;BR /&gt;      echo "${HV}   ${IV}    Be sure to coordinate root efforts    ${NV}${HV}    ${EE}"&lt;BR /&gt;      echo "${HV}                                                 ${EE}"&lt;BR /&gt;      echo&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;# Security information for user to review&lt;BR /&gt;# If NOSECURITY exists, bypass these lists&lt;BR /&gt;&lt;BR /&gt;  if $SECURITY &lt;BR /&gt;  then&lt;BR /&gt;     echo "\n${UL}\t\t\t\tSecurity information\t\t\t\t${EE}"&lt;BR /&gt;&lt;BR /&gt;# $NUM is the number of bad logins, good logins and su attempts to list&lt;BR /&gt;&lt;BR /&gt;     NUM=5&lt;BR /&gt;     MYUSERID=$(/usr/bin/whoami)&lt;BR /&gt;&lt;BR /&gt;# Bad logins&lt;BR /&gt;&lt;BR /&gt;     if [ -r /var/adm/btmp ]&lt;BR /&gt;     then&lt;BR /&gt;        echo "\n${UL}Last $NUM FAILED $MYUSERID logins:${EE} (lastb -R -$NUM $MYUSERID)"&lt;BR /&gt;        /usr/bin/lastb -R -5 $MYUSERID&lt;BR /&gt;     fi&lt;BR /&gt;&lt;BR /&gt;# Successful logins&lt;BR /&gt;&lt;BR /&gt;     echo "\n${UL}Last $NUM succesful $MYUSERID logins:${EE} (last -R -$NUM $MYUSERID)"&lt;BR /&gt;     /usr/bin/last -R -5 $MYUSERID&lt;BR /&gt;&lt;BR /&gt;# SU attempts (good and bad)&lt;BR /&gt;&lt;BR /&gt;     if [ -r /var/adm/sulog ]&lt;BR /&gt;     then&lt;BR /&gt;        echo "\n${UL}Last $NUM su attmpts for $MYUSERID:${EE} (grep $MYUSERID&lt;BR /&gt;/var/adm/sulog)"&lt;BR /&gt;        if [ $(/usr/bin/grep $MYUSERID /var/adm/sulog \&lt;BR /&gt;    | wc -l \&lt;BR /&gt;    | awk '{print $1}') -gt 0 ]&lt;BR /&gt;        then&lt;BR /&gt;           /usr/bin/grep $MYUSERID /var/adm/sulog \&lt;BR /&gt;       | /usr/bin/sort -r \&lt;BR /&gt;       | /usr/bin/head -$NUM &lt;BR /&gt;        else&lt;BR /&gt;    echo "(none)"&lt;BR /&gt;        fi&lt;BR /&gt;     fi&lt;BR /&gt;&lt;BR /&gt;# End of security reports&lt;BR /&gt;&lt;BR /&gt;  fi&lt;BR /&gt;  echo&lt;BR /&gt;&lt;BR /&gt;# Lastly: run any local root customizations for this machine&lt;BR /&gt;&lt;BR /&gt;  if [ -r $HOME/.localprofile ]&lt;BR /&gt;  then&lt;BR /&gt;      . $HOME/.localprofile&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Jan 2004 17:56:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166648#M896725</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2004-01-16T17:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: user profiles and shell environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166649#M896726</link>
      <description>Great responses!  Thank you, all.&lt;BR /&gt;&lt;BR /&gt;Mladen&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Jan 2004 11:17:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-profiles-and-shell-environments/m-p/3166649#M896726</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2004-01-19T11:17:49Z</dc:date>
    </item>
  </channel>
</rss>

