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
LEARN ABOUT CENTOS
vfs_default_quota
VFS_DEFAULT_QUOTA(8) System Administration tools VFS_DEFAULT_QUOTA(8)
NAME
vfs_default_quota - store default quota records for Windows clients
SYNOPSIS
vfs objects = default_quota
DESCRIPTION
This VFS module is part of the samba(7) suite.
Many common quota implementations only store quotas for users and groups, but do not store a default quota. The vfs_default_quota module
allows Samba to store default quota values which can be examined using the Windows Explorer interface.
By default, Samba returns NO_LIMIT the default quota and refuses to update them. vfs_default_quota maps the default quota to the quota
record of a user. By default the root user is taken because quota limits for root are typically not enforced.
This module is stackable.
OPTIONS
default_quota:uid = UID
UID specifies the user ID of the quota record where the default user quota values are stored.
default_quota:gid = GID
GID specifies the group ID of the quota record where the default group quota values are stored.
default_quota:uid nolimit = BOOL
If this parameter is True, then the user whose quota record is storing the default user quota will be reported as having a quota of
NO_LIMIT. Otherwise, the stored values will be reported.
default_quota:gid nolimit = BOOL
If this parameter is True, then the group whose quota record is storing the default group quota will be reported as having a quota of
NO_LIMIT. Otherwise, the stored values will be reported.
EXAMPLES
Store the default quota record in the quota record for the user with ID 65535 and report that user as having no quota limits:
[global]
vfs objects = default_quota
default_quota:uid = 65535
default_quota:uid nolimit = yes
VERSION
This man page is correct for version 3.0.25 of the Samba suite.
AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open
Source project similar to the way the Linux kernel is developed.
Samba 4.0 06/17/2014 VFS_DEFAULT_QUOTA(8)