LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-12-2002, 12:22 PM   #1
johnpayback
LQ Newbie
 
Registered: Jul 2002
Posts: 15

Rep: Reputation: 0
Question User Quotas


How can I set the user quotas to be a default value for every new user? When I do a useradd command I need it to automatically set the default user quota that I have defined.
This is a Redhat 7.2 system.

Thanks,

John Payback
 
Old 08-12-2002, 01:19 PM   #2
A-dummy
Member
 
Registered: Jun 2002
Location: Kanpur,India
Distribution: RH-7.0 , 7.3
Posts: 130

Rep: Reputation: 15
Read this page:

http://www.yolinux.com/TUTORIALS/Lin...ialQuotas.html
 
Old 08-12-2002, 01:44 PM   #3
johnpayback
LQ Newbie
 
Registered: Jul 2002
Posts: 15

Original Poster
Rep: Reputation: 0
I've set the quotas already with no problems. I just need it to automatically add a default quota for every user in a specific group. Would I do that in the /etc/security/limits.conf file or would I just copy from a user that already has the right quota to all users every 5 minutes. Wouldn't that be slow? I just want it to do the quota automatically when a user is added via command line with using the edquota command. Is this possible?

Thanks,

John Payback
 
Old 08-12-2002, 02:07 PM   #4
A-dummy
Member
 
Registered: Jun 2002
Location: Kanpur,India
Distribution: RH-7.0 , 7.3
Posts: 130

Rep: Reputation: 15
If i am not getting it wrong then you must have enabled quotas
on some filesystem (using keyword usrquota in fstab).....
to duplicate quotas use :

edquota -p <user> 20000-30000

this will set all users with id 20000 to 30000 to the same quota
as of <user>.....
 
Old 08-12-2002, 02:22 PM   #5
johnpayback
LQ Newbie
 
Registered: Jul 2002
Posts: 15

Original Poster
Rep: Reputation: 0
Your right but I was trying to see if there was a way to add the quotas to any new user that is created at the time the user is created instead of having to use edquota. I guess that I could just write a script to do it but I figured that someone had already done this.

Thanks.
 
Old 08-12-2002, 03:15 PM   #6
A-dummy
Member
 
Registered: Jun 2002
Location: Kanpur,India
Distribution: RH-7.0 , 7.3
Posts: 130

Rep: Reputation: 15
ok so you can try this :

#!/bin/bash

useradd -options $1
# -options means whatever options you are giving on command
#line

edquota -p <default-user> $1

call this script x....then
$ ./x <user-name> should do your job......there can be some
mistakes in this script ,just correct them for yourself....
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
User Quotas gsibble Linux - General 4 06-12-2007 08:30 PM
copying user quotas from proto user jomy Linux - Enterprise 0 01-09-2005 02:06 AM
User Quotas humanrig Linux - Hardware 1 03-15-2004 07:24 AM
User Quotas Dipdngold Linux - General 2 01-21-2004 05:47 PM
issues with user quotas.. oeln Linux - General 1 10-15-2003 06:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:40 AM.

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