SUMMARY: login scripts

From: Tim Winders <twinders_at_spc.cc.tx.us>
Date: Thu, 7 Dec 1995 14:35:31 -0600

My original question:

>I want to have all of my users execute the same .profile when they login.
>Right now, each .profile is pointing at a common .profile. It executes,
>but none of the variables are exported to the environment. If I copy the
>shared .profile to the user home directory it works fine. How can I make
>this happen?

>This is with DU3.2c. Thanks!


Thanks to

Christophe Colle <colle_at_krtkg1.rug.ac.be>
"George W. Baltz" <gwb_at_umd5.umd.edu>
Scott McCracken <scottm_at_discorp.com>
Drew Kramer <drew_at_ny.ox.com>
carlos.touzard_at_citicorp.com

who responded so quickly.

They were all correct to point out that the file /etc/profile get executed
before a local .profile file. This is the system-wide global profile for
all -sh users.

The execution of a common .profile file can happen as follows (in either
the /etc/profile or .profile for each user)

. /common/.profile

The ". " (that is dot space) in front of the command tells it to execute
within the currect shell and not to create a new shell. That was my
problem and therefore the variables were not being saved. Thanks to Scott
McCracken <scottm_at_discorp.com> for pointing that one out to me!

I think that for a csh user, you can use

source /common/.profile

Several people suggested that one, but in a -sh shell, I just got an error
with that syntax.

Thanks again!

---------------------------------------------------------------------
| Tim Winders | Email: twinders_at_spc.cc.tx.us |
| Network Specialist | Phone: 806-894-9611 x 2369 |
| South Plains College | Fax: 806-894-6880 |
---------------------------------------------------------------------
Received on Thu Dec 07 1995 - 22:26:14 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT