-   Linux - Enterprise (
-   -   running /usr/bin/groups <super user> returns void (

Ron_09 09-02-2009 04:03 AM

running /usr/bin/groups <super user> returns void

I am running /usr/bin/groups root to know all the groups root is present but it is not returning any info as below (running as root):-
# /usr/bin/groups root

But when i ran for non root user (not super user) it returns properly.
# /usr/bin/groups nobody
nobody : nobody

I have seen when I don't specify user and run command from root it returns correct info.

# /usr/bin/groups
root bin daemon sys adm disk wheel

While analyzing I saw /usr/bin/groups is a script when we execute
# /usr/bin/groups root
it internally calls "id -Gn -- root" which is crashing on linux 3.0 update 8.

Here is the output in my box:-
# id -Gn -- root
Segmentation fault

It runs fine for non root user as below:-

# id -Gn -- nobody

On further analyzing I see that if root is member of more than 4 groups
#id -Gn -- root will crash.

So I created another super user named aroot which is present in only 4 groups it does not crash as below:-

# id -Gn -- aroot
root bin daemon sys

When I add aroot to one more group it crashes as in the case of root.
Looks some buffer overflow issue in /usr/bin/id.

Here is my system details:-

# uname -a
Linux 2.4.21-47.ELsmp #1 SMP Wed Jul 5 20:30:47 EDT 2006 i686 athlon i386 GNU/Linux

# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 3 (Taroon Update 8)

part of my /etc/group file:-

# cat /etc/group


Due to this issue I am not able to install my program on linux AS 3.0.
Need some urgent help.


In fact it does not have anything to do with super user. If user is subscribed to more than 4 groups
then /usr/bin/id starts crashing. Any info on it?


Any help or opinion on the above. I am stuck for this problem as i can't avoid this part of the code.
it is a third party code. Will appreciate suggestion (if any). I hope there is a solution here.

- Ron

chrism01 09-04-2009 12:25 AM

So which distro is this? I'm guessing from 'linux AS 3.0.' its RHEL AS 3.x, in which case phone them and ask and /or search the RH KB.
It may even be a known bug, try their Bugzilla or just google.

Please add your distro & ver to your profile in future.
PS if it is RedHat, then

cat /etc/redhat/release

will do the job

Ron_09 09-07-2009 01:28 AM


Yes it is RedHat 3.0. I already put
# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 3 (Taroon Update 8)

Probably you missed it as posting is bit long.

Any url for their bugzilla?
It looks it is a bug as I saw some other reference while googling.
Not sure how to resolve it.


chrism01 09-11-2009 02:07 AM or phone them if you've got a subscription (ie current license).
RHEL 3.8 is pretty old, they're on 5.4 now.
According to this you're already in phase 3 support with only 1 yr till no support...

Ron_09 09-15-2009 07:48 AM

Thanks Chris.
Your information helped a lot. There is a Redhat bug (200327) that got resolved in coreutils-4.5.3-28.7.

All times are GMT -5. The time now is 12:14 PM.