- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: run script
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
Discussions
Discussions
Forums
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
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
тАО04-21-2009 06:10 PM
тАО04-21-2009 06:10 PM
however , ftp_script1 & ftp_script2 doing different things so I want to use different login/password when use these script ( eg. ftp_script1 use login ID: userA , password: passwordB while ftp_script2 use login ID: userB , password: passwordB ) , if I add these two login/password to .netrc , how to tell the script to use right login/password ? thx
machine 192.168.0.3 login userA passwd passwordA
machine 192.168.0.3 login userB passwd passwordB
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2009 07:57 PM
тАО04-21-2009 07:57 PM
Re: run script
>I want to use different login/password when use these script
I suppose you could use an IP alias for the machine so you can have different "machine" entries in your .netrc.
Or you could change $HOME and point to different directories with the two .netrc files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2009 08:57 PM
тАО04-21-2009 08:57 PM
Re: run script
Why don't you run these two scripts with two different local users? So that both users have it's own .netrc file.
You can use userA in one .netrc file and userB in another .netrc file.
The other option is, as Dennis said, you could use if the server has another virtual ip.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2009 10:09 PM
тАО04-21-2009 10:09 PM
Re: run script
You suggested use IP alias , virtual IP , can give the advice how to do it ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2009 10:22 PM
тАО04-21-2009 10:22 PM
Re: run script
You first check if the remote server has virtual ip or not using netstat -in command.
If it does not have, then you can configure virtual ip on the same interface. Use sam and add logical interface option in the network configuration.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2009 10:28 PM
тАО04-21-2009 10:28 PM
Re: run script
the remote is not owned by us , we can't change anything , is there any other method ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2009 10:43 PM
тАО04-21-2009 10:43 PM
Re: run script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2009 01:18 AM
тАО04-22-2009 01:18 AM
SolutionIn that case try this. Hopefully it should work.
1.Add a host entry in your local /etc/hosts file for 192.168.0.3 like below
192.168.0.3 ftpserver
2.Next modify your .netrc file like this.
machine 192.168.0.3 login userA passwd passwordA
machine ftpserver login userB passwd passwordB
3.In your second script modify all the ipaddress with hostname ftpserver. Now, when the first script runs it will refer the first entry in your .netrc file. When the second script runs it will refer the second entry in your .netrc file.
But you should understand one thing that, when first script runs it is going to login to userA home directory and fetch the file. Same way, when second script runs it is going to login to userB home directory and fetch the file. You should make sure that the files are available on respective directories.
Hope this helps you.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2009 05:08 AM
тАО04-22-2009 05:08 AM
Re: run script
Any update on this? Have you tried and tested?
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2009 10:59 PM
тАО04-22-2009 10:59 PM
Re: run script
it works , really excellent and fantastic solution .