Solved

NIS maps actualization

Posted on 1998-10-28
5
241 Views
Last Modified: 2013-12-16
How can I make the actualization of my NIS maps automatically?

Manually I do it by typing:
cd /var/yp
make

But I introduce it in a script and the execute it in the
root's crontab it does not work.

The NIS server works under SunOS 4.1.3
TIA
0
Comment
Question by:iaguirre
5 Comments
 
LVL 1

Expert Comment

by:plebras
Comment Utility
HI !

Normally no problem

I think your line in root's crontab may be false. You must specify the complet path of the script (no default path except /bin in cron) in the line and also in the script eg :

0 10  * * * * /home/script

The script look like this

cd /var/yp
/var/yp/make

You must also set the rights by : "chmod 755 /home/script"
and then reinit cron by

"crontab root"

To verify type :
"crontab -l"

You must see your line

Bye
0
 

Author Comment

by:iaguirre
Comment Utility
It does not work. I caan not execute /var/yp/make it answers
"Command not found"

Moreover if I execute the script form the command line it works
but not in the crontab. This is my script:

#!/bin/csh
cd /var/yp >&! /sysutils/propaNIS.res
make >>& /sysutils/propaNIS.res

and this is my crontab:
15 3 * * * find / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune
5 4 * * 6 /usr/lib/newsyslog >/dev/null 2>&1
15 4 * * * find /var/preserve/ -mtime +7 -a -exec rm -f {} \;
20 12 * * * /sysutils/propaNIS

0
 
LVL 3

Expert Comment

by:elfie
Comment Utility
check your environment variables. You can print them as the first action in your script. Then run it online and within crontab.

Verify the two environment and you will see some differences. Try setting the needed env vars inside the script so there also available at 'crontab' execution
0
 

Author Comment

by:iaguirre
Comment Utility
Ok there was some problem with the environment
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 total points
Comment Utility
you must specify the full path for make in your script, like  /bin/make
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now