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

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

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 #255089 of 259577 |
Re: local users: /etc/passwd vs ldap

On 06/07/09 15:08, Victor Duchovni wrote:
> On Mon, Jul 06, 2009 at 08:45:15AM +1000, paul sorenson wrote:
>
>>> 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.
>>>
>> # user with ldap entry only:
>> [pms@homer domestic]$ (getent passwd bells; postmap -q bells
>> unix:passwd.byname) | sort | uniq -c | awk '{print $1}'
>> 1
>
> 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" and "getent" and see if anything interesting turns up.

getent returns identical results to getpwnam(), I wrote a short program
to test this.

[pms@homer postfix]$ ./getpwname
fields from getpwnam("pms"):
pms:x:500:500:paul sorenson:/home/pms:/bin/bash
fields from getpwnam("bells"):
bells:x:503:503:Helen Sorenson:/home/bells:/bin/bash

[pms@homer postfix]$ getent passwd pms
pms:x:500:500:paul sorenson:/home/pms:/bin/bash
[pms@homer postfix]$ getent passwd bells
bells:x:503:503:Helen Sorenson:/home/bells:/bin/bash

>
> Is LANG set to any particularly unusual value? Have you tried:
>
> LANG=C postmap -q bells unix:passwd.byname

[pms@homer postfix]$ echo $LANG
en_AU.UTF-8

[pms@homer postfix]$ LANG=C postmap -q bells unix:passwd.byname
(no output)

>> Any tips on how to dig deeper would be appreciated. Would it be
>> premature to create a bug report for this?
>
> This is a non-Postfix problem, start with a question on the support
> forum for your O/S.

Thanks for your help - the problem is solved. Tracing through postmap,
libnss_ldap.so was not found. Closer inspection revealed that this was
a 32 bit postfix package installed on a 64 bit system so it didn't look
in /usr/lib64.

I went back to yum and it seems that the 64 bit rpm is missing from the
repository. I found one on rpmfind.net, installed it and badabing.

I will let the fedora guys know.

cheers




Mon Jul 6, 2009 11:26 am

news02@...
Send Email Send Email

Forward
Message #255089 of 259577 |
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