Re: Running master agent and subagent not as root

2008-07-02 Thread Dave Shield
2008/7/2 Joan Landry <[EMAIL PROTECTED]>:
> How do I change the port for _SNMP_ requests?

>> ./snmpd -f -Le 2

Dave

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: Running master agent and subagent not as root

2008-07-02 Thread Joan Landry
How do I change the port for _SNMP_ requests?


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Shield
Sent: Wednesday, July 02, 2008 9:20 AM
To: Joan Landry
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: Running master agent and subagent not as root

2008/7/2 Joan Landry <[EMAIL PROTECTED]>:
>>What command did you use to start the agent?
>
> ./snmpd -f -Le

That will be listening on port 161, which will fail

>>> If you specify a different (high-numbered) port when you start the 
>>> agent, then it should be OK.
>
> I do not know how to do this:

./snmpd -f -Le 2


> I tried:
> ./snmpd -f -Le -x 2

No - that specifies the _AgentX_ port
(which you're already setting in the config file).

The issue here is with the port for _SNMP_ requests.


Dave

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Running master agent and subagent not as root

2008-07-02 Thread Dave Shield
2008/7/2 Joan Landry <[EMAIL PROTECTED]>:
>>What command did you use to start the agent?
>
> ./snmpd -f -Le

That will be listening on port 161, which will fail

>>> If you specify a different (high-numbered) port when you start the
>>> agent, then it should be OK.
>
> I do not know how to do this:

./snmpd -f -Le 2


> I tried:
> ./snmpd -f -Le -x 2

No - that specifies the _AgentX_ port
(which you're already setting in the config file).

The issue here is with the port for _SNMP_ requests.


Dave

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: Running master agent and subagent not as root

2008-07-02 Thread Joan Landry
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Shield
Sent: Wednesday, July 02, 2008 8:33 AM
To: Joan Landry
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: Running master agent and subagent not as root

2008/7/2 Joan Landry <[EMAIL PROTECTED]>:
> However, I get a new error now when I try to run the master agent:
> agentx/master: initializing...
> agentx/master: initializing...   DONE
> Error opening specified endpoint ""
> Server Exiting with code 1
>
> Any ideas on what would cause this?

>What command did you use to start the agent?

./snmpd -f -Le 

>>By default, the agent will attempt to listen on UDP port 161, which it
can't do if it's running as a non-root user.

>>If you specify a different (high-numbered) port when you start the
agent, then it should be OK.

I do not know how to do this:
I tried:
./snmpd -f -Le -x 2

But I get the same error.

Can you give me an example of how to specify a different port?
Also, I am not sure if part of the problem is that because I am not
starting it up as root - the program fails because it can not write out
the config file to:
 /var/net-snmp/snmp.conf (as it would not have permissions to do this).

My problem is that I need to run the subagent as non root, and I am
under the impression that in order to run the subagent as non root the
master agent has to also run as non root.
Thanks for the help.

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Running master agent and subagent not as root

2008-07-02 Thread Dave Shield
2008/7/2 Joan Landry <[EMAIL PROTECTED]>:
> However, I get a new error now when I try to run the master agent:
> agentx/master: initializing...
> agentx/master: initializing...   DONE
> Error opening specified endpoint ""
> Server Exiting with code 1
>
> Any ideas on what would cause this?

What command did you use to start the agent?

By default, the agent will attempt to listen on UDP port 161,
which it can't do if it's running as a non-root user.

If you specify a different (high-numbered) port when
you start the agent, then it should be OK.

Dave

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: Running master agent and subagent not as root

2008-07-02 Thread Joan Landry
Thanks for the recommendations on what to try.
I removed the agentXperms and I did a chmod 755 on /tmp/agentx

Which helped get past the original error.
However, I get a new error now when I try to run the master agent:
agentx/master: initializing...
agentx/master: initializing...   DONE
Error opening specified endpoint ""
Server Exiting with code 1 

Any ideas on what would cause this?
Thanks for the help

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Shield
Sent: Wednesday, July 02, 2008 4:14 AM
To: Joan Landry
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: Running master agent and subagent not as root

>> Can anyone tell me how to run the master agent and the subagent not 
>> as root?
>>
>> I tried adding the following to snmpd.conf master agentx agentXSocket

>> /tmp/agentx/master agentXperms 0660 0550 nobody snmp

>> But get this error when I run the master agent:
>> agentx/master: initializing...
>> Error: Couldn't open a master agentx socket to listen on
>> (/tmp/agentx/master):
>
>I haven't tried this myself, but my first thought would be to
check if the /tmp/agentx directory exists..?


And if it does, check the permissions.

Another thing to try - what happens if you omit the "agentXperms" line?
If the agent is running as a user other than 'nobody', then it's
possible that it won't be able to create and/or use the socket, since
you are specifying an explicit user/group.
  It might work better with the default user/group.

Dave

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Running master agent and subagent not as root

2008-07-02 Thread Dave Shield
>> Can anyone tell me how to run the master agent and the subagent not as
>> root?
>>
>> I tried adding the following to snmpd.conf
>> master agentx
>> agentXSocket /tmp/agentx/master
>> agentXperms 0660 0550 nobody snmp

>> But get this error when I run the master agent:
>> agentx/master: initializing...
>> Error: Couldn't open a master agentx socket to listen on
>> (/tmp/agentx/master):
>
>I haven't tried this myself, but my first thought would be to check if 
> the /tmp/agentx directory exists..?


And if it does, check the permissions.

Another thing to try - what happens if you omit the "agentXperms" line?
If the agent is running as a user other than 'nobody', then it's possible
that it won't be able to create and/or use the socket, since you are
specifying an explicit user/group.
  It might work better with the default user/group.

Dave

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: Running master agent and subagent not as root

2008-07-01 Thread Mike Ayers
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Joan Landry
> Sent: Tuesday, July 01, 2008 4:12 PM

> Can anyone tell me how to run the master agent and the subagent not as
> root?
> 
> I tried adding the following to snmpd.conf
> master agentx
> agentXSocket /tmp/agentx/master
> agentXperms 0660 0550 nobody snmp
> 
> And I added this to the subagent:
> netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID,
> NETSNMP_DS_AGENT_X_SOCKET,
>   "/tmp/agentx/master");
> 
> But get this error when I run the master agent:
> agentx/master: initializing...
> Error: Couldn't open a master agentx socket to listen on
> (/tmp/agentx/master): 

I haven't tried this myself, but my first thought would be to check if 
the /tmp/agentx directory exists..?


HTH,

Mike

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users