Re: [UNIX-WIZ] automount under cron
Hi, Kai:
Since you are running this as root — does root have write permissions
to the mount point? Remember that NFS and root permissions can be a bit
…. shall we say “unusual?”
When it works manually, is it working as root?
Have you checked the audit log? I cannot recall offhand where Solaris
5.8 stores that log (/var/cron/log, maybe?), but I do remember that
there is one, and it’s usually quite useful in cases like this.
Dennis E. Lovelady
—–Original Message—–
From: Unix Wizards Mailing List [mailto:UNIX-WIZ@LISTSERV.NODAK.EDU] On
Behalf Of Kai Hintze
Sent: Tuesday, May 20, 2008 6:13 PM
To: UNIX-WIZ@LISTSERV.NODAK.EDU
Subject: [UNIX-WIZ] automount under cron
Greetings Wizards!
I am scratching my head on a cron/automount conundrum. I have a script
that runs fine when I run it by hand but fails under cron. Usually
that means some environmental var is not being picked up. But what
environment controls automount?
OS is Solaris 8. /abc is automounted from our central NFS server to
nearly all our boxes. I want to put the report output there so we can
see it easily.
The script is pretty straight-forward:
#!/usr/bin/ksh
# this is the report script
Today=$(/usr/bin/date “+%Y%m%d”)
cd /abc
cd report_out
/usr/local/bin/report > $Today
This runs in root cron at 06:15 every morning. The only output I am
getting though is a mail saying “/abc does not exist”.
Why does it fail to automount? It runs fine by hand or under at (but
of course at keeps the environment).
Thanks,
Kai
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
–
To unsubscribe from the UNIX-WIZ Mailing List, send an email to
LISTSERV@LISTSERV.NODAK.EDU having a body containing only “SIGNOFF
UNIX-WIZ” minus quotes of course. There are searchable archives located
at http://listserv.nodak.edu/archives/unix-wiz.html
———
ListAdmin: UNIX-WIZ-request@LISTSERV.NODAK.EDU
Contact the above address if you have any problems or questions about the
list itself!