Should `apt remove` libnss-sss also be removing config? If so, shouldn't install re-add it every time?

Asked by Braden McGrath

While messing around with freeipa-client (and allowing apt to fulfill dependencies), I ran into what could be construed as a bug, but I'm not sure...

freeipa-client depends on sssd, which pulls in libnss-sss.

libnss-sss runs a postinst script that modifies /etc/nsswitch.conf and adds "sss" to many of the lines. (/var/lib/dpkg/info/libnss-sss:amd64.postinst)

After running `apt remove libnss-sss`, the same lines are modified again in /etc/nsswitch.conf to remove the changes.

If you then re-install libnss-sss, nsswitch.conf is NOT re-modified on subsequent installs.

My expectation: if config is changed *only* during initial install, then config should be left behind during a remove, and config only edited when the package is *purged*.

Hence, I think this is a bug or oversight? Unless there's some specific reason to want to remove "sss" from /etc/nsswitch.conf any time libnss-sss is removed (but not purged)... and if this is the case, then I'd think maybe the postinst script should be re-adding "sss" to nsswitch.conf on any install/reinstall (even if it wasn't purged).

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu sssd Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

I suggest you report a bug

Revision history for this message
Braden McGrath (zprime) said :
#2

Bug now filed and linked here, thank you for the confirmation that I'm not crazy. :)

Revision history for this message
Braden McGrath (zprime) said :
#3

Thanks actionparsnip, that solved my question.