[ This is a repost of an earlier question. ]
When I run pw2userdb in order to generate userdb entries that
correspond to my /etc/passwd file, two lines are generated for each
user. The first line is clearly a mapping between the user ID and
various attributes such as uid, gid, home directory, system
password, etc. But I'm curious about the purpose of the second
line, which looks like this:
NNNN= UUUU
where UUUU is the username and NNNN is the uid associated with that
username.
I presume that this line exists in addition to the "uid=UUUU" entry
in the first line so that there is a two-way mapping between
usernames and uid's (i.e., so that the username can be looked up by
uid as readily as the uid can be looked up by username).
But my question is this: for what does Courier use this reverse
uid=>username mapping? Can I leave this line out, or will something
critical break without it?
Assuming that this second line is indeed necessary, then I have
another related question:
For a hypothetical user named "user" at a virtual domain
"virtdomain.com", where "virtdomain.com" is in hosteddomains, I know
that the first line of the two-line combination in userdb should
look like this:
us...@virtdomain.com uid=1111|gid=1111|home=/home/user|[...]
But in this case, should the second line be number 1 or number 2?
1. 1111= user
2. 1111= us...@virtdomain.com
Thanks in advance.