2 users on the same server (rexec)


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users 2 users on the same server (rexec)
# 8  
Old 10-24-2005
Well, I hate to suggest this, because I don't like the solution... But you could have a .netrc.user1 and a .netrc.user2. The scripts would copy the right one to .netrc just before doing the rexec. Security-wise this is not much worse than a single .netrc file. But it creates a race condition. Two scripts running at the same time could step on one another.
# 9  
Old 10-25-2005
Thank you.

Yes, I thought about "parallel" .netrc files, but it's more than possible that at the same time other application should be run on the same server and it will require the "source" netrc.

Can you tell me please if some sense exists to have an alias for the remote server in /etc/hosts?
Something about:
IP-addr server-name
IP-addr server-alias
And to specify in .netrc server-name with one UserID and server-alias with other UserID?
Or rexec can not be tricked in such way and it will be sure that this IP-addr is connected to only server-name?

Anta
# 10  
Old 10-25-2005
I would be very surprised if you could fool the networking routines that easily. The targeted hostname will be converted to an IP address. Each line read from .netrc will also be converted to an IP address and the IP addresses are compared. If it is coded any other way, I would consider it broken. However if the box has 2 IP addresses that can reach it, you can have one line for each IP address.

A final thought: establish a second user id on the source server for the second application. Now each user has a .netrc file.
# 11  
Old 10-25-2005
Data

Thank you, Perderabo.

You confirmed my suspicions on name resolution.
Yes, there are some "roundabout" ways to solve the problem.
I just hoped the "direct" way exists too.

Anta
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Slow login with rexec.

Hi all, I´m replacing an old linux enterprise redhat 4.5 by a new one linux enterprise redhat 6. In both I use rexec as a communication between the front end and the user. In the old one, when the user connects, the communication establishes quickly (less than 3 sec). But in the new one, the... (1 Reply)
Discussion started by: mig28mx
1 Replies

2. UNIX for Advanced & Expert Users

Rexec Issue

Hi Team, I am executing some ksh scripts which inturn calls java files in AIX Environment. We have installed java6_64 which is in .profile. But when we execute from rexec its taking path from some different place that does not have java in $PATH variable. Can you please help me find out which... (2 Replies)
Discussion started by: balasubramani04
2 Replies

3. Red Hat

when users ftp to server the timezone reflected is UTC but the server is set to TZ in localtime

Guys, Need your help coz my server runs in local time GMT +8, but when client use ftp and login, the resulting timestamp seen in each file is in UTC format. We need to set that the time should be the same as GMT +8 when in ftp session. I am using RHEL 5.3. root@]# ll total 1740... (2 Replies)
Discussion started by: shtobias
2 Replies

4. AIX

rexec - other options?

Rexec executes commands one at a time on a remote host. The rexec command provides an automatic login feature by checking for a $HOME/.netrc file. User and password are stored in $HOME/.netrc. I would like to log on to another host and execute a script/command but not using $HOME/.netrc file,... (4 Replies)
Discussion started by: ioniCoder
4 Replies

5. UNIX for Dummies Questions & Answers

launching script via REXEC

Hi folks! my client uses an winapplication which is launching shell-scripts remotely on a HP-Unix Machine via Rexec. The application-configuration is launching the script (which is in the home directory of connecting user) like: rexec host user pass shell.sh So far so good, everything... (3 Replies)
Discussion started by: JohnMurdoch
3 Replies

6. UNIX for Advanced & Expert Users

reagrding REXEC command

Hi UNIX gurus..... have a doubt..can i run a script in a remote machine by using something like rexec add.corp.afg.com /aa/ss/remtescript I dont want to use the rsh command due to some security issues. thanx, rahul26 :) (2 Replies)
Discussion started by: rahul26
2 Replies

7. Solaris

Rexec

How is rexec enabled on a Solaris 8? How can I check if rexec is installed? (1 Reply)
Discussion started by: pmj1970
1 Replies

8. UNIX for Dummies Questions & Answers

Enabling Rexec ????

Can someone tell me how I would enable Rexec on a UNIX machine? And is the procedure different on the different systems - Solaris, HP-UX -etc. Thanks~!! mike (1 Reply)
Discussion started by: raichuu
1 Replies

9. Programming

rexec() function problem

Hi folks, I'm trying to make a reconnection algorithm using rexec(), but I noticed that when rexec() fails returning -1, it is impossible to make it run successfully again until you restart the program or the thread. Example, I have a endless loop for connection retries, if I supply a wrong... (7 Replies)
Discussion started by: lcmoreno
7 Replies

10. UNIX for Dummies Questions & Answers

expect (re: rexec)

In http://forums.unix.com/showthread.php?threadid=391 there is one statement called expect. but when I issue command whereis expect, respond from o/s only EXPECT: (only one world). I try to find it at /usr/bin, no expect statement there ? is it default unix o/s command ? I am using AIX on... (1 Reply)
Discussion started by: yatno
1 Replies
Login or Register to Ask a Question