How does rusers work?

How does rusers work?

Post by Brian E Smi » Sun, 04 Jul 1993 00:29:01



I am working on a test program for socket I/O where I am trying to find
the name of the user connected to a socket.  The system I am doing this
on is distributed so one user would be logged on (usually) to any one
workstation at a time.  I am able to get the IP address of the calling
machine using getpeername(), but I need to get the username as well.
I know rusers can give me this info, but I figured it would probably be
faster if I incorporated the rusers code into my own program instead of
shelling out to an rusers process.  So, does anyone out there know how
rusers works on a spcific machine?

+---------------------------------+------------------------------+
| Brian Smith                     |  "It's wonderous...but it's  |
| Computing Services              |   not for the timid." - Q    |
| UNC C*te                   |                              |

+---------------------------------+------------------------------+

 
 
 

How does rusers work?

Post by Ralph E. Bu » Sun, 04 Jul 1993 04:17:17



Quote:>I am working on a test program for socket I/O where I am trying to find
>the name of the user connected to a socket.  The system I am doing this
>on is distributed so one user would be logged on (usually) to any one
>workstation at a time.  I am able to get the IP address of the calling
>machine using getpeername(), but I need to get the username as well.
>I know rusers can give me this info, but I figured it would probably be
>faster if I incorporated the rusers code into my own program instead of
>shelling out to an rusers process.  So, does anyone out there know how
>rusers works on a spcific machine?

Well rusers uses RPC (ie Remote Procedure Calls) in which it contacts
a server and does a rusers() call which returns (in the parameter args)
a pointer to a structure of who's logged in...  and returns a 0 on a
succuessful query....

A look at /usr/include/rpcsvc/rnusers.x and the man pages for rnusers
(section 3) should help a bit... if your not familar with Sun RPC then
I suggest doing a man on rpcgen an portmapper (also rpc shouldn't hurt
either *smile*)

Hope that helps

--
+--------------------------------------------------+------------------------+

|word and a gun than you can with just a kind word.|Embry-Riddle Aero. Univ.|
+--------------------------------------------------+------------------------+

 
 
 

1. How to make pcmcia ethernet card that works with Linux work with dos? . .

Hello,

I realize this is probably not the right question for this group but anyway,
maybe somebody cares to help. . .

So, I have a notebook computer with these weird 6529 Cirrus Logic PCI sockets
(probe doesn't recognize them though cardmgr works OK) and I have this IC
ethernet card.

The latter works perfectly with Linux but I can't use it from dos.

I think it might work to enable this card from Linux (dos progs don't do that)
and then use some sort of packet driver from dos.  The card is said to be
compatible to some standard type, but well, all the drivers from crynwr
collection don't seem to work.

Anybody have ideas what I should try?

Thanks--

        --Lyosha

2. X vt100 function keys

3. HELP: Connectivity between DOS/DOS and DOS/Linux

4. Help on shell script please.

5. Problems with librpcsvc.a (rstat and rusers)

6. Help with diskless booting

7. How to do "rusers" on remote machines?

8. Help: Untar gcc compiler, but broken pipe

9. ruser

10. rusers - segmentation fault?

11. RUSERS=seg. fault?

12. Map+ 1.0 (graphical rusers)

13. rusers/ruserd question