Sponsored Content
Top Forums Shell Programming and Scripting script execute by cron problem, but manual ok Post 302119459 by porter on Wednesday 30th of May 2007 04:15:18 AM
Old 05-30-2007
1. The executing user should get emails if any stdout or stderr was produced.

And in the environment your script runs (exec'd by cron and with minimal environment).....

2. check your paths (PATH, LD_LIBRARY_PATH etc)

3. check your environment
 

10 More Discussions You Might Find Interesting

1. AIX

problem with a script and the cron

hello I use a script to give me the number of users, at each hour. this script read a file where there is the number of users for each hour and for each month (so 12 files per year). If i execute the script (root), it is ok, i have xxx users for each hour. if I put the script in the cron... (1 Reply)
Discussion started by: pascalbout
1 Replies

2. UNIX for Dummies Questions & Answers

a cron job needs a perl script to execute

Hello evreyone, this is my first post, and to say i'm new to this is an understatement. I know very little about perl scripts and hope some one can help me. i'm looking to get a script that a cron job can execute. what the script needs to to is 1) connect to a mysql database 2) go to a... (2 Replies)
Discussion started by: Exader
2 Replies

3. Shell Programming and Scripting

cron does not execute script properly

I have a simple script that checks for certain printers and records them to a file. When I run the script manually at the command prompt, it works perfect, but when I run the script via cron, nothing happens. No errors reported, and no records are written out. I'm using Solaris 10. Below is the... (4 Replies)
Discussion started by: lmatlebyane
4 Replies

4. Solaris

anomalous behaviour when I execute the script via cron

Hi , I am having a strange problem with my cron job : here is the script that I am scheduling from cron WrapperScript.ksh #!/bin/ksh ########## Global Variables ########## DATE=$(date +"%b-%d-%y") TIME=$(date +"%H:%M") LOGFILE=sonar_execution_$DATE.log ########## Main Processing... (2 Replies)
Discussion started by: alookachaloo
2 Replies

5. Shell Programming and Scripting

Difference between using shell or cron to execute a script

Hi! Maybe i am here in the wrong section for the problem, but let me try to explain. I have the following simple backup script, as a solution till the final backup solution is online. Unfortunatly it will only work when executed manually. When i set up a cron job to execute the script, only the... (4 Replies)
Discussion started by: locutus01
4 Replies

6. HP-UX

Manual vs Cron execution in HP-UX

Below is a simple script that will find the path were the perl command reside. ========================= #!/usr/bin/sh nPerl=`which perl 2>>/dev/null|grep -v "no perl"` if ; then echo "No Perl application exist..." else echo "Existing at $nPerl" fi ========================= When I... (2 Replies)
Discussion started by: padi
2 Replies

7. Solaris

cannot execute sqlplus in shell script under cron

Hi, I have a bourne shell script that needs to login into sqlplus and execute a stored procedure. I need this shell script to be run under a user crontab. It works fine if run under normal shell prompt. But it gave error message in my log file when run under crontab: SQL*Plus: Release... (4 Replies)
Discussion started by: joe_x
4 Replies

8. Shell Programming and Scripting

How to check if script is run via cron or manual=command line?

Hi all, I have a script that can be run via cron or via the command line. Is there any way that I can place something on the script to be able to distinguish/differentiate whether the script was run via a user in the command line or whether it was run from the cron? (3 Replies)
Discussion started by: newbie_01
3 Replies

9. UNIX for Dummies Questions & Answers

Execution problem with Cron: Script works manually but not w/Cron. Why?

Hello gurus, I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup is shown below: #!/bin/ksh db2... (3 Replies)
Discussion started by: okonita
3 Replies

10. Shell Programming and Scripting

Need assistance to define path on a script which cron will execute

I have written a script to execute some sql statement via executable file. It is working fine via command line, however when I schedule it in cron. The executable file is looking for library file in its root directory. Wonder where does cron run the script from, and can we get the script... (4 Replies)
Discussion started by: jaapar
4 Replies
PAM-SCRIPT(7)						 Miscellaneous Information Manual					     PAM-SCRIPT(7)

NAME
pam-script - a PAM module that can invoke scripts within the PAM stack. SYNOPSIS
pam-script.so [onerr=(success|fail)][dir=/some/path/] DESCRIPTION
pam-script allows you to execute scripts during authorization, passwd changes, and on session opening or closing. Such scripts can perform necessary tasks or influence the outcome of the PAM stack. For example, if the following entry was included in pam.conf sshd auth required pam_script then if the script, pam_script_auth, exits with a non-zero value this would cause the user to be denied SSH access to the machine. OPTIONS
A summary of options is included below. onerr=(success|fail) the default behavior if the module can not find or execute the script. The default is to fail if the option is not given. dir=/some/path/ where to find the pam-scripts to invoke for each of the various module-types as described below. The default is dir=/usr/share/lib- pam-script if not given. List of scripts pam_script_auth Executed under auth which handles the authentication stage of establishing the user via some challenge-response (i.e. username/pass- word) pam_script_acct invoked under account module-type for non-authentication based account management. pam_script_passwd invoked under passwd for changing the password tokens. pam_script_ses_open invoked when a session is first opened. pam_script_ses_close run after a session is first closed. All the scripts will be passed several environment variables: PAM_USER, PAM_RUSER, PAM_RHOST, PAM_SERVICE, PAM_AUTHTOK, PAM_TTY, and PAM_TYPE referring to the module-type. The pam_script.so arguments in the pam.conf will be passed on the command line, which can be used to modify the script behavior. FILES
/lib/security/pam_script.so - the PAM module /usr/share/libpam-script - where the scripts should be placed by default VERSION
pam-script 1.1.5 SEE ALSO
PAM(7) and the PAM "The System Administrators' Guide" AUTHOR
pam-script was written by Jeroen Nijhof <jeroen@jeroennijhof.nl> with some additions and modifications by R.K. Owen, Ph.D. <rkowen@nersc.gov>. This manual page was written by R.K. Owen <rkowen@nersc.gov>, for the Debian project (but may be used by others). August 22, 2007 PAM-SCRIPT(7)
All times are GMT -4. The time now is 08:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy