Cron, /etc/motd & cronlog (SV)
Jesse Fred Shumway
jfs at ih1ap.UUCP
Sat Jun 22 01:47:43 AEST 1985
> 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.
I assume that if "user" has mail that fact is also noted in the
cronlog.
The problem probably resides in /etc/profile; which should check $0
to see if it was invoked as "-su" or "-sh|-rsh". Only in the latter
case should it cat /etc/motd and announce that mail is present.
Check your original distribution and if it doesn't do this you
might call the Uniplus+ people and ask why they so gracelessly
munged /etc/profile. Or, maybe /bin/su isn't changing $0 to "-su".
Jesse Fred Shumway AT&T-NS (312) 510-7880
More information about the Comp.unix.wizards
mailing list