errors creating users via rpm

Christian Haugan Toldnes christht@xxxxxxxxxxx
Wed Oct 19 09:44:53 CEST 2005


Olaf Rempel wrote:
> hi list
> 
> when running nscd and a package adds a user, the script will fail
> (nscd caches old passwd table):
> 
(...)
> 
> I think we must run 
> $ nscd -i passwd
> $ nscd -i group
> after creating users/groups and before using them in rpm scripts.
> (if nscd is running)

The problem is that the groups also needs to be added by the packages, 
so there are no 'before' and 'after', only 'during'.
The only way I can think to do this in rpm would be to:

1. add the group
2. if nscd is running: nscd -i group
3. add the user
4. if nscd is running: nscd -i passwd

And the same during package removal:
1. Remove the user
2. if nscd is running: nscd -i passwd
3. Remove the group
4. if nscd is running: nscd -i group

> Or is there a simpler way to avoid these errors (when running nscd)?

Could you try my suggestion to see if it works?


c




-- 
Christian H. Toldnes
Trustix Developer


More information about the tsl-contrib-discuss mailing list