Enabling User/Group Quota for virtual private server that already exists.
If the virtual private server already exists, run the following command to set the parameter:
vzctl set 101 –quotaugidlimit 150 –save
Where, 101 is the VPS ID number.
Restart the virtual private server.
Enabling User/Group Quota on a Virtual Private Server (VPS)
To enable user/group quota on a virtual private server:
Edit the configuration file to set the parameter QUOTAUGIDLIMIT that controls the second-level disk quota. The two instances when you can set the parameter is:
If you are setting the parameter before the creation of the virtual private server:
Go to the location of the virtual private server configuration file. /etc/sysconfig/vz-scripts
To enable disk quota set the value of QUOTAUGIDLIMIT to a positive value, in the configuration file. For example: QUOTAUGIDLIMIT=”150″
The default value of the parameter is zero. Setting the value of the parameter to zero disables user/group quotas.
Note: Ensure that you use this configuration file when creating the virtual private server.
Reference: http://parallels.com
Adding user/group in a FreeBSD server
How do I add a user and group to the FreeBSD Server?:
The ‘pw’ command can be used to add a user and or group to the FreeBSD System. The ‘pw’ command is a program that will allow any user with superuser privileges to edit and or add users and groups on FreeBSD with ease. It also allows a way to standardize modification of adding and removing users and groups.
This would create the group ‘anewgroup’ to the machine.
Now to add a users ‘ben’ to the ‘anewgroup’ using pw, issue the following command.
pw useradd ben -s /bin/csh -g anewgroup
This command would create the user ben, with a shell of /bin/csh and add it to the anewgroup group. The user would also have his home directory under /home/ben.
Now say, if the user needs to have the home directory on a different partition, for example /mnt/test/home issue the following command.
pw useradd ben -d /mnt/test/home/ben -s /bin/csh/ -g anewgroup
If the user ‘ben’ is to be added to a secondary group on the system, say a group that has been created already called ‘oldgroup’, then execute the following.
pw usermod ben -G oldgroup