From: Rick von Richter (rickv@mwh.com)
Date: Tue Jul 16 2002 - 19:01:23 EDT
Solaris 2.6 and 8
I did search thru all the archives and found nothing.
Problem:
If I run the command "rsh <server>" then run "echo $LOGNAME" I get my login
name. So far so good.
Some of my programmers want to run a program on a different server using a "rsh
<server> <program>" command.
The problem is that the LOGNAME variable on the remote server does not get set
when they do this.
On <server> I wrote a one line script "/z" which has this line in it;
echo "LOGNAME is "$LOGNAME
When I do "rsh <server> /z" I get "LOGNAME is "
Is there any way to set the remote LOGNAME when doing this type of command?
The LOGNAME variable is used by their program for tracking.
UPDATE:
While writing this email I found that the following seems to work.
I changed the /z script on <server> to be;
LOGNAME=$1 ; export LOGNAME
echo "LOGNAME is "$LOGNAME
I then use the command
# rsh <server> "/z $LOGNAME"
and I get "LOGNAME is dev" which is what I want.
So, is there a better way to do this?
TIAWS
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rick von Richter Production Support Manager Voice: 858-831-2222 rickv@mwh.com Maintenance Warehouse/Home Depot Fax: 858-831-2221 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The box says: Win98, WinNT or BETTER. That's why I installed Linux. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [demime 0.99c.7 removed an attachment of type text/x-vcard which had a name of rickv.vcf] _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:36 EDT