xfs
[Top] [All Lists]

Re: [BUG] xfs_quota: can't handle the users managed by LDAP

To: Satoru Takeuchi <takeuchi_satoru@xxxxxxxxxxxxxx>
Subject: Re: [BUG] xfs_quota: can't handle the users managed by LDAP
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 23 Nov 2012 10:37:57 +1100
Cc: xfs ML <xfs@xxxxxxxxxxx>
In-reply-to: <50ADB27F.8070806@xxxxxxxxxxxxxx>
References: <50ADB27F.8070806@xxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Nov 22, 2012 at 02:05:03PM +0900, Satoru Takeuchi wrote:
> Hi,
> 
> Current xfs_quota (I pulled xfsprogs today) seems not be able to the users
> managed by LDAP. There is no patch since I'm not good at LDAP and don't know
> the root cause yet ;-(
> 
> Step to reproduce(in this case, "sat" is the user managed by LDAP):
> ===============================================================================
> # uname -r
> 3.7.0-rc5
> # mount -o loop,usrquota xfs.img mnt
> # xfsprogs/quota/xfs_quota -xc "limit bsoft=10M bhard=10M sat" /dev/loop0
> xfs_quota: invalid user name: sat                                          # 
> denied
> # su sat
> $                                                                          # 
> But this user acutally exists.
> ===============================================================================
> 
> The kernel is a bit old, but I suspect this is a userland problem.

Yes, userland.

However, xfs_quota is not supposed to know about LDAP, or NIS, or
any other user database. It uses the getpwnam() to convert the user
name to a UID, and that call is failing to find "sat". This is
supposed to work with LDAP (as mentioned in the man page), and if it
isn't it generally means something is broken with your LDAP setup
(/etc/nsswitch.conf not correct?) rather than there being something
wrong with xfs_quota....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>