tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: twinders () spc ! cc ! tx ! us (Tim Winders)
To: tru64-unix-managers
Subject: SUMMARY: login scripts
Date: Thu, 07 Dec 1995 20:35:31 +0000	[thread overview]
Message-ID: <96075325906550.tru64-unix-managers.marc@archive.invalid> (raw)

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@krtkg1.rug.ac.be>
"George W. Baltz" <gwb@umd5.umd.edu>
Scott McCracken <scottm@discorp.com>
Drew Kramer <drew@ny.ox.com>
carlos.touzard@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@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@spc.cc.tx.us   |
|  Network Specialist            |  Phone:  806-894-9611 x 2369     |
|  South Plains College          |  Fax:    806-894-6880            |
---------------------------------------------------------------------

                 reply	other threads:[~1995-12-07 20:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox