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

Use the home directory and other user info from /etc/passwd #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rkday-pro
Copy link
Contributor

When using libnss-ato, we found that we were having to duplictate data - things like the username and home directory had to be specified in both libnss-ato.conf and in /etc/passwd.

This PR tweaks this to pull that data out of /etc/passwd, just using /etc/libnss-ato.conf for the UID of the all-in-one user.

I haven't made this configurable - are there use-cases where someone would want different data for a user than is in /etc/passwd?

@Strykar
Copy link

Strykar commented Aug 16, 2016

@rkd-msw I haven't made this configurable - are there use-cases where someone would want different data for a user than is in /etc/passwd?
Username and passwords from RADIUS for users with shell:/bin/false - they don't need or have a home directory.
The use case is to manage these non-shell user accounts and their passwords via RADIUS.
For a network-based database of users, you can use LDAP, or maybe MySQL or Postgres. Most RADIUS installations already use SQL or some db. This is a nice hack instead of a hypothetical libnss-radius.

@donapieppo
Copy link
Owner

Sorry for the delay, was on holiday. I like your idea but it made me think that maybe /etc/libnss-ato.conf should contain only the UID. It would be cleaner (even if not compatibe with old versions of libnss-ato). Whouldn't it?

@Strykar did you mean that this pull would breake something in your use case?

@rkday-pro
Copy link
Contributor Author

Yes, I think it would be reasonable for it to just have the UID (that's basically all we're using now), but that does mean back-compatibility problems. Maybe it could try and parse the file twice - once as one-UID-per-line, then in /etc/passwd format if that fails?

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

Successfully merging this pull request may close these issues.

3 participants