su user in init.d and cron jobs

From: William H. Magill <magill_at_dccs.upenn.edu>
Date: Mon, 30 Jan 1995 16:38:27 -0500

Someplace I've seen this discussed recently but can not find it.

Basically... to start up certain jobs/daemons typically from rc.local, but
frequently from cron, under Ultrix we have used the syntax:

In cron:
        # 0 0 * * * su <userid> -c '/usr/local/commadn'

In rc.local:

        su - ingres -c "yes | iistartup" >/dev/console 2>&1

In particular, the latter when used in init.d linked into rc3.d doesn't
work.
        su: may not be called from rc script

I know I've seen this discussed someplace but can't find it....

Any hints?

T.T.F.N
William H. Magill Manager, PennNet Computing Services
Data Communications and Computing Services (DCCS) University of Pennsylvania
Internet: magill_at_dccs.upenn.edu magill_at_acm.org
          magill_at_upenn.edu http://pobox.upenn.edu/~magill/
 
Received on Mon Jan 30 1995 - 17:25:14 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT