06-27-2012
below are the steps what i did for this.
Scenario
=======
group name : project1
group members : user1, user2, user3.
group dump folder/common folder to the above mention users : /home/project1 (/dev/sda2).
group disk quota limit : 100MB soft and 110MB hard limit
GROUP QUOTA
===========
Step1 : Create a group
#groupadd project1
Step2 : Create all the require users with their home directory /home/project1 and group
as project1
#useradd -c "Testing group quota implementation" -m -d /home/project1 \
-g project1 user1
#useradd -c "Testing group quota implementation" -m -d /home/project1 \
-g project1 user2
#useradd -c "Testing group quota implementation" -m -d /home/project1 \
-g project1 user3
Step3 : Select/prepare the partition for quota, here my partition is /dev/sda2 so edit/etc/fstab file as shown below.
vim /etc/fstab
/dev/sda2 /home ext3 defaults,usrquota,grpquota 0 0
Step4 : Now remount the partition with rw permissions
#mount -o remount,rw /home
Step5 : Now create group quota database
#quotacheck -cug /home
Step6 : Once the above command executed successfully, check quota is implemented or not.
#repquota -a
Step 7 : #setquota -g project1 100000 110000 0 0 /dev/sda2
This will set quota for group project1
Step8 : #chmod 2770 -R /home/project1
Setup Samba Share
===============
Step 1 : provide the permissions on the above created folder.
#chmod -R 775 project1
#chown -R user1: project1 project1
Step2 : Now open /etc/samba/smb.conf file to create a share
vim /etc/samba/smb.conf
[global]
wide links = yes
unix extensions = no
[project1]
comment = Project1 share with Quota
path = /home/project1
browsable = yes
writable = yes
valid users = @project1
create mask = 775
directory mask = 775
same i used to create group project2 and assigned user4 and user5 to this group and assigned quota on /home/project2 and make it share from samba.
Please let me know if i am missing some configuration for this scenario here.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Is there any command to find to which group u ser belongs (3 Replies)
Discussion started by: radhika03
3 Replies
2. UNIX for Advanced & Expert Users
***deleted by reborg for rule 1 violation*** (1 Reply)
Discussion started by: manoranjan
1 Replies
3. Shell Programming and Scripting
Hi all,
How can I check if a particular user id belongs to a group?
(ie. how to check if the current user `whoami` is part of the a certain group? do i use the group name of group id?)
Thanks in advance (2 Replies)
Discussion started by: rockysfr
2 Replies
4. AIX
While doing a "little" clean up job, i noticed something weird...
A ls -altr of my / showed this:
drwxr-xr-x 1549 johcham grands 102400 Jan 28 13:13 home
How can a user become the owner / modify the group of my /home??? any thoughts? Can i chown this back to bin:bin (i think that... (2 Replies)
Discussion started by: Stephan
2 Replies
5. Red Hat
Hi,
I want to apply the user quota, but i am unable to apply the quota to user.
Kindly provide the guide line, so that i can sortout the problem.
Step 1: Create partion on device
#fdisk /dev/sda (because hard disk is scsi)
#n (new partition table) i.e /dev/sda8.
#p ( to print the partition... (2 Replies)
Discussion started by: sahu.tapan
2 Replies
6. UNIX for Advanced & Expert Users
how to use ldapsearch to find all the netgroups a user belongs to? It's Solaris. (1 Reply)
Discussion started by: jalite19
1 Replies
7. Red Hat
Hello!
I am in a weird problem of not able to set quota on an ext4 file system. I have setup a logical volume on which this ext4 filesystem resides. It's going to be used by an application for dumping data. But we want to setup quota so that it does not consume all the free space of the lv. The... (5 Replies)
Discussion started by: admin_xor
5 Replies
8. Red Hat
Hi,
We now have a Samba or Winbind issue. The Linux client under RHEL6 can not get Windows' AD sub-domain info. See the following output please. The main domain 'Global' is shown online, but the sub-domain 'Europe' and 'Asia' are shown offline although they are online.
Commands 'wbinfo -u' and... (0 Replies)
Discussion started by: aixlover
0 Replies
9. Red Hat
Hi,
In the following output you can see the the user "richard" is a member on the team/group "developers":
# id richard
uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers)
but in the following details of the said group (developers), the said user... (3 Replies)
Discussion started by: indiansoil
3 Replies
10. Shell Programming and Scripting
I need help with a tcl code. I have a variable "myIP" which reads IP address from socket. How do I use regex to find out if it belongs to a group for e.g., 50.65.75.240/28 or 50.65.75.128/25 etc. (2 Replies)
Discussion started by: ampak
2 Replies
QUOTA(1) BSD General Commands Manual QUOTA(1)
NAME
quota -- display disk usage and limits
SYNOPSIS
quota [-g] [-u] [-v | -q]
quota [-u] [-v | -q] user
quota [-g] [-v | -q] group
DESCRIPTION
Quota displays users' disk usage and limits. By default only the user quotas are printed.
Options:
-g Print group quotas for the group of which the user is a member. The optional -u flag is equivalent to the default.
-v quota will display quotas on filesystems where no storage is allocated.
-q Print a more terse message, containing only information on filesystems where usage is over quota.
Specifying both -g and -u displays both the user quotas and the group quotas (for the user).
Only the super-user may use the -u flag and the optional user argument to view the limits of other users. Non-super-users can use the -g
flag and optional group argument to view only the limits of groups of which they are members.
The -q flag takes precedence over the -v flag.
Quota reports the quotas of all the filesystems that have a mount option file located at its root. If quota exits with a non-zero status,
then one or more filesystems are over quota.
FILES
Each of the following quota files is located at the root of the mounted filesystem. The mount option files are empty files whose existence
indicates that quotas are to be enabled for that filesystem.
.quota.user data file containing user quotas
.quota.group data file containing group quotas
.quota.ops.user mount option file used to enable user quotas
.quota.ops.group mount option file used to enable group quotas
HISTORY
The quota command appeared in 4.2BSD.
SEE ALSO
quotactl(2), edquota(8), quotacheck(8), quotaon(8), repquota(8)
4.2 Berkeley Distribution March 28, 2002 4.2 Berkeley Distribution