Newbie questions - SNMP

This is a discussion on Newbie questions - SNMP ; Hi all I have to newbie questions about SNMP. 1. Is it possible to get the user that is logged in via SNMP? 2. Is is possible to start and kill processes remotely via SNMP? Thanks in advance Angela...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Newbie questions

  1. Newbie questions

    Hi all

    I have to newbie questions about SNMP.
    1. Is it possible to get the user that is logged in via SNMP?
    2. Is is possible to start and kill processes remotely via SNMP?

    Thanks in advance
    Angela


  2. Re: Newbie questions

    Angela Stempfel wrote:

    > I have to newbie questions about SNMP.
    > 1. Is it possible to get the user that is logged in via SNMP?


    The standardized transport for SNMP is stateless and thus there is
    no such thing as a "user logged in via SNMP".

    > 2. Is is possible to start and kill processes remotely via SNMP?


    If you have a box with a MIB that supports this. The IETF standard
    MIBs do not allow you to do that (except the DISMAN-SCRIPT-MIB which
    allows to start and control the execution of so called scripts on
    managed devices, but which is not generally implemented on devices).

    /js

    --
    Juergen Schoenwaelder International University Bremen
    P.O. Box 750 561, 28725 Bremen, Germany

  3. Re: Newbie questions

    Hi

    Thanks for the tips, i'll try them! But i have another question. My
    friend told me that he can get via SNMP the user that is logged in.
    He uses Windows:

    1.3.6.1.4.1.77.1.2.25.1.1.4.71.97.115.116 Gast

    1.3.6.1.4.1.77.1.2.25.1.1.6.82.111.110.97.108.100 Ronald

    1.3.6.1.4.1.77.1.2.25.1.1.13.65.100.109.105.110.10 5.115.116.114.97.116.111.114
    Administrator

    1.3.6.1.4.1.77.1.4.1.0 ARBEITSGRUPPE

    The user is Ronald and the Group Administrator. Is it possible that
    this isn't working in LInux, only in Windows? or do i have to compile
    in another MIB?

    Thanks
    Angela

    Juergen Schoenwaelder wrote:
    > Angela Stempfel wrote:
    >
    >
    >>I have to newbie questions about SNMP.
    >>1. Is it possible to get the user that is logged in via SNMP?

    >
    >
    > The standardized transport for SNMP is stateless and thus there is
    > no such thing as a "user logged in via SNMP".
    >
    >
    >>2. Is is possible to start and kill processes remotely via SNMP?

    >
    >
    > If you have a box with a MIB that supports this. The IETF standard
    > MIBs do not allow you to do that (except the DISMAN-SCRIPT-MIB which
    > allows to start and control the execution of so called scripts on
    > managed devices, but which is not generally implemented on devices).
    >
    > /js
    >



  4. Re: Newbie questions

    Angela Stempfel wrote:

    > Thanks for the tips, i'll try them! But i have another question. My
    > friend told me that he can get via SNMP the user that is logged in.
    > He uses Windows:


    [...]

    > The user is Ronald and the Group Administrator. Is it possible that
    > this isn't working in LInux, only in Windows? or do i have to compile
    > in another MIB?


    The OIDs are from the LanMgr-Mib-II-MIB which is a proprietary Microsoft
    MIB and you can not expect this MIB to be available on non Microsoft
    platforms. I am not aware of a standard MIB which provides you this
    kind of information.

    /js

    --
    Juergen Schoenwaelder International University Bremen
    P.O. Box 750 561, 28725 Bremen, Germany

  5. Re: Newbie questions

    Hi

    >>2. Is is possible to start and kill processes remotely via SNMP?

    >
    >
    > If you have a box with a MIB that supports this. The IETF standard
    > MIBs do not allow you to do that (except the DISMAN-SCRIPT-MIB which
    > allows to start and control the execution of so called scripts on
    > managed devices, but which is not generally implemented on devices).
    >


    Do u know a example how i can test the execution of the scripts? or
    maybe u can give me a good link to a tutorial?

    Thanks
    Angela


  6. Re: Newbie questions

    Angela Stempfel wrote:

    > Do u know a example how i can test the execution of the scripts? or
    > maybe u can give me a good link to a tutorial?


    The MIB is defined in RFC 3165 and it contains descriptions of
    procedures how to start, stop, ... scripts. To test scripts, you
    can create a script function which emits smScriptException
    notifications so that you can "printf debugging" vi SNMP. But
    usually, it is faster to develop the scripts locally and once
    they are rather stable, you push them to boxes via the MIB
    described in RFC 3165. The scli program provides a rudimentary
    command line interface which hides all the SNMP interactions
    going on. But this really would benefit from some extensions
    to make it more useful.

    /js

    --
    Juergen Schoenwaelder International University Bremen
    P.O. Box 750 561, 28725 Bremen, Germany

  7. Re: Newbie questions

    Hello

    Thanks a lot for your fast answers. I'll take a look at these RFC's.
    I compiled the net-snmp new and compiled in the host and disman MIB.
    Now i tried to get something of the disman-script-mib:

    snmpwalk -v 1 -c public localhost 1.3.6.1.2.1.64.1

    But that outputs nothing (i got the id from here:
    http://www.mibdepot.com/cgi-bin/vend...inux&id=143922)
    Does that mean that i compiled something wrong or is it correct like
    that?

    Angela

    Juergen Schoenwaelder wrote:
    > Angela Stempfel wrote:
    >
    >
    >>Do u know a example how i can test the execution of the scripts? or
    >>maybe u can give me a good link to a tutorial?

    >
    >
    > The MIB is defined in RFC 3165 and it contains descriptions of
    > procedures how to start, stop, ... scripts. To test scripts, you
    > can create a script function which emits smScriptException
    > notifications so that you can "printf debugging" vi SNMP. But
    > usually, it is faster to develop the scripts locally and once
    > they are rather stable, you push them to boxes via the MIB
    > described in RFC 3165. The scli program provides a rudimentary
    > command line interface which hides all the SNMP interactions
    > going on. But this really would benefit from some extensions
    > to make it more useful.
    >
    > /js
    >



  8. Re: Newbie questions

    Angela Stempfel wrote:

    > Thanks a lot for your fast answers. I'll take a look at these RFC's.
    > I compiled the net-snmp new and compiled in the host and disman MIB.
    > Now i tried to get something of the disman-script-mib:


    I am not sure whether the DISMAN-SCRIPT-MIB is part of the net-snmp
    distribution.

    The home page of the Jasmin project in which an implementation was
    developed is at . And
    this implementation requires a special configuration file to define
    which language runtime systems you can use. See the project pages
    for more details.

    /js

    --
    Juergen Schoenwaelder International University Bremen
    P.O. Box 750 561, 28725 Bremen, Germany

  9. Re: Newbie questions

    Hi Jürgen

    my question about how the get the user that is logged in at the pc, i
    thought now to write an MIB Module for that. I think it should be
    possible that way?


    >
    > I am not sure whether the DISMAN-SCRIPT-MIB is part of the net-snmp
    > distribution.
    >
    > The home page of the Jasmin project in which an implementation was
    > developed is at . And
    > this implementation requires a special configuration file to define
    > which language runtime systems you can use. See the project pages
    > for more details.


    Today i tried to compile net-snmp with the DISMAN-SCRIPT-MIB, but i
    got the following errors (quite a lot):

    In file included from mibgroup/mib_module_includes.h:11,
    from snmp_vars.c:123:
    mibgroup/DISMAN-SCRIPT-MIB.h:1: error: syntax error before '-' token
    In file included from mibgroup/mib_module_includes.h:11,
    from snmp_vars.c:123:
    mibgroup/DISMAN-SCRIPT-MIB.h:21:73: missing terminating " character
    mibgroup/DISMAN-SCRIPT-MIB.h:22: error: syntax error at '@' token
    mibgroup/DISMAN-SCRIPT-MIB.h:31: error: syntax error at '@' token
    mibgroup/DISMAN-SCRIPT-MIB.h:39: error: syntax error at '@' token
    mibgroup/DISMAN-SCRIPT-MIB.h:47: error: syntax error at '@' token
    mibgroup/DISMAN-SCRIPT-MIB.h:48:417: missing terminating " character
    mibgroup/DISMAN-SCRIPT-MIB.h:50:402: missing terminating " character
    .....................

    Do you have any idea?

    Thank angela


  10. Re: Newbie questions

    Angela,
    No. A MIB is an interface specification that defines what management
    information is available from the managed network element (agent). Writing a
    MIB has no effect unless the agent supports the MIB. It's like legislation.
    You can write a law that says people will pay you money, or not hurt you,
    but if the people (agents) don't support that specification, you are out of
    luck. Sorry.

    Phil
    ps your original question was confusing because of your English grammar (not
    meant to be personally critical, please understand ). Juergen thought you
    were asking about logins to an SNMP session, but it's apparent from your
    examples that you wanted to know via SNMP who was logged into the computer.
    That is going to be computer dependent based on whether the SNMP agent in
    that computer supports a MIB OID for that information, as was already
    stated. You will not be able to coerce the answers by writing your own MIB
    because it will be irrelevant.


    "Angela Stempfel" wrote in message
    news:bm945r$k53in$1@ID-131893.news.uni-berlin.de...
    Hi Jürgen

    my question about how the get the user that is logged in at the pc, i
    thought now to write an MIB Module for that. I think it should be
    possible that way?

    Do you have any idea?

    Thank angela





+ Reply to Thread