System-wide .login?

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 Robert Claes » Tue, 06 Nov 1990 22:18:48



Quote:>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.

Some sites force all their users to have a shell (commonly sh or ksh)
that reads a system global login file, and if they want csh or something
else, exec it from their .profile's.

--



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

 
 
 

1. System-wide .login?

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

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" ?!)


2. Xwrapper help

3. system wide login script

4. grep

5. system-wide mailbox on aix

6. printcap 2.

7. System-wide finger

8. receive on socket with MSG_WAITALL flag

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