Is there a way to find the name of the machine I am on?

Is there a way to find the name of the machine I am on?

Post by Calvin Bolwe » Fri, 25 Dec 1992 22:38:32



I am looking for a way to find the internet name of the machine
that I am logged in on.  We have a few PC's connected to the
network and a few remote RS/6000's.  I am attempting to
standardize the login procedure and different actions need to be
taken depending on whether the user is logging on from a PC or an
RS/6000 (like running xinit).

Any help would be greatly appreciated!!!!

 
 
 

Is there a way to find the name of the machine I am on?

Post by Ronald S. Wo » Sat, 26 Dec 1992 03:57:20



>I am looking for a way to find the internet name of the machine
>that I am logged in on.  We have a few PC's connected to the
>network and a few remote RS/6000's.  I am attempting to
>standardize the login procedure and different actions need to be
>taken depending on whether the user is logging on from a PC or an
>RS/6000 (like running xinit).

At first, I thought you just meant the hostname command. I think you
can at the very least use the tty command to determine if you are
logging in at the console for the xinit though I suppose this doesn't
help you if you use X stations that need xinit (then again with X
stations you can also test the XSTATION environemnt variable).

--
+-----All Views Expressed Are My Own And Are Not Necessarily Shared By------+
+------------------------------My Employer----------------------------------+

+ other email addresses             Prodigy: XTCR74A Compuserve: 73530,2537 +

 
 
 

Is there a way to find the name of the machine I am on?

Post by Brad Konop » Sun, 17 Jan 1993 03:11:54



>I am looking for a way to find the internet name of the machine
>that I am logged in on.  We have a few PC's connected to the
>network and a few remote RS/6000's.  I am attempting to
>standardize the login procedure and different actions need to be
>taken depending on whether the user is logging on from a PC or an
>RS/6000 (like running xinit).

>Any help would be greatly appreciated!!!!

Inside a secondary authentication program I helped develop, we attempt to
determine how the user is logging in.  Check out the tty name (if you
decide to do special stuff on a per port basis):

    if (!(tty = ttyname(2)))
        exit(-1);       /* no tty...impossible, bail out */

Check out the remote host name (if any):

    pid = getppid();
    do {
        if (!(ut = getutent()))
            exit(0);
    } while (ut->ut_pid != pid);

    if (!(*ut->ut_host))
        exit(0);        /* no host...not coming in from the network */

--

   uunet: uunet!austin.ibm.com!konopik    |  IBM AIX Porting Center
 ibmvnet: KONOPIK at AUSTIN               |  Austin, Texas

 
 
 

1. This clone thing...am I stupid, or am I right?


says...

I admire your passion, Chris..

The only issues which have kept myself from looking seriously at Linux
would be:

* It's Unix and the learning curve to start getting productive strikes me
as probably very steep

* It doesn't support plug-and-play.  If your hardware doesn't have Linux
drivers, it don't play..

* Not nearly the amount of developers out there doing stuff for Linux as
there are for Wintel.  Can I get MS Office for Linux?  Can I get
Photoshop for Linux?  Can I get QuarkXpress for Linux? etc.. a big turn
off for me.

--
Reuben King
Email: "reuben at texas dot net" (in plain english to foil spam-bots.
grrr!)

2. How Do you print Landscape on HP 9000 800 series

3. Free Motif - Buying a License?

4. I am with the following error, when i am running lilo...

5. Help !! -2 cards - Routing problem

6. Am I touchy? Or am I right?

7. XFree-3.1.2 Screen misalignment

8. Am I seeing IPv5, or am I hallucinating?

9. I am buying an Ultra 5 but am lost in part numbers ....

10. I am in text mode, what browser am I running....

11. I am si**y am I?

12. I am unable to ping to a machine