Search the web
Sign In
New User? Sign Up
postfix-users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
local users: /etc/passwd vs ldap   Message List  
Reply | Forward Message #255068 of 259673 |
Re: local users: /etc/passwd vs ldap

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:majordomo@...?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.



Sun Jul 5, 2009 12:37 pm

Victor.Duchovni@...
Send Email Send Email

Forward
Message #255068 of 259673 |
Expand Messages Author Sort by Date

My Fedora 11 postfix installation won't recognise local recipients. It appears only to deliver to users found in /etc/passwd, those in the ldap directory are...
paul sorenson
news02@...
Send Email
Jul 5, 2009
9:10 am

... It's generally advisable to include this information in your email - for the sake of the archives, but it removes the external dependency. The level of...
Barney Desmond
barneydesmond@...
Send Email
Jul 5, 2009
9:46 am

Barney, Thanks for your quick response. ... I tried to paste the text but my email client wrapped everything into a godawful mess. ... I used a graphical merge...
paul sorenson
news02@...
Send Email
Jul 5, 2009
10:03 am

... 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...
Victor Duchovni
Victor.Duchovni@...
Send Email
Jul 5, 2009
12:38 pm

... # user with ldap entry only: [pms@homer domestic]$ (getent passwd bells; postmap -q bells unix:passwd.byname) | sort | uniq -c | awk '{print $1}' 1 # user...
paul sorenson
news02@...
Send Email
Jul 5, 2009
10:46 pm

... If getent(1) is returning results that are not found via getpwnam(3), your C-library or nsswitch are broken. Trace the system calls made by "postmap -q"...
Victor Duchovni
Victor.Duchovni@...
Send Email
Jul 6, 2009
5:08 am

... getent returns identical results to getpwnam(), I wrote a short program to test this. [pms@homer postfix]$ ./getpwname fields from getpwnam("pms"): ...
paul sorenson
news02@...
Send Email
Jul 6, 2009
11:27 am

... So all 32-bit executables have a non-working getpwnam(3), when LDAP is involved. This is broken, the solution is to install a 32-bit libnss_ldap.so, you...
Victor Duchovni
Victor.Duchovni@...
Send Email
Jul 6, 2009
1:36 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help