bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

id with afs group error


From: Didi
Subject: id with afs group error
Date: Thu, 21 Feb 2008 09:52:38 +0100

Hello
I don't know if this is really a bug. But I would like to request some comments

On a system with afs, if you run

$ id -G
500 1102830893

you will get this very big number at the end.

$ id -G `whoami`
500

will not show this number. This is due to afs creating a group in
memory that is not in /etc/group . This of course becomes more
interesting if you run :

$ id -Gn
me id: cannot find name for group ID 1102830893
1102830893

groups behaves in the same way :
$ groups
me id: cannot find name for group ID 1102830893
1102830893

If you look into the id.c you can see why this is happening:
 if (argc - optind == 1)
    {
      struct passwd *pwd = getpwnam (argv[optind]); /* Will go of to
/etc/nsswitch.conf and appropriate*/
      if (pwd == NULL)
        error (EXIT_FAILURE, 0, _("%s: No such user"), argv[optind]);
      ruid = euid = pwd->pw_uid;
      rgid = egid = pwd->pw_gid;
    }
  else
    {
      euid = geteuid (); /* glibc will do this */
      ruid = getuid ();
      egid = getegid ();
      rgid = getgid ();
    }

This is very easy to fix. I have already done this and it works.

I am aware that this is actually a problem of afs and not coreutils.

FYI:
$ uname -a
Linux mypc 2.6.9-67.0.4.EL.cernsmp #1 SMP Mon Feb 4 10:15:50 CET 2008
x86_64 x86_64 x86_64 GNU/Linux

Hope this might help someone who is confused about that group :)

Cheers Didi

----
www.ribalba.de
Email / Jabber : address@hidden; address@hidden
Phone (Work) : +41 22 7679376
Skype : ribalba
Address : CERN / IT-FIO-FS; G21210; GENEVE




reply via email to

[Prev in Thread] Current Thread [Next in Thread]