Operating System - HP-UX
1833777 Members
2200 Online
110063 Solutions
New Discussion

Re: remsh syntax and use?

 
Victor Prasad
Occasional Advisor

remsh syntax and use?

Hello,

I have two servers. A and B (both hp9000s)

A has 1000 user on it wheras B has a few - 5.

I want users from server A to be able to print files from server B with remsh.

The files on B are in a general directory nothing too important here.

1) To make this happen - do all 1000 users have to be on server B .rhost file?

2) Any other ways of doing this - logging into one machine and printing files from another server?

Any comments or suggestions welcomed!

Thank you for your time!

V
Why doesn't this work....?
14 REPLIES 14
Hai Nguyen_1
Honored Contributor

Re: remsh syntax and use?

Victor,

Export the "general directory" on server B and nfs-mount it on server A.

Hai
Ashwani Kashyap
Honored Contributor

Re: remsh syntax and use?

.rhost file defines user equivalency on another host .

YOu can also use /etc/hosts.equiv file which defines host equivalency on another host . Do a man on hosts.equiv to get more information .

Remeber both .rhosts and hosts.equiv are security concern so use them very very carefully .

Alternately , you can configure printers on server B as remote printers on server A and users on server A can print to them without doing a remsh on server B .

If the printers are network printers you can configure them on server A and users can print locally .
S.K. Chan
Honored Contributor

Re: remsh syntax and use?

What about NFS mount the filesystem (fr serverB) onto serverA as read-only. That way it allows users in server A to access those files and print it. But of course the destination printer has to be configured/existed on server serverA.
Example : /opt/test on server B to be mounted as /opt/data on server A.
On server B
===========
# vi /etc/exports
/opt/test -anon=65534,ro,access=serverA
# exportfs -a
On server A
===========
# mkdir /opt/data
# vi /etc/fstab
serverB:/opt/test /opt/data nfs ro,suid 0 0
# mount -a

To answer your qs..
1) If you want all the 1000 users to be able to do that then the answer is yes. You can also use /etc/hosts.equiv for your purpose. Be very sure of its security implication. Do "man hosts.equiv" for details.
2) The NFS way that I mentioned above.
Deshpande Prashant
Honored Contributor

Re: remsh syntax and use?

HI
On Server B define one user (test1) for printing purpose and in this users home directory create .rhosts file with following entry
server A +

The "+" entry will allow all users from Server A to use remsh without any password.

So on Server A use
#remsh -l test1

Thanks.
Prashant Deshpande.
Take it as it comes.
Darrell Allen
Honored Contributor

Re: remsh syntax and use?

Hi Victor,

I think the NFS method is probably safest, especially if you mount it read-only.

I was thinking about the "serverA +" syntax for .rhosts but I didn't want to recommend it. It lets anyone (including hackers) login from serverA to serverB without a password. If you decide to use it, be sure to tightly lock down the serverB account.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
harry d brown jr
Honored Contributor

Re: remsh syntax and use?


rlp


live free or die
harry
Live Free or Die
Balaji N
Honored Contributor

Re: remsh syntax and use?

Hi,
1. If all you want is to access the files in Server B for printing, do an NFS mount of the particular directory to Server A
2. Alternate option is to create a dummy user on server B and and everyone from Server A logs into Server B and print the files.
3. If the printer is on server B and you want them to print from Server A, user Remote printing.

If all of them doesnt work, then you may be create a dummy user on Server B and then add an .rhosts entry with "ServerA +" for allowing remsh for all users in ServerA to ServerB. But beware of the consequences.

HTH
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Victor Prasad
Occasional Advisor

Re: remsh syntax and use?

Hello again!
Thank you for all those responded.

Is there no 'anonymous' remsh?
Or way around the
host.equiv/.rhosts?


The problem is we have 1000 users on server A - who will each be printing from potentially 1000 different printers - which all reside on A. The files needed are on B. I was hoping to find something that would let me just print the files needed on B. I could move them over - but the files on B are regenerated often - and I always want the most recent one. I would have to cron something to copy many files every 5 minutes or less to A.

Trying to find a less messy way.

Hoping someone out there has this experience. And there is no substitute for experience!

Any other suggestions or comments?

Thanks again!

V
Why doesn't this work....?
Shannon Petry
Honored Contributor

Re: remsh syntax and use?

No such thing as an anonymous remsh, must be a valid login ID.

As someone else mentioned though, why not setup B as the print server and A as the client? This will print what you need from B instead of A.
or
NFS mount the directory your files are in that need to be printed on B then print them from B?

Regards,
Shannon
Microsoft. When do you want a virus today?
Victor Prasad
Occasional Advisor

Re: remsh syntax and use?

Hello Shannon,

Thanks for the info.

Server A has all the printers locally on it - and there are about 200 printer or more. B does not any of those printers on them. The printers are setup via jetdirect cards. I do not want to setup the 200+ queues on B.

I am beginning to accept the move of the files to A.

Legacy systems - some work very well. But when it comes to changing them...ouch.

V
Why doesn't this work....?
Sanjay_6
Honored Contributor

Re: remsh syntax and use?

Hi,

I think what you should do is export this general directory on server B and then NFS mount it on server A.

Hope this helps.

Regds
Shannon Petry
Honored Contributor

Re: remsh syntax and use?

Another thought for the 2000 users is to setup NIS if there are no security problems. Then B can access the full passwd list from A(nis master) and you wont have to replicate anything.

While Im used to ypinit -m, I think SAM will do the complete setup for you including building the maps from files. No reboot will be necessary for NIS to be up and running.

Regards,
Shannon
Microsoft. When do you want a virus today?
Deshpande Prashant
Honored Contributor

Re: remsh syntax and use?

Hi
If users and printers both are on Server A and want to print files on Server B, why not NFS mount the directory containing the files to be printed.

Thanks.
Prashant.
Take it as it comes.
Steve Post
Trusted Contributor

Re: remsh syntax and use?

I would not use rlogin at all. It's too open. I wouldn't use NFS (for me), just because I never did it that way.

For my 2 cents, I would use remote printing. Server A just sends the print job to Server B. Server B just prints it out. But you don't like this idea because you have to create 200 printers? Well how about 2 printers, and one shell script?

1. get a list of all the printers.
Like "lpstat -t > printerlist".

2. get the commands to make a remote printer printer out of one of those printers.
It's been a while, so I would create a remote printer using sam, then look at sam's log file to see how I did it.

3. make a program to repeat this process for a 2nd printer. Run it, test it, verify it.

4. tweek the program to repeat this process for the other 200+ printers.

5. Run the one program. Now you have your 200+ printers.


All of these printers would be in the form.
printer xyz on server A is a remote printer to server B. The printer on server B is also called xyz.

steve