# Changes in /etc/group not recognised

**URL:** https://forums.suse.com/t/changes-in-etc-group-not-recognised/21796
**Category:** SLES Configure-Administer
**Created:** [September 6, 2011, 3:36pm UTC](https://forums.suse.com/t/changes-in-etc-group-not-recognised/21796 "2011-09-06T15:36:02Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![System1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@System1](https://forums.suse.com/u/System1)
#### Post date: [September 6, 2011, 3:36pm UTC](https://forums.suse.com/t/changes-in-etc-group-not-recognised/21796/1 "2011-09-06T15:36:02Z")

</div>

Hi,  
if I change an entry in /etc/group by simply editing the file the  
changes won’t get recognised. Is there any way to make the system  
recognise the changes?  
Changing groups with usermod -[R|A], works as expected, where is the  
difference to a simple edit?  
I just want to do a simple file synchronisation between machines.

System is SLES 11 (2.6.32.27-0.2 x86\_64)

Cheers,

Walter

## – Walter\_S

Walter\_S’s Profile: [http://forums.novell.com/member.php?userid=115997](http://forums.novell.com/member.php?userid=115997)  
View this thread: [http://forums.novell.com/showthread.php?t=444246](http://forums.novell.com/showthread.php?t=444246)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [September 6, 2011, 3:53pm UTC](https://forums.suse.com/t/changes-in-etc-group-not-recognised/21796/2 "2011-09-06T15:53:58Z")

</div>

On Tue, 06 Sep 2011 12:36:02 GMT  
Walter S [Walter\_S@no-mx.forums.novell.com](mailto:Walter_S@no-mx.forums.novell.com) wrote:  
[color=blue]

> Hi,  
> if I change an entry in /etc/group by simply editing the file the  
> changes won’t get recognised. Is there any way to make the system  
> recognise the changes?  
> Changing groups with usermod -[R|A], works as expected, where is the  
> difference to a simple edit?  
> I just want to do a simple file synchronisation between machines.
> 
> System is SLES 11 (2.6.32.27-0.2 x86\_64)
> 
> Cheers,
> 
> Walter
> 
> [/color]  
> Hi  
> If you use YaST instead, that will run the necessary routines to sync;

```auto
yast users
```

–  
Cheers Malcolm Â°Â¿Â° (Linux Counter #276890)  
openSUSE 11.4 (x86\_64) Kernel 2.6.37.6-0.7-desktop  
up 12:28, 3 users, load average: 0.10, 0.07, 0.06  
GPU GeForce 8600 GTS Silent - Driver Version: 280.13

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [September 6, 2011, 6:16pm UTC](https://forums.suse.com/t/changes-in-etc-group-not-recognised/21796/3 "2011-09-06T18:16:02Z")

</div>

malcolmlewis;2134744 Wrote:[color=blue]

> On Tue, 06 Sep 2011 12:36:02 GMT  
> Walter S [Walter\_S@no-mx.forums.novell.com](mailto:Walter_S@no-mx.forums.novell.com) wrote:  
> [color=green]
> 
> > Hi,  
> > if I change an entry in /etc/group by simply editing the file the  
> > changes won’t get recognised. Is there any way to make the system  
> > recognise the changes?  
> > Changing groups with usermod -[R|A], works as expected, where is the  
> > difference to a simple edit?  
> > I just want to do a simple file synchronisation between machines.
> > 
> > System is SLES 11 (2.6.32.27-0.2 x86\_64)
> > 
> > Cheers,
> > 
> > Walter
> > 
> > [/color]  
> > Hi  
> > If you use YaST instead, that will run the necessary routines to sync;[color=green]  
> > [/color][/color]  
> > Code:  
> > --------------------[color=blue][color=green]  
> > [/color]  
> > yast users  
> > [/color]  
> > --------------------[color=blue][color=green]  
> > [/color]
> 
> Hi Malcolm,  
> I’m sorry, but this is not helpful. How would using yast2 be a  
> solution for a (automated) synchronisation between machines? As I  
> wrote in my OP I don’t have a problem with changing users’ groups  
> (it’s faster and easier with usermod, BTW), it is just that SLES is  
> behaving strangely and I am searching for a solution or explanation to  
> that.
> 
> Cheers,
> 
> Walter
> 
> P.S.  
> yast2 is incredibly slow. Just listing users \>[/color]  
> Code:  
> --------------------[color=blue][color=green]
> 
> > yast2 --ncurses users list[/color][/color]  
> > --------------------[color=blue][color=green]  
> > takes more than a second, whereas \>[/color][/color]  
> > Code:  
> > --------------------[color=blue][color=green]  
> > awk -F: ‘$3 \>= 1000 && $3 \<= 6000’ /etc/passwd[/color][/color]  
> > --------------------[color=blue][color=green]  
> > takes 0.001 seconds. Even a more universal \>[/color][/color]  
> > Code:  
> > --------------------[color=blue][color=green]  
> > GID\_MIN=$(awk ‘/\[1\]\*GID\_MIN/ {print $NF}’ /etc/login.defs);\[/color]  
> > GID\_MAX=$(awk ‘/\[2\]\*GID\_MAX/ {print $NF}’ /etc/login.defs);\  
> > awk -F: ‘$3 \>= ‘“$GID\_MIN”’ && $3 \<= ‘“$GID\_MAX”’’ /etc/passwd[/color]  
> > --------------------[color=blue][color=green]  
> > would take only 0.007 seconds. Try this in a landscape with 100+[/color]  
> > machines on every machine and you’ll see what I mean.  
> > W.[/color]

## – Walter\_S

Walter\_S’s Profile: [http://forums.novell.com/member.php?userid=115997](http://forums.novell.com/member.php?userid=115997)  
View this thread: [http://forums.novell.com/showthread.php?t=444246](http://forums.novell.com/showthread.php?t=444246)

* * *

1. :blank: 

2. :blank:

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [September 6, 2011, 8:16pm UTC](https://forums.suse.com/t/changes-in-etc-group-not-recognised/21796/4 "2011-09-06T20:16:01Z")

</div>

On Tue, 06 Sep 2011 15:16:02 GMT  
Walter S [Walter\_S@no-mx.forums.novell.com](mailto:Walter_S@no-mx.forums.novell.com) wrote:  
[color=blue]

> malcolmlewis;2134744 Wrote:[color=green]
> 
> > On Tue, 06 Sep 2011 12:36:02 GMT  
> > Walter S [Walter\_S@no-mx.forums.novell.com](mailto:Walter_S@no-mx.forums.novell.com) wrote:  
> > [color=darkred]
> > 
> > > Hi,  
> > > if I change an entry in /etc/group by simply editing the file the  
> > > changes won’t get recognised. Is there any way to make the system  
> > > recognise the changes?  
> > > Changing groups with usermod -[R|A], works as expected, where is  
> > > the difference to a simple edit?  
> > > I just want to do a simple file synchronisation between machines.
> > > 
> > > System is SLES 11 (2.6.32.27-0.2 x86\_64)
> > > 
> > > Cheers,
> > > 
> > > Walter
> > > 
> > > [/color]  
> > > Hi  
> > > If you use YaST instead, that will run the necessary routines to  
> > > sync;[color=darkred]  
> > > [/color][/color]  
> > > Code:  
> > > --------------------[color=green][color=darkred]  
> > > [/color]  
> > > yast users  
> > > [/color]  
> > > --------------------[color=green][color=darkred]  
> > > [/color]
> > 
> > Hi Malcolm,  
> > I’m sorry, but this is not helpful. How would using yast2 be a  
> > solution for a (automated) synchronisation between machines? As I  
> > wrote in my OP I don’t have a problem with changing users’ groups  
> > (it’s faster and easier with usermod, BTW), it is just that SLES is  
> > behaving strangely and I am searching for a solution or explanation  
> > to that.
> > 
> > Cheers,
> > 
> > Walter
> > 
> > P.S.  
> > yast2 is incredibly slow. Just listing users \>[/color]  
> > Code:  
> > --------------------[color=green][color=darkred]
> > 
> > > yast2 --ncurses users list[/color][/color]  
> > > --------------------[color=green][color=darkred]  
> > > takes more than a second, whereas \>[/color][/color]  
> > > Code:  
> > > --------------------[color=green][color=darkred]  
> > > awk -F: ‘$3 \>= 1000 && $3 \<= 6000’ /etc/passwd[/color][/color]  
> > > --------------------[color=green][color=darkred]  
> > > takes 0.001 seconds. Even a more universal \>[/color][/color]  
> > > Code:  
> > > --------------------[color=green][color=darkred]  
> > > GID\_MIN=$(awk ‘/\[1\]\*GID\_MIN/ {print  
> > > $NF}’ /etc/login.defs);\[/color]  
> > > GID\_MAX=$(awk ‘/\[2\]\*GID\_MAX/ {print  
> > > $NF}’ /etc/login.defs);\ awk -F: ‘$3 \>= ‘“$GID\_MIN”’ && $3 \<=  
> > > ‘“$GID\_MAX”’’ /etc/passwd[/color]  
> > > --------------------[color=green][color=darkred]  
> > > would take only 0.007 seconds. Try this in a landscape with 100+[/color]  
> > > machines on every machine and you’ll see what I mean.  
> > > W.[/color]
> 
> [/color]  
> Hi  
> If you look at the man page for groups;

```auto
BUGS
As the 4.2BSD initgroups(3) man page says: No-one seems to
keep /etc/group up-to-date.
```

What if you use vigr and grpck commands, they may cause an update, but  
have a feeling your hitting the above bug.

–  
Cheers Malcolm Â°Â¿Â° (Linux Counter #276890)  
openSUSE 11.4 (x86\_64) Kernel 2.6.37.6-0.7-desktop  
up 16:47, 6 users, load average: 0.09, 0.13, 0.14  
GPU GeForce 8600 GTS Silent - Driver Version: 280.13

* * *

1. :blank: 

2. :blank:

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [September 7, 2011, 9:56am UTC](https://forums.suse.com/t/changes-in-etc-group-not-recognised/21796/5 "2011-09-07T09:56:01Z")

</div>

malcolmlewis;2134863 Wrote:[color=blue]

> On Tue, 06 Sep 2011 15:16:02 GMT  
> […]  
> Hi  
> If you look at the man page for groups;[color=green]
> 
> > [/color][/color]  
> > Code:  
> > --------------------[color=blue][color=green]  
> > [/color]  
> > BUGS  
> > As the 4.2BSD initgroups(3) man page says: No-one seems to  
> > keep /etc/group up-to-date.  
> > [/color]  
> > --------------------[color=blue][color=green]  
> > [/color]  
> > What if you use vigr and grpck commands, they may cause an update,  
> > but  
> > have a feeling your hitting the above bug.  
> > [/color]  
> > Alas, nether grpck or vigroup has any effect on a user’s group  
> > membership.  
> > But I’ve just found the culprit: it’s nscd, the name service cache  
> > daemon. Even when restarted after changes in /etc/group it will restore  
> > the previous state.  
> > Changing

## Code:

## enable-cache group yes

to

## Code:

## enable-cache group no

in /etc/nscd.conf and restarting nscd solved my problem.  
So I’ve only to roll out the changed configuration and restart nscd on  
all machines and my synchronisation goes as planned. 🙂  
Thanks for your time,

Walter

## – Walter\_S

Walter\_S’s Profile: [http://forums.novell.com/member.php?userid=115997](http://forums.novell.com/member.php?userid=115997)  
View this thread: [http://forums.novell.com/showthread.php?t=444246](http://forums.novell.com/showthread.php?t=444246)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [September 9, 2011, 5:06pm UTC](https://forums.suse.com/t/changes-in-etc-group-not-recognised/21796/6 "2011-09-09T17:06:02Z")

</div>

Hi Walter,

instead of disabling caching completely, you might just tell nscd to  
reload the groups… unless you have other reasons to disable nscd,  
too.

:~ # nscd --help

Usage: nscd [OPTION…]

Name Service Cache Daemon.

-d, --debug Do not fork and display messages on the  
current

tty

-f, --config-file=NAME Read configuration data from NAME

-g, --statistics Print current configuration statistics

_-i, --invalidate=TABLE Invalidate the specified cache_

-K, --shutdown Shut the server down

-t, --nthreads=NUMBER Start NUMBER threads

-?, --help Give this help list

–usage Give a short usage message

-V, --version Print program version

Mandatory or optional arguments to long options are also mandatory or  
optional

for any corresponding short options.

Regards,  
Jens

## – from the times when today’s “old school” was “new school” :eek:

jmozdzen’s Profile: [http://forums.novell.com/member.php?userid=32246](http://forums.novell.com/member.php?userid=32246)  
View this thread: [http://forums.novell.com/showthread.php?t=444246](http://forums.novell.com/showthread.php?t=444246)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)
#### Post date: [September 12, 2011, 9:56am UTC](https://forums.suse.com/t/changes-in-etc-group-not-recognised/21796/7 "2011-09-12T09:56:02Z")

</div>

jmozdzen;2135943 Wrote:[color=blue]

> Hi Walter,  
> instead of disabling caching completely, you might just tell nscd to  
> reload the groups… unless you have other reasons to disable nscd,  
> too.  
> […][/color]

As I said, simply restarting/reloading nscd won’t help. And as I see no  
advantage in credential caching in our current environment it’s more  
convenient for me to disable it.

Cheers,

Walter

## – Walter\_S

Walter\_S’s Profile: [http://forums.novell.com/member.php?userid=115997](http://forums.novell.com/member.php?userid=115997)  
View this thread: [http://forums.novell.com/showthread.php?t=444246](http://forums.novell.com/showthread.php?t=444246)
