LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   "Warning: add_groups: Invalid Argument" (https://www.linuxquestions.org/questions/linux-general-1/warning-add_groups-invalid-argument-426383/)

helliax 03-19-2006 05:41 PM

"Warning: add_groups: Invalid Argument"
 
I started getting this message after I added myself to some groups using KDE 3.5.1's User Manager. I've got Slackware -current. I boot up into the console, and then I login using my login name (not root), the line appears right after "Password: ". However, I don't get this message if I login as root.

I've looked at the files KDE User Manager modifies, and thhey're all the ones you'd expect, the /etc/groups, shadow, etc. I also added myself to some more user groups, and then tried to find any files modified under / in the past 2 minutes, but noen of them had any "add_groups" command in the contents.

So I was wondering, has anyoen else had this problem? There seems to be only one real result when searchign on google or this forum, and that one post never got answered.

gilead 03-19-2006 08:27 PM

If the user that you're logging in as is a member of many groups and if you take that user out of most of their groups the error goes away - then yes I've had that happen.

It wasn't triggered here by joining groups. It happened after I upgraded a PC from Slackware 10.2 to Slackware current several weeks ago. I took the user out of all but 3 groups (because of the word group in the error) and the error went away. Since it was a test box, I just noted that the error happened, but haven't had a chance to go back and find the cause.

I realise that doesn't help - unless taking the user out of groups makes it go away on your setup as well.

helliax 03-20-2006 01:43 AM

You're right, removing myself from the non-essential groups worked, and the message dissapaeared. However, when I readdded myself, so I can listen to audio, etc, the message reappeared.

gilead 03-20-2006 06:52 AM

One of the packages I upgraded at the time I noticed the problem was coreutils. In the TODO file under /usr/doc/coreutils-5.94 is the following:
Code:

Implement Ulrich Drepper's suggestion to use getgrouplist rather
  than getugroups.  This affects only `id', but makes a big difference
  on systems with many users and/or groups, and makes id usable once
  again on systems where access restrictions make getugroups fail.
  But first we'll need a run-test (either in an autoconf macro or at
  run time) to avoid the segfault bug in libc-2.3.2's getgrouplist.
  In that case, we'd revert to using a new (to-be-written) getgrouplist
  module that does most of what `id' already does.

I wondered if this was related to the problem so I tried to look up man getugroups but got nothing. However man getgrouplist does provide an entry and the man page does list a bug:
Code:

      The glibc 2.3.2 implementation of this function is broken: it overwrites memory when the actual number
      of groups is larger than *ngroups.

Perhaps the problem is related to this - but that's just a guess...


All times are GMT -5. The time now is 07:33 AM.