Cron, /etc/motd & cronlog (SV)

Steven List sml at luke.UUCP
Tue Jun 25 06:07:04 AEST 1985


In article <168 at megad.UUCP> seth at megad.UUCP (Seth H Zirin) writes:
>The message of the day ("/etc/motd") is printed in the cronlog file every
>time an "su - user -c command" is executed by cron.  Does anyone know how
>to supress the "printing" of /etc/motd when using the "-" option to su?
>It would make the cronlog smaller and more easily read.  We use Uniplus+
>System V.

The appearance of the message of the day is caused by the execution of
the user's .profile or the system /etc/cshprofile.  The first question
is: Is it essential to use the `-' option to su?  If it is essential,
you will need to set up some kind of trigger to allow you to
conditionally ignore that part of the initialization sequence.  One
alternative is to set up an alternate user name (nameX), and use the
alternate user name in crontab.  Then you can include the appropriate
conditional code in .profile or /etc/cshprofile.



More information about the Comp.unix.wizards mailing list