0

I'm on Ubuntu 20.04. I'm trying to set up group quota for a disk on the server.

I added 5 users to group1 and 7 users to group2. Then I set group quotas for a disk on the server and checked the current quota setup with the command sudo repquota -auvgs. I saw that each user had a group that was the same as its username as its primary group. And therefore repquota was not showing quotas for group1 and group2, but instead for user1, user2, and so on.

It looked something like this (this is not exact, but recreated from my memory):

                        Space limits                File limits
Group           used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --      1K      0K      0K              3     0     0
user1      --     1K      0K      0K            847     0     0
user2     --      1G      0K      0K             1k     0     0
user3     --      4K      0K      0K              1     0     0
user4     --      4K      0K      0K              1     0     0
[...]

So I changed each user's primary group to either one of group1 and group2. Then I deleted all the unnecessary groups user1 and user2 (these are groups which have the same as the usernames).

It looks better than before, but there are some groups that have UIDs(I think) of already deleted groups.

It looks something like this now:

Group           used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --     28K      0K      0K              3     0     0
group1    --  20368K      0K     30G            847     0     0
group2    --    375G      0K     40G          2047k     0     0
#1023     --      4K      0K      0K              1     0     0
#1013     --      4K      0K      0K              1     0     0
#1015     --      2M      0K      0K          1141k     0     0
#1016     --      4K      0K      0K              1     0     0
[...]

I think those are groups which I've deleted but were writing to disk while I was changing quota and deleting groups. Looking at /usr/passwd, these numbers do match up with UIDs for users who seem to have been active on the machine while I was working on this.

How can I get rid of the group quotas #1023, #1013, etc.?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy