• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to set quotas for user from shellscript  RSS feed

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
suppose if we issue edquota -u <username>,a window opens and we can set there the soft and hard limits for the user.
but, where does the quota information comes from i.e from which file the edquota is retrieving the information
and
how to set quota for a user from shellscript
 
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pavan,
It's always a good idea to read the manpages:
'man quota'
'man edquota'
'man quotaon'
'man quotaoff'
...etc
you should find your answer there, at the base of the entry, under the 'FILES' section.
At the root of each filesystem you should have quota files, which vary depending on the version of quota that you are running. You define the version of quota that you are using when you turn quota on.
If you are setting up a new user and want to add a quota entry just append a line with the values that you want to include at the end of the appropriate quota files. You can include the script that you write in the scripts that set up your new users.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!