LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   is there a /etc/group cache? (https://www.linuxquestions.org/questions/linux-general-1/is-there-a-etc-group-cache-744771/)

gearoid_murphy 08-03-2009 10:25 AM

is there a /etc/group cache?
 
Hello,

can anybody tell me if there is a group cache, I ask this because I have just updated my group membership using usermod, specifically, in a root shell, I have granted myself access to the "disk" group on my machine, like so: "usermod -G dialout,audio,video,games,wheel,disk gmurphy"

Still as root, I validate with the command: "groups gmurphy", producing this output: "gmurphy disk dialout audio video games wheel".

So far, so good, but when I revert back to a normal shell and use the command: "groups", the output indicates that I have not been placed in the "disk" group: "gmurphy dialout audio video games wheel"

In the same shell, when I explicitly specify my username with the groups command like so: "groups gmurphy", it gives the correct output: "gmurphy disk dialout audio video games wheel"

The program that requires access to the disk group is still not functioning so it must be using the faulty information as well.


I have run into this problem before but I was in a hurry and just rebooted the machine (i'll probably do the same thing now ;-) ) but there must be a solution for this, does anyone know?

acid_kewpie 08-03-2009 10:37 AM

Yes, there is a cache, if you're running the nscd server, BUT groups are assigned when an environment starts, and don't change outside of the environment that changes one until a new one is started. So you're seeing correct behaviour, just log out and in again.


All times are GMT -5. The time now is 05:41 AM.