Re: Is a "group" profile possible?
From: Juha Laiho (Juha.Laiho_at_iki.fi)
Date: 05/24/05
- Next message: clint: "UNIX command for interface uptime"
- Previous message: Chris: "Re: searching entire directory for a phrase"
- In reply to: Chris: "Re: Is a "group" profile possible?"
- Next in thread: wmreinemer_at_tns.net: "Re: Is a "group" profile possible?"
- Reply: wmreinemer_at_tns.net: "Re: Is a "group" profile possible?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 24 May 2005 17:29:31 +0000 (UTC)
"Chris" <ctaliercio@yahoo.com> said:
>Of course - immediately after posting this I found the 'groups' command
>for option number 2.
(or 'id', as was written in another response)
>Which would be the better practice here?
>
>[[ -r /etc/${gid}.profile ]] && ENV=/etc/${gid}.profile
>
>or
>
>[[ -r /etc/${gid}.profile ]] && . /etc/${gid}.profile
Be careful with setting 'ENV' -- it may, in some cases, cause the
designated profile file to be executed in rather unexpeted places -
making changes to the execution environment in surprising ways.
I once spent quite some time debugging a problem where a script just
couldn't find some binaries it depended on. This was on an application
account for a largish packaged application. The shell for the application
account was set to be ksh, and the initialization files were properly
configured with that in mind. However, in some occasions the application
ran some external scripts - and however well the environment was set up,
some of the applications auxiliary binaries (called in the scripts) could
not be found. At last I realised that these scripts were written in csh,
and had the csh shebang line. And there was a .cshrc file (created by
the systems default user creation tool) in the home directory which was
setting PATH to a fixed value (which of course didn't include the
application binary directories). Everything worked much more predictably
after getting rid of the .cshrc file. The risk in using ENV is very
similar -- be extremely careful in what you place into a script called
via the ENV mechanism.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
- Next message: clint: "UNIX command for interface uptime"
- Previous message: Chris: "Re: searching entire directory for a phrase"
- In reply to: Chris: "Re: Is a "group" profile possible?"
- Next in thread: wmreinemer_at_tns.net: "Re: Is a "group" profile possible?"
- Reply: wmreinemer_at_tns.net: "Re: Is a "group" profile possible?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|