LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-10-2005, 12:10 PM   #1
weotch
LQ Newbie
 
Registered: Jan 2005
Posts: 1

Rep: Reputation: 0
Question Delete quota entry when deleting user


I've noticed that when I use userdel to remove users, they aren't removed from the quota table when I run repquota. Instead, their name is replaced by their UID (I think) such as "#10020." If I recreate a user with the same name as the one I deleted, he assumes those old quota settings. I'm looking for a way to remove a user's quota's, something equivalent to setquota hopefully. Thank you!
 
Old 06-20-2012, 07:37 AM   #2
aasami
LQ Newbie
 
Registered: Apr 2011
Posts: 19

Rep: Reputation: 2
Question What's the solution?

Have you found a sollution for this issue? I'm fighting with this too.
 
Old 10-25-2012, 01:53 PM   #3
robrinker
LQ Newbie
 
Registered: Oct 2012
Location: Ohio, USA
Distribution: RHEL
Posts: 1

Rep: Reputation: Disabled
I realize this thread and reply are dated, but since the solution wasn't posted, I thought I would add it for future readers:

You end up with #<UID> entries when you delete a user but the UID still owns files on the filesystem where quota is enabled. Run a find for the offending UID in the filesystem that you are seeing this entry for and either remove the files, or chown them to an existing user.

i.e.

find /home -user 10200

Once you do that, the entries will automatically be removed from your repquota output.
 
1 members found this post helpful.
Old 10-25-2012, 02:47 PM   #4
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Welcome and thanks for sharing. I was looking for a solution to this for some time too. Unfortunately removing all files of the user doesn’t seem to work for me:
Code:
# repquota -av
*** Report for user quotas on device /dev/sda6
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
...       
#15151    --       0   10000   10000              0 10000 10000
And a find for this userid doesn’t return anything. Must anything be done in addition?

My usual procedure is to create a dummy account, remove the quota entry and the just created user too.
 
Old 10-25-2012, 08:03 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
How about http://linux.die.net/man/8/edquota ?
 
Old 10-26-2012, 08:38 AM   #6
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Talking

Well, now I got it working – being it edquota or setquota.

I struggled in the past what argument to specify for the user, hence I tried "#15151" including the quotation marks which throws an error – giving only the number does it though.

Maybe it wasn’t mentioned in the man page before, or I checked only the explanation of the -u option (where it’s still not mentioned). I don’t recall.


Thx - Sometimes it’s good to review old habits.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
user quota ust Linux - Software 1 08-25-2004 09:53 AM
Quota for an user Anibal Slackware 4 06-01-2004 11:14 PM
About user quota... raymond Linux - General 4 08-27-2003 12:01 AM
User Quota chuck77 Linux - General 3 11-16-2002 09:21 AM
about user quota... raymond Linux - General 2 11-09-2002 10:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration