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
quotasync
QUOTASYNC(1) General Commands Manual QUOTASYNC(1)
NAME
quotasync - synchronize in-kernel file system usage and limits to disk format
SYNOPSIS
quotasync [ -ug ] mount-point...
quotasync [ -ug ] -a
quotasync -h | -V
DESCRIPTION
quotasync flushes file system usage and limits from kernel memory to quota files stored in the file system. By default only the user quotas
are synchronized.
This tool can be useful if you want to display accurate quotas by tools that parse quota files, like repquota(8).
OPTIONS
-u, --user
Synchronize user usage and limits.
-g, --group
Synchronize group usage and limits.
-a, --all
Synchronize usage and limits on all file systems. You have to specify this option or to specify desired file systems.
-V, --version
Show program version information and exit.
-h, --help
Show program usage and exit.
DIAGNOSTICS
If requested synchronization fails, or invalid option is given, quotasync will terminate with non-zero exit code. Otherwise it will return
zero.
FILES
aquota.user or aquota.group
Quota file at the file system root (version 2 quota, non-XFS/GFS2 file systems).
quota.user or quota.group
Quota file at the file system root (version 1 quota, non-XFS/GFS2 file systems).
/etc/mtab List of mounted file systems maintained by user space.
/proc/mounts List of mounted file systems maintained by kernel.
SEE ALSO
quota(1), quotactl(2), mount(8), quotacheck(8), quotaon(8), repquota(8), warnquota(8).
QUOTASYNC(1)