When I say "Domains", I don't mean DNS domains, but merely unique strings that identify a domain-set of users. This might include DNS domains, but it would not be limited to them.
This would mean that software that wished to authenticate users (such as MySQL), but didn't wish to create local users would have a mechanism for doing so. Then we wouldn't end up with 101 different authentication systems like we have now.
It might also be an idea to allow a chroot to be associated with each domain, so that each domain can have a sandbox in which their users may play.
This would be useful in that a web server could receive a username/password from a user, and then call this function. A user's permissions would then be in effect, and the web server could access the user's files, but not the files of other users.
Some examples might be:
local:0:local:/:/etc mysql:1:mysql:/chroots/mysql:/etc example.com:2:web:/chroots/web/example.com:/etcAny user belonging to some special group should be allowed to administer the group, creating users, changing passwords, and the like
As UIDs would only be unique to a domain, and not across domains, it would be necessary to record a domain ID with the User ID. So users not in /etc/passwd on the root system should not be allowed to write to any filesystem that does not support domains.
The problem with the idea is that it would require a whole new set of function calls, and then the existing function calls (ie. getent and the like) would have to be mapped onto the new calls. I still think it's a good idea, though.