>Is this true?
>On my Slackware system it doesn't appear to work like this ... I put
>the default prompt and path in /etc/profile then for one login I use a
>different prompt (due to using it to log into an Apple system) defined
>in ~/.profile BUT the path data remains the same.
>This could take some additional experimentation to find out.
No. The Unix/Linux mechanism is to read /etc/profile regardless of the
existance of a ~/.profile. However how this is implemented is not defined
anywhere so it may be implemented by a line in /etc/profile executing
~/.profile (unlikely but valid) or it may be implemented in the shell. I think
you will find that unless someone has been doing funy stuff on your system that
your /etc/profile IS read regardless of the existance of a .profile though
neither may be used if you are using some shells. Most shells however will
behave as mentioned.
Regards
mark
P.S. The reason I suggested putting the code in .profile was because the
original poster wanted different number of logins for different and users. If
however a central file was created that contained lines of the format userame:X
(X being maximum logins) it would be possible to put the following in
/etc/profile. This is just off the top of my head so don't blame me if it's
*:)
LOGINLINE=`grep "userame:" /etc/centralfile`
[ `who | grep username | wc -l` -gt `expr $LOGINLINE : ".*:\(.*\)"` ] && {
echo "Logged in too many times - Loser"
exit 1
Quote:}
Regards
mark
----------------------------------------------------------------------------
We are Pentium of Borg - You will be approximated
http://www.veryComputer.com/ (As if I ever update this page!)
----------------------------------------------------------------------------