- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Using remsh to append to remote hosts file.
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
05-09-2001 06:04 AM
05-09-2001 06:04 AM
In order to add the entry remotely, I have created a script that adds the printer address and name remotely via remsh.
Here is the line:
remsh $server echo $1 $2 >> /etc/hosts
The variables are as follows:
$server - the remote server name
$1 - the printer address
$2 - the printer name
On the local machine, if I execute the same line, it adds the entry to hosts correctly.
The statement executes on the remote and completes with no errors but when I look at the remote hosts file, there is no entry in the file.
I have tried the line outside of the script and the same problem exists. I am thinking that it is a permissions problem
The script is run as root and all other remsh commands in the script execute with correct results. This is the only line that is not functioning correctly.
FYI: the .rhosts file on each machine contain entries for the local and remote machines.
Thanks,
Craig A. Sharp
Roush Industries, Inc.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2001 06:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2001 06:14 AM
05-09-2001 06:14 AM
Re: Using remsh to append to remote hosts file.
remsh $server echo $1 $2 >> /etc/hosts
executes "echo $1 $2" on the remote server and redirects output to the local file.
You should pass the redirection instruction to the remote machine, try:
remsh $server "echo $1 $2 >> /etc/hosts"
This will execute "echo $1 $2 >> /etc/hosts" on the remote server.
good luck,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2001 06:17 AM
05-09-2001 06:17 AM
Re: Using remsh to append to remote hosts file.
You need to ">>" the output redirection; unquoted is taken to mean on the local host; quoted on the remote.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2001 06:21 AM
05-09-2001 06:21 AM
Re: Using remsh to append to remote hosts file.
Craig