Open System Services Management and Operations Guide (G06.30+, H06.08+, J06.03+)
Example 27 Sample /etc/profile File /etc/profile.sample
# Remove /bin/unsupported from PATH if you DO NOT want to
# use the unsupported utilities on your system
# Note: /usr/ucb contains the OSS ftp client
#export PATH=/bin:/usr/ucb
export PATH=/bin:/bin/unsupported:/usr/bin:/usr/ucb
export TERM=xterm
export PS1='$PWD: '
Adding Commands for User Convenience
A user can override commands that are in the /etc/profile file, therefore commands in this
file are for the convenience of your users, not a means of enforcing security provisions.
Some useful commands you can put in the /etc/profile file are:
umask 022 #Only users have write permission on their files.
set -o noclobber #Redirection can’t overwrite files.
set -o trackall #Track all aliases.
export MANPATH=/usr/share/man #Match PATH use.
For information about the set and umask commands, see the set(1) and umask(1) reference
pages either online or in the Open System Services Shell and Utilities Reference Manual.
Setting the trackall flag creates tracked aliases. The tracked alias for a command takes effect
the second time the alias is used.
A tracked alias improves performance by automatically starting the aliased command with the full
OSS pathname of the system copy of the command file. This behavior avoids time-consuming
searches through all the directories in the user’s PATH environment variable. Several commands
have built-in aliases; for details, see the sh(1) reference page either online or in the Open System
Services Shell and Utilities Reference Manual.
Tracked aliases take priority over executable files; when a tracked alias refers to a system utility,
the file in the /bin directory is executed instead of a file with the same utility name that might
reside in another directory in the user’s search path. This behavior prevents intruders from using
a commonly used utility name for a substitute program that they create to damage data on your
system.
OSS environment characteristics usually default to those of the Guardian environment on your
node. However, many of these characteristics can be changed using standard UNIX methods so
that the OSS environment uses values separate from those of the Guardian environment.
For example, the time values used by an OSS shell default to those of the system that the shell runs
on. If you maintain an OSS environment for users in a time zone other than that used for your
Guardian environment, you can add the TZ environment variable to /etc/profile to make the
time zone for your OSS users appropriate to their location. The following entry would be appropriate
for California users of a node located in New York City:
export TZ=:PST-8PDT-7,M4.5.0,M10.5.0
See the environ(5) reference page either online or in the Open System Services System Calls
Reference Manual for the format of the TZ environment variable.
Controlling Reference Page Searches and Display
HP recommends setting the MANPATH environment variable in the /etc/profile file to /usr/
share/man so that OSS reference pages can always be delivered to users by the man command,
and so that the whatis and apropos commands work correctly for OSS information. To read
the reference pages of the OSS Core Utilities (T1202) product introduced in the J06.14 and H06.25
RVUs, add /usr/coreutils/share/man to the MANPATH environment variable in the /etc/
profile file. Individual users can then set their .profile files to use other online reference
material, such as Open Source packages installed into the /usr/local/man directories.
Customizing the OSS Shell 237