MagniComp Sysinfo from the cron!

From: LOEWENTHAL Simon (sloewenthal@gemini.edu)
Date: Tue Jul 27 2004 - 09:30:37 EDT


Hi all,

I created a non-providledged user called sysinfo and put this in his
crontab:

34 * * * 1 /home/sysinfo/src/sysinfo/bin/sysinfo -class all | grep -v
"sie\:" > /home/sysinfo/logs/sysinfo.`hostname`.`domainname`.`date
+%d.%m.%y.%H\:%M\:%S` 2>&1

The grep -v sie is to remove the error messages like these, which is fine
since I don't need to run sysinfo as root:

sie: WARNING: This program should be run as `root' (uid=0) to obtain all
supported information. Please either make setuid to
root (chown root sysinfo;chmod u+s sysinfo) or invoke as a uid=0 user such
as `root'.
sie: cannot open /dev/kmem

The problem is that the cron fails. If I run this from the cli then the
output is fine. Its only when I run this from cron if fails. The sysinfo
accounts Email from cron reads:

>From sysinfo Mon Jul 26 04:35:56 2004
Date: Mon, 26 Jul 2004 04:35:56 -0400 (CLT)
From: Sysinfo <sysinfo>
To: sysinfo
Subject: Output from "cron" command

Your "cron" job on aguila
/home/sysinfo/src/sysinfo/bin/sysinfo -class all | grep -v "sie\:" >
/home/sysinfo/logs/sysinfo.`hostname`.`domainname`.`date +

produced the following output:

sie: WARNING: This program should be run as `root' (uid=0) to obtain
        all supported information. Please either make setuid to
        root (chown root sysinfo;chmod u+s sysinfo) or invoke as a
        uid=0 user such as `root'.
sie: cannot open /dev/kmem
sie: cannot open /dev/kmem
sie: cannot open /dev/kmem
sie: WARNING: This program should be run as `root' (uid=0) to obtain
        all supported information. Please either make setuid to
        root (chown root sysinfo;chmod u+s sysinfo) or invoke as a
        uid=0 user such as `root'.

As a result nothing is sent to the log file via cron, but the log file is
created when run from the CLI.

Does anyone know why this job fails?

Rdgs/Atentamente,
Simon.

---
Simon Loewenthal
Gemini Observatory
Information Systems Group
Video 139.229.33.88
Voice +56 51 205610
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 22/07/2004
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:09 EDT