On Sun, Jul 05, 2009 at 07:45:31PM +1000, Barney Desmond wrote: > > "The command "getent passwd <user>" returns the expected values for both > > users. However > > "postmap -q <user> unix:passwd.byname" returns a result only for user pms. > > This is expected - [...]
No, this is not "expected". The "passwd.byname" lookup result is exactly the result of the C-library getpwnam(3). If this is not working, that's the problem. The output of getent passwd user and postmap -q user unix:passwd.byname must be the same, or the underlying system is broken in some fashion. The example below shows the two commands producing *identical* output, hence a count of "2" from "uniq -c": $ (getent passwd viktor postmap -q viktor unix:passwd.byname) | sort | uniq -c | awk '{print $1}' 2 The tests must be done as a non-root user to make sure that file permissions don't restrict getpwnam(3) to the super-user. -- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the "Reply-To" header. To unsubscribe from the postfix-users list, visit http://www.postfix.org/lists.html or click the link below: <mailto:majord...@postfix.org?body=unsubscribe%20postfix-users> If my response solves your problem, the best way to thank me is to not send an "it worked, thanks" follow-up. If you must respond, please put "It worked, thanks" in the "Subject" so I can delete these quickly.