Forcing actions at login

Neil Rickert rickert at mp.cs.niu.edu
Thu Jan 24 06:10:16 AEST 1991


In article <2679 at wn1.sci.kun.nl> hansm at cs.kun.nl (Hans Mulder) writes:
>
>You really should try these things before posting them.
>
>It won't work on most systems, as the C shell ignores .cshrc and
>.login files not owned by the effective uid, for security reasons.
>

You really should try these things before posting them.

 Many versions of C shell will execute a .login file owned by root, even if
root is not the effective ID.

 The real problem of giving everyone the home directory of /everyone is that
standard methods of finding the real home directory will no longer work.
For example files such as '.forward' which are examined when you are not
logged in will be shared by all users.

 What you have to do is give everyone a different shell. That different shell
changes the value of $HOME to the /everyone directory, cd's to that directory,
redefines $SHELL to the real csh or sh, then exec's this shell.  The shell then
will execute the .login or whatever, reset the $HOME to its correct value,
and you go on from there.  Note that by changing the value of $SHELL, only
your first interface (be it login, rsh etc) goes through this processing,
but subsequently invoked shell use the user specified processing.

 You also have to carefully control what 'chsh' is allowed to change the shell
to.

 Whether all this is really worth the trouble is quite questionable.

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert at cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940



More information about the Comp.unix.admin mailing list