Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site luke.UUCP
Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!whuxl!houxm!mtuxo!mtunh!mtung!mtunf!ariel!vax135!timeinc!phri!pesnta!hplabs!oliveb!bene!luke!sml
From: sml@luke.UUCP (Steven List)
Newsgroups: net.unix-wizards
Subject: Re: Cron, /etc/motd & cronlog (SV)
Message-ID: <247@luke.UUCP>
Date: Mon, 24-Jun-85 16:07:04 EDT
Article-I.D.: luke.247
Posted: Mon Jun 24 16:07:04 1985
Date-Received: Wed, 3-Jul-85 07:06:25 EDT
References: <168@megad.UUCP>
Reply-To: sml@luke.UUCP (Steven List)
Distribution: net
Organization: Uncle Bene's Farm
Lines: 15
Summary: 

In article <168@megad.UUCP> seth@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.