Open System Services Management and Operations Guide (G06.25+, H06.03+)
Managing With the Shell
Open System Services Management and Operations Guide—527191-002
9-3
Setting Up an /etc/profile File
OSS configuration was performed using the OSSSETUP utility, this copy was made
automatically.)
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.
Figure 9-1. 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: '