Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Honor nsswitch.conf in user/group related functions #48

Closed
kaharlichenko opened this issue Feb 13, 2012 · 1 comment
Closed

Honor nsswitch.conf in user/group related functions #48

kaharlichenko opened this issue Feb 13, 2012 · 1 comment

Comments

@kaharlichenko
Copy link

group_check, group_user_check and user_check functions shouldn't access /etc/passwd and /etc/group directly.

Instead they should rely on tools which honor /etc/nsswitch.conf such as getent passwd, getent groups, groups. This way these function will also pick users defined in e.g. LDAP or whatever backends admin configured in /etc/nsswitch.conf.

As far as I know useradd, usermod, groupadd and groupmod function honor /etc/nsswitch.conf if configured properly, so the rest of group_* and user_* functions can be left intact.

Also see #40 for discussion.

@sebastien
Copy link
Owner

Would you like to contribute a patch for that ?

davidmmiller added a commit to davidmmiller/cuisine that referenced this issue Apr 11, 2013
…e getent respects OS configs like nsswitch.conf - fixes issue sebastien#48
sebastien pushed a commit that referenced this issue Apr 11, 2013
fixes #48 - use getent for passwd and group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants