Page 1 of 1

UID and GID

Posted: Tue Sep 18, 2012 9:28 am
by srikanth.kallu
Hi,

Nagios is creating different UID and GID.

For example i have nagios UID is 213 on one server and 204 on other server

This happens same with the group.

Is there any way we can same UID and GID for nagios user and group on all the servers.

Re: UID and GID

Posted: Tue Sep 18, 2012 9:43 am
by lmiltchev
Are you talking about Nagios XI installer, or about agent installer - linux agent, etc.?

Nagios XI needs to be installed on a clean system, so if our installer finds an existing nagios user or group, it would bail out.
With the agent installers, I suppose the UIDs and GIDs are determined by checking the existing ones, and taking the "next available number". You may have different number of users on different servers, so the nagios UIDs and GIDs would be different as well.
What you can do is create these PRIOR to running the install script with the UIDs and GIDs that you want. This won't work with the Nagios XI installer, though. It will only work with agent installers.

Hope this helps.

Re: UID and GID

Posted: Tue Sep 18, 2012 10:03 am
by srikanth.kallu
Yes, i am talking about agent installer.

So now you want me to create nagios user and group with my own UID and GID in that way nagios agent installer will not create a user and goup because they already exist?

Re: UID and GID

Posted: Tue Sep 18, 2012 11:04 am
by lmiltchev
We've created an installer that uses "useradd" and "groupadd", which works fine. If you want to add nagios user and group yourself, set specific UIDs and GIDs, etc., you will have to do it on your own. I don't believe this has anything to do with troubleshooting issues on our end.

Re: UID and GID

Posted: Tue Sep 18, 2012 11:34 am
by srikanth.kallu
Please dont take me wrong,

I am not complaining that your installer is not working fine.

I am just asking for a advice/solution for how to have same UID and GID for nagios user and group in all the servers.

Is this not something i need to ask in the customer support forum ?

Sorry if my earlier posts do not convey this.

Thank You!

Re: UID and GID

Posted: Tue Sep 18, 2012 12:01 pm
by scottwilkerson
This is an acceptable place to ask, however the creation of the nagios user and group with the same uid and gid system wide is a problem you would need to solve on your own as there is no way for us to determine how you would go about doing that.

If you create the nagios user & group prior to running the installer on each machine the installer should use the user and group that already exists.

Re: UID and GID

Posted: Tue Sep 18, 2012 12:45 pm
by srikanth.kallu
Ok, I understand.

Do you think editing 1-usergroups to set to a particular user id will help in this case ?

Re: UID and GID

Posted: Tue Sep 18, 2012 1:12 pm
by scottwilkerson
Actually, I think this would probably be a pretty good idea in your situation. You could edit the file to your specifications and make a "new" tarball for use throughout your infrastructure.