Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running into problems some scripts extending snmp, which needs priviliges granted to one of the groups the user 'snmp' is in. However, it appears snmp 'drops' those group for some reason:

#!/bin/bash
id

Run from commandline as snmp:

# su - snmp
$ ./script.sh

Results in:

uid=108(snmp) gid=111(snmp) groups=111(snmp),103(othergroup)

But after restarting the snmp deamon, and running running snmpwalk from another server, the id returns something wholly different:

...."extrastats".2 = STRING: uid=108(snmp) gid=0(root) groups=111(snmp),0(root)

It seems that while snmpd is started with it's -u <snmp-user-id>, the related groups aren't used, only the primary. How can I get it to do this / get all of snmp's groups? Supplying just 1 of the extra groups with -g is a workaround for half the priviliges for now, but I'd rather have snmpd running as all needed groups if possible...

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.