- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cron and .netrc
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2002 11:36 AM
02-14-2002 11:36 AM
cron and .netrc
well when run manually on the command line, but it chokes on the login
when run as the same user from cron. It appears to not be using the .netrc
login info at all. Anyone have an idea how to get around this? If there is
a way to reprogram the shell script to accomplish the same task it can be
done as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2002 11:40 AM
02-14-2002 11:40 AM
Re: cron and .netrc
Try this link,
http://us-support2.external.hp.com/cki/bin/doc.pl/sid=ffa253c31a745add51/screen=ckiDisplayDocument?docId=200000050604510
hope this helps.
regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2002 12:16 PM
02-14-2002 12:16 PM
Re: cron and .netrc
GL,
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2002 12:18 PM
02-14-2002 12:18 PM
Re: cron and .netrc
HTH
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2002 12:27 PM
02-14-2002 12:27 PM
Re: cron and .netrc
Well, the problem that I currently have is that the .netrc file resides under $HOME (i.e., /home/www, www is the account for which the cron is setup). The script resides under the same user's file system.
Cron is not recognizing the .netrc file under the $HOME. When the script is manually executed, .netrc file is considered and ftp works fine.
How do we make the cron to use the .netrc file ?.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:09 AM
02-15-2002 12:09 AM
Re: cron and .netrc
Could you show us your script.
Especially the connection to the other system.
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 04:27 AM
02-15-2002 04:27 AM
Re: cron and .netrc
did you try to
export HOME=path_to_.netrc_dir
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 06:57 AM
02-15-2002 06:57 AM
Re: cron and .netrc
Are you running the ftp script from www's crontab? Or are you running it from root's crontab (su'ing to www)?
It will work if you use www's crontab but "su - www -c ftpscript" in root's crontab is going to fail. man netrc says:
If the .netrc file contains password or account information for use other than for anonymous ftp, its owner must match the effective user ID of the current process. Its read, write, and execute mode bits for group and other must all be zero, and it must be eadable by its owner. Otherwise, the file is ignored.
I think that may be your problem. I don't know how to correct your issue other than to allow www to run cron (/usr/lib/cron/cron.allow).
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2002 04:39 AM
02-18-2002 04:39 AM
Re: cron and .netrc
regards Seba
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2002 01:33 PM
02-19-2002 01:33 PM
Re: cron and .netrc
* The mode of .netrc file is 600.
* The script is being executed by www via cron (not root).
I am attaching an extract from the actual script which contains the ftp part.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2002 02:28 PM
02-19-2002 02:28 PM
Re: cron and .netrc
error=`ftp $REMOTE_HOST <$TMP_FTP_COMMAND_FILE`
after ftp like this:
error=`ftp -i $REMOTE_HOST <$TMP_FTP_COMMAND_FILE`
this turns off interactive processing of the ftp. Also, keep in mind that the value of "error" will only be the exit value of ftp, and not at all reflective of any errors during the ftp session.
HTH
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2002 03:04 PM
02-19-2002 03:04 PM
Re: cron and .netrc
Thanks, but -i dint solve the problem.