PPTP "Who" command - how? - PPP

This is a discussion on PPTP "Who" command - how? - PPP ; Hiya I'm currently trying to figure out a way to find out who is currently logged on via PPTP. I've gotten as far as getting a list of connections, but cannot figure out how to get the _username_ attached to ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: PPTP "Who" command - how?

  1. PPTP "Who" command - how?

    Hiya

    I'm currently trying to figure out a way to find out who is currently logged
    on via PPTP. I've gotten as far as getting a list of connections, but
    cannot figure out how to get the _username_ attached to that connection...

    Simple script here:
    #!/bin/bash
    /bin/ps -eo pid,bsdstart,cmd|/bin/grep "pptpd \["|while read line
    do
    VPNPID=`echo $line|cut -d\ -f1`
    VPNSTART=`echo $line|cut -d\ -f2`
    VPNINFO=`echo $line|cut -d\ -f4-`
    echo $VPNPID $VPNSTART $VPNINFO
    done


    But where do i get the usernames? I have the PID, the remote end IP... now
    what?

    J

  2. Re: PPTP "Who" command - how?

    In article <89adna5YNaIzQ57fRVn-2g@comcast.com>, Jennifer Smith wrote:

    >I'm currently trying to figure out a way to find out who is currently logged
    >on via PPTP. I've gotten as far as getting a list of connections, but
    >cannot figure out how to get the _username_ attached to that connection...


    Well, it would have been nice to have some clue what operating system you
    are using.

    >Simple script here:
    >#!/bin/bash


    Possibly some form of Unix

    >/bin/ps -eo pid,bsdstart,cmd|/bin/grep "pptpd \["|while read line
    >do


    man ps does your version have the 'w' switch? (ps -eow)

    >But where do i get the usernames? I have the PID, the remote end IP... now
    >what?


    If not, run a more normal ps and grep for the PID. What _that_ set of
    options might be depends on which sex of Unix you are running (BSD vs SysV)
    as well as which flavor within that branch.

    Old guy


  3. Re: PPTP "Who" command - how?

    Hi Moe

    Moe Trin wrote:

    > In article <89adna5YNaIzQ57fRVn-2g@comcast.com>, Jennifer Smith wrote:
    >
    >>I'm currently trying to figure out a way to find out who is currently
    >>logged on via PPTP. I've gotten as far as getting a list of connections,
    >>but cannot figure out how to get the _username_ attached to that
    >>connection...

    >
    > Well, it would have been nice to have some clue what operating system you
    > are using.


    Sorry. Slackware Linux 10.0 was the original install, but not much of the
    original install is left.
    PPP is v.2.4.2b2 (probably with some patches)
    PPTP is PoPToP v1.1.4-b4 (definitely with some patches)

    >>Simple script here:
    >>#!/bin/bash

    >
    > Possibly some form of Unix
    >
    >>/bin/ps -eo pid,bsdstart,cmd|/bin/grep "pptpd \["|while read line
    >>do

    >
    > man ps does your version have the 'w' switch? (ps -eow)


    Not in combination with -eo ... -w gives the info in "wide" format, i.e. not
    clipped at EOL.

    >>But where do i get the usernames? I have the PID, the remote end IP... now
    >>what?

    >
    > If not, run a more normal ps and grep for the PID. What _that_ set of
    > options might be depends on which sex of Unix you are running (BSD vs
    > SysV) as well as which flavor within that branch.


    Well, the info I can get is this:
    22146 Feb 4 pptpd [1.2.3.4:8000 - 9E80]
    22147 Feb 4 pptpd [2.3.4.5:0000 - 9F00]
    [...lots more, same syntax...]

    PID, Start time, service name, in brackets the public remote IP, after
    that... no idea what that's for.


    Thanks for your feedback

    J

  4. Re: PPTP "Who" command - how?

    In article , Jennifer Smith wrote:

    >Sorry. Slackware Linux 10.0 was the original install, but not much of the
    >original install is left.
    >PPP is v.2.4.2b2 (probably with some patches)
    >PPTP is PoPToP v1.1.4-b4 (definitely with some patches)


    Which version of 'ps' (I think it's part of 'procps')? You had said

    >>>/bin/ps -eo pid,bsdstart,cmd|/bin/grep "pptpd \["|while read line


    and the version of ps I have complains when I include the dash

    [compton ~]$ ps -eo
    warning: `-' deprecated; use `ps eo', not `ps -eo'
    PID TTY STAT TIME COMMAND

    >Not in combination with -eo ... -w gives the info in "wide" format, i.e. not
    >clipped at EOL.


    OK, I'm not running pptp, but my old version of ps accepts

    [compton ~]$ ps eouw
    USER PID %CPU %MEM SIZE RSS TTY STAT START TIME COMMAND

    and that _looks_ to include the same data I see with a -eo.

    >PID, Start time, service name, in brackets the public remote IP, after
    >that... no idea what that's for.


    I'm not running pptp, so I can't explain it either. Sorry.

    Old guy


  5. Re: PPTP "Who" command - how?

    If you're using Poptop, you can use the log-wtmp feature which will
    stick the online user list in the output of 'last' and 'who', etc.
    Probably what you're wanting.

    The ideal way would be to use a tool that reads in the pppd2.tdb file
    and gets the info from there. I'm working on a tool in Perl using
    TDB_File that will hopefully do just this...

    Another idea is to log the information you need in the ip-up.local
    script (PEERNAME, etc) somewhere (database?) and generate a utility to
    display this information.

    Yet another idea is to have your Radius server do all this if you're
    using the Radius plugins.


  6. Re: PPTP "Who" command - how?

    Ray Van Dolson wrote:

    > If you're using Poptop, you can use the log-wtmp feature which will
    > stick the online user list in the output of 'last' and 'who', etc.
    > Probably what you're wanting.


    That sounds like a great way to do it. I've failed to locate that though...
    it does not seem to be a pptpd.conf option, nor a compile flag...? How do I
    enable that in Poptop?

    Thanks
    J

  7. Re: PPTP "Who" command - how?

    Well you mentioned you were running Poptop 1.1.4. It's probably not
    available in that version. I'd recommend upgrading to Poptop 1.2.2
    (and maybe PPP 2.4.3 while you're at it). You should see the option
    under ./configure --help.

    Try the poptop-server mailing list as well.


+ Reply to Thread