Last week I was working on libnss_map, aNSS library module to map user credentials to existent user in the system. This module is intended to be used in high virtualized environment like cloud computing or embedded systems which require a lot of users.
When a new user has been authenticated by PAM or other authentication mechanism, then the nss_map module create a virtual user when credentials mapped to an existent user. For example, suppose here are a user virtual, created a la standard way on /etc/passwd:
virtual:x:15000:15000:virtual user for nss_map:/dev/null:/sbin/nologin
Then edit the /etc/nssmap.conf
virtual:x:15000:15000:virtual user for nss_map:/home/virtual:/bin/bash
Note that the user directory is really a base dir in nssmap, each new user can search their home in
/home/virtual/logname, where logname is the name used by user to login, and the /home/virtual is the prefix setted in
As usual, you can get any of my projects from http://connectical.com/products