Bug 870244 - repquota shows uids not user names with sss
repquota shows uids not user names with sss
Status: CLOSED UPSTREAM
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: quota (Show other bugs)
6.3
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Petr Pisar
qe-baseos-daemons
https://sourceforge.net/tracker/?func...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-25 17:57 EDT by Orion Poplawski
Modified: 2014-10-21 08:19 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-10-21 08:19:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2012-10-25 17:57:48 EDT
Description of problem:

Using sss:

passwd:     files sss
shadow:     files sss
group:      files sss

# repquota -a
*** Report for user quotas on device /dev/mapper/VolGroup-lv_root
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      -- 2282948       0       0          50064     0     0       
postfix   --      60       0       0             38     0     0       
rpc       --      12       0       0              4     0     0       
rpcuser   --      20       0       0              6     0     0       
named     --      28       0       0              7     0     0       
puppet    --      60       0       0             15     0     0       
smmsp     --     620       0       0            118     0     0       
#1744     --       0       0       0              1     0     0       

# id orion
uid=1744(orion) gid=1001(nwra) groups=1001(nwra),1020(web),1023(source),1027(code),1035(nek),1008(Domain Admins),1002(staff),1034(ivm),10(wheel)
# getent passwd 1744
orion:*:1744:1001:Orion Poplawski:/home/orion:/bin/bash

Everything else seems to resolve the uid fine.

Version-Release number of selected component (if applicable):
quota-3.17-16.el6.x86_64   

This can be resolved by setting:

enumerate = true

in /etc/sssd/sssd.conf for the domain.  But instead of walking through the password entries with getpwent(), I think it would be better to use getpwuid().  Similar with groups.

Filed upstream: https://sourceforge.net/tracker/?func=detail&atid=118136&aid=3580224&group_id=18136
Comment 2 Petr Pisar 2012-10-26 09:35:35 EDT
Indeed walking whole user database is pointless. (Though there can be some corner cases when it's faster than querying for each ID directly. E.g. if disk quotas list a lot of IDs that are missing entry in user database. But then there is `-n' option.)
Comment 3 Petr Pisar 2014-10-21 08:19:38 EDT
As stated by upstream:

> XFS, ocfs2, or ext4 (just recently) do not have quota files available to
> userspace applications and thus repquota has to be implemented by iterating
> over all users and querying kernel for quota information. So for those
> filesystems we have to use getpwent().

Changing the quota in a way you request would break another use cases. Therefore I will postpone resolution of this issue to the upstream.

Note You need to log in before you can comment on or make changes to this bug.