System-wide .login?

System-wide .login?

Post by Ken Be » Sun, 04 Nov 1990 14:28:48



On Fri, 2 Nov 90 19:16:00 EST Bill Wine, system manager, 437-7226 said:

Quote:>When a user logs in to the C-shell, the files .cshrc and .login are executed.
>Is there a way to have a file (other than login) run when each user logs in?
>In other words, is there a Unix file equivalent to sylogin.com in the VMS
>world?

How about --  'ln -s .login some_other_file' ?
Or, simply have .login do nothing else but exec your preferred file?

(What's "sylogin.com" and why is it better than ".login" ?!)


 
 
 

System-wide .login?

Post by Robert Claes » Mon, 05 Nov 1990 05:22:45



Quote:>On Fri, 2 Nov 90 19:16:00 EST Bill Wine, system manager, 437-7226 said:
>>When a user logs in to the C-shell, the files .cshrc and .login are executed.
>>Is there a way to have a file (other than login) run when each user logs in?
>>In other words, is there a Unix file equivalent to sylogin.com in the VMS
>>world?
>How about --  'ln -s .login some_other_file' ?
>Or, simply have .login do nothing else but exec your preferred file?
>(What's "sylogin.com" and why is it better than ".login" ?!)

Syslogin.com is a system-wide login file that gets executed before
the user's own login file is run. Its purpose is for the system
admins to be able to set up reasonable defaults for applications,
establish commands, logicals and the like (ie, search paths and
environment variables in UNIX lingo). Thus, a user need only
edit his or her own login file if he or she wishes to change a default
or logical defined in syslogin.com, or to add more private commands
and logicals.

Csh doesn't have anything similar, but Bourne and Korn shell do,
at least under System V. The file /etc/profile serves the same
purpose as syslogin.com.

--



These opinions reflect my personal views and not those of my employer.

 
 
 

System-wide .login?

Post by Guy Harr » Mon, 05 Nov 1990 06:47:52


(This is *NOT* a "wizards" or "internals" question, so followups are
being redirected to "comp.unix.shell".  There is, as far as I know, no
mailing list gatewayed there; mail followups should probably be sent to
"info-unix", which I think still goes to "comp.unix.questions".)

Quote:>(What's "sylogin.com" and why is it better than ".login" ?!)

Well, one might be able to infer what it is from the subject line.

When a login C shell starts up, it sources ".cshrc" from the user's home
directory, and then ".login" from the user's home directory.  Some
versions of the C shell *also* will source a file from some system
directory, e.g. "/etc/csh.login" or whatever.

This is similar to what more recent versions of the Bourne and Korn
shell do; they source the ".profile" file from the user's home
directory, but also source "/etc/profile" as well.

The problem with

Quote:>How about --  'ln -s .login some_other_file' ?
>Or, simply have .login do nothing else but exec your preferred file?

is that the "other file" would be global, so nobody would be able to do
any customization of their environment.

The answer to the original question

Quote:>>In other words, is there a Unix file equivalent to sylogin.com in the VMS
>>world?

is "no", for a couple of reasons:

1) not everybody in UNIX uses the same shell; some use Bourne-compatible
   shells (Bourne shell, "ksh", "bash", etc.), while others use the C
   shell.  As such, there couldn't be *one* file equivalent to
   "sylogin.com" on a UNIX system that has the C shell.

2) not all UNIX shells directly support the notion of a global file of
   that sort.  Older versions of the Bourne shell don't, and most
   versions of the C shell don't (some do, such as the S5R4 C shell and,
   I think, the HP-UX C shell, and probably some others).

If not all shells support that notion, one thing you can do is have
everybody's ".login" or ".profile" file source the global file, although
those users may be allowed to edit or replace their ".login" or
".profile" file and have it not do so, so you may not be able to
guarantee that the global file will be executed.

 
 
 

System-wide .login?

Post by Philip Smith, Systems Programm » Tue, 06 Nov 1990 21:56:21


Bill,

Some versions based on 4.3BSD may use the following files:

  /etc/csh.cshrc
  /etc/csh.login
  /etc/csh.logout

Philip Smith
Systems Programmer
University of Windsor

 
 
 

System-wide .login?

Post by ihor.j.kin » Thu, 08 Nov 1990 03:38:12



> Csh doesn't have anything similar, but Bourne and Korn shell do,
> at least under System V. The file /etc/profile serves the same
> purpose as syslogin.com.

QUESTION: is /etc/profile really executed upon login under the ksh,
        assuming the user has ksh  as the login shell??  If I want
        to define a GLOBAL alias for everyone can I do it in /etc/profile?
        [To answer my own question, is I don't think so].

The only other way I can think of doing this is to  define ENV to be
        read-only, and set it to a file containing the alias in question.
        This is a rather crude method, and unacceptable if I want
        users to have additional ENV capabilities.

So why doesn't ksh have a global ENV file??

#include standard disclaimers: plus `they' don't give me root, so I
can't really play with setting /etc/profile :-)

Ihor Kinal
att!cbnewsh!ijk

 
 
 

1. System-wide .login?

(This is *NOT* a "wizards" or "internals" question, so followups are
being redirected to "comp.unix.shell".  There is, as far as I know, no
mailing list gatewayed there; mail followups should probably be sent to
"info-unix", which I think still goes to "comp.unix.questions".)

Well, one might be able to infer what it is from the subject line.

When a login C shell starts up, it sources ".cshrc" from the user's home
directory, and then ".login" from the user's home directory.  Some
versions of the C shell *also* will source a file from some system
directory, e.g. "/etc/csh.login" or whatever.

This is similar to what more recent versions of the Bourne and Korn
shell do; they source the ".profile" file from the user's home
directory, but also source "/etc/profile" as well.

The problem with

is that the "other file" would be global, so nobody would be able to do
any customization of their environment.

The answer to the original question

is "no", for a couple of reasons:

1) not everybody in UNIX uses the same shell; some use Bourne-compatible
   shells (Bourne shell, "ksh", "bash", etc.), while others use the C
   shell.  As such, there couldn't be *one* file equivalent to
   "sylogin.com" on a UNIX system that has the C shell.

2) not all UNIX shells directly support the notion of a global file of
   that sort.  Older versions of the Bourne shell don't, and most
   versions of the C shell don't (some do, such as the S5R4 C shell and,
   I think, the HP-UX C shell, and probably some others).

If not all shells support that notion, one thing you can do is have
everybody's ".login" or ".profile" file source the global file, although
those users may be allowed to edit or replace their ".login" or
".profile" file and have it not do so, so you may not be able to
guarantee that the global file will be executed.

2. Adaptec 1542 DRIVER PROBLEM!!!

3. system wide login script

4. ELSA WINNER 2000 running under X11R6??

5. system-wide mailbox on aix

6. WHO IS THIS PERSON? please help

7. System-wide finger

8. Kernel Message question

9. System-wide variables under UNIX

10. system-wide UMASK default value

11. Where to install system-wide application config files?

12. cpufreq: update system-wide loops_per_jiffy only on UP

13. CDE system-wide desktop