Sponsored Content
Top Forums UNIX for Advanced & Expert Users FTP run by cron only works if user logged in? Post 302294517 by vbe on Thursday 5th of March 2009 10:54:37 AM
Old 03-05-2009
The automounter will mount the FS upon request, so typically wanting to access a directory that is NFS with automounter ends often with a "file or dir not found" or cat access message on FIRST attempt -> you try again and it works...
I used to put in my ftp scripts something like " dir " ls, pwd just so the automounter had time to do its work then ftped...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Works Manually - not in CRON

I've got a ksh script that works like a charm when I run it manually. When I set it up in a cron, I keep getting this error in my log: syntax error at line 90: `$' unexpected Here's my snippet of code starting at line 90: while ] do sleep 900 done What's the... (5 Replies)
Discussion started by: dstinsman
5 Replies

2. UNIX for Dummies Questions & Answers

shell script run by user or cron job ?

My shell script runs fine both as a cron job and when i issue it. However, I wish to differentiate when it runs as a cron-job so the "echo" statements are not issued (they get mailed to me, which i don't want). I tried checking $USER but since the cron was created in my user that does not... (5 Replies)
Discussion started by: sentinel
5 Replies

3. UNIX for Advanced & Expert Users

Send email as a different user than the user logged in

Hi I am using mailx to send email and am wondering if there is a way I can send the email from a different user than the user logged in. something like do-not-reply@xyz.com Thank you. (1 Reply)
Discussion started by: rakeshou
1 Replies

4. Shell Programming and Scripting

how to run script? call other script? su to another user? make a cron?

Good morning. I am searching for "how-to"'s for some particular questions: 1. How to write a script in HP-UX 11. 2. How to schedule a script. 3. How to "call" scripts from the original script. 4. How to su to another user from within a script. This is the basics of what the... (15 Replies)
Discussion started by: instant000
15 Replies

5. Shell Programming and Scripting

Get current logged in user from a script run as root.

Ok, so, in order to install some dependencies of a program I made, a script has to be run as root. The thing is that I have to copy some things into the home folder of currently logged in user, but the variable $HOME returns '/root' and the $USER returns 'root' :( Is there any way to see who is... (7 Replies)
Discussion started by: hakermania
7 Replies

6. Shell Programming and Scripting

Does running a cron job of a user require the user to be logged in?

Suppose user 'asdf' is not logged into server 'bbbb', but the server is up. User 'asdf' has cron job. Will it be executed? (1 Reply)
Discussion started by: thulasidharan2k
1 Replies

7. Red Hat

How to confirm an user logged in is a remote user?

How do I confirm if a user logged in, is remote or local? In the case if the user is remote, how to be sure what authentication/method is it using, like LDAP, NIS or other? (2 Replies)
Discussion started by: kirtikjr
2 Replies

8. UNIX and Linux Applications

Rsync works in shell but not in cron

So I have this rsync script I wrote to grab some sql files and import them to a database. I left in the mysql stuff just give context to the situation. The real problem is with my rsync code. script.sh (chmod 744) #!/bin/sh rsync -av --rsh="sshpass -p'PASSWORD' ssh -l'USERNAME'"... (3 Replies)
Discussion started by: noPermissions
3 Replies

9. Shell Programming and Scripting

Run script through cron with user environment variables

Hi everyone, I wrote a script that is supposed to be run by cron on a daily basis. It works just fine if I run it manually, but due to a lack of environment variables (which are available during my user session but not when cron runs the script) it keeps failing to run successfully. Here's the... (2 Replies)
Discussion started by: gacanepa
2 Replies

10. 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
AMQ(8)							      System Manager's Manual							    AMQ(8)

NAME
amq - automounter query tool SYNOPSIS
amq [ -fmpsvwHTU ] [ -h hostname ] [ -l log_file ] [ -x log_options ] [ -D debug_options ] [ -P program_number ] [[ -u ] directory ... ] DESCRIPTION
Amq provides a simple way of determining the current state of amd program. Communication is by RPC. Three modes of operation are sup- ported by the current protocol. By default a list of mount points and auto-mounted filesystems is output. An alternative host can be specified using the -h option. If directory names are given, as output by default, then per-filesystem information is displayed. OPTIONS
-f Ask the automounter to flush the internal caches and reload all the maps. -h hostname Specify an alternate host to query. By default the local host is used. In an HP-UX cluster, the root server is queried by default, since that is the system on which the automounter is normally run. -l log_file Tell amd to use log_file as the log file name. For security reasons, this must be the same log file which amd used when started. This option is therefore only useful to refresh amd's open file handle on the log file, so that it can be rotated and compressed via daily cron jobs. -m Ask the automounter to provide a list of mounted filesystems, including the number of references to each filesystem and any error which occurred while mounting. -p Return the process ID of the remote or locally running amd. Useful when you need to send a signal to the local amd process, and would rather not have to search through the process table. This option is used in the ctl-amd script. -s Ask the automounter to provide system-wide mount statistics. -u Ask the automounter to unmount the filesystems named in directory instead of providing information about them. Unmounts are requested, not forced. They merely cause the mounted filesystem to timeout, which will be picked up by amd's main scheduler thus causing the normal timeout action to be taken. -v Ask the automounter for its version information. This is a subset of the information output by amd's -v option. -w Translate a full pathname as returned by getpwd(3) into a short Amd pathname that goes through its mount points. This option requires that Amd is running. -x log_options Ask the automounter to use the logging options specified in log_options from now on. -D log_options Ask the automounter to use the debugging options specified in debug_options from now on. -H Display short usage message. -P program_number Contact an alternate running amd that had registered itself on a different RPC program_number and apply all other operations to that instance of the automounter. This is useful when you run multiple copies of amd, and need to manage each one separately. If not specified, amq will use the default program number for amd, 300019. For security reasons, the only alternate program numbers amd can use range from 300019 to 300029, inclusive. -T Contact amd using the TCP transport only. Normally amq will try TCP, and if that failed, will try UDP. -U Contact amd using UDP (connectionless) transport only. Normally amq will try TCP, and if that failed, will try UDP. FILES
amq.x RPC protocol description. CAVEATS
Amq uses a Sun registered RPC program number (300019 decimal) which may not be in the /etc/rpc database. SEE ALSO
amd(8), ctl-amd(8), amd.conf(5). AUTHORS
Jan-Simon Pendry <jsp@doc.ic.ac.uk>, Department of Computing, Imperial College, London, UK. Erez Zadok <ezk@cs.columbia.edu>, Department of Computer Science, Columbia University, New York, USA. Other authors and contributors to am-utils are listed in the AUTHORS file distributed with am-utils. 25 April 1989 AMQ(8)
All times are GMT -4. The time now is 10:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy