As far as the cnews angle is concerned, this seems to be a minor misfeature of the cnews package.
The script in /etc/cron.daily/cnews is run as root, and su's to user 'news' while the current working directory is /root, resulting in nasty messages. I have attached my slightly edited copy of this script, that cd's before the su. I have version cr.g7-12 of cnews installed; if you have some other version, don't simply replace your script with mine unless you're happy that it's correct. On Mon, Nov 01, 1999 at 04:26:17AM +0100, Marco Giardini wrote > ----- Forwarded message from Cron Daemon <root> ----- > how to solve this? > Thanks > > > .oesse. > > Date: Sat, 30 Oct 1999 06:25:02 +0200 > From: root (Cron Daemon) > To: root > Subject: Cron <[EMAIL PROTECTED]> run-parts --report /etc/cron.daily > > /etc/cron.daily/cnews: > shell-init: could not get current directory: getcwd: cannot access parent > directories > job-working-directory: could not get current directory: getcwd: cannot access > parent directories > shell-init: could not get current directory: getcwd: cannot access parent > directories > job-working-directory: could not get current directory: getcwd: cannot access > parent directories > shell-init: could not get current directory: getcwd: cannot access parent > directories > job-working-directory: could not get current directory: getcwd: cannot access > parent directories > job-working-directory: could not get current directory: getcwd: cannot access > parent directories > job-working-directory: could not get current directory: getcwd: cannot access > parent directories > shell-init: could not get current directory: getcwd: cannot access parent > directories > cd_links: could not get current directory: getcwd: cannot access parent > directories > job-working-directory: could not get current directory: getcwd: cannot access > parent directories > shell-init: could not get current directory: getcwd: cannot access parent > directories > cd_links: could not get current directory: getcwd: cannot access parent > directories > mv: log: No such file or directory > egrep: log.o: No such file or directory > log.o: No such file or directory > /etc/cron.daily/cracklib: > 45375 45375 > /etc/cron.daily/suidmanager: > File /usr/lib/emacs/19.34/i386-debian-linux/movemail registered but not > installed > File /usr/lib/emacs/20.3/i386-debian-linux-gnu/movemail registered but not > installed > > ----- End forwarded message ----- > > -- > ------------------------------------------------------------------ > +-+-+-+-+-+ +-+-+-+-+-+-+-+-+ > |m|a|r|c|o| |g|i|a|r|d|i|n|i| > +-+-+-+-+-+ +-+-+-+-+-+-+-+-+ > TecnoGi spa > http://www.tecnogi.com > Key fingerprint = A1 51 D2 26 96 02 20 B9 78 B9 04 87 53 10 65 7C > > > -- > Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null > John P. -- [EMAIL PROTECTED] [EMAIL PROTECTED] "Oh - I - you know - my job is to fear everything." - Bill Gates in Denmark
#!/bin/sh set -e test -f /usr/lib/news/expire/doexpire || exit 0 test -f /usr/lib/news/maint/newsdaily || exit 0 # # Added 3/11/98 J Pearson, to ensure cwd will be readable when we # su news cd / /bin/su news -c '/usr/lib/news/expire/doexpire; /usr/lib/news/maint/newsdaily' exit 0