Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If you're using the quota suite, it's not normal to set
the quota for a user when they log in. Rather, use
edquota to set the quotas for your users. You would then
need to notify any users that are close to their limit.
To do this, you could set up a cronjob to run repquota
and create a file in each user's directory and/or send
email to the user.
I believe that I was not clear with my question. Let's try again :-D
Yes, I'm using quota system. I have a samba server with LDAP. When quota is enabled, the user quota is set to unlimited.
As there is always new users (people are fired/hired) I would like that when they first login on samba, his quota is set. As in the future, users quota will be define in LDAP, and each user will be able to have different quota, its complicated to set by hand, as I have more than 2000 users.
Using pam_mkhomedir, when the user login, his home directory is created. I would like to set quota the same way.
I believe that I was not clear with my question. Let's try again :-D
Yes, I'm using quota system. I have a samba server with LDAP. When quota is enabled, the user quota is set to unlimited.
As there is always new users (people are fired/hired) I would like that when they first login on samba, his quota is set. As in the future, users quota will be define in LDAP, and each user will be able to have different quota, its complicated to set by hand, as I have more than 2000 users.
Using pam_mkhomedir, when the user login, his home directory is created. I would like to set quota the same way.
I hope that now I was more clear with my doubt.
Augusto
Hi Augusto,
I've exactly the same problem as yours.
Do you have found a solution??
How do you set the quota for the user at first login?
The only solution I can think of is to run a cronjob frequently to get
the list of users with quotas. Then check to see if each user is on the
list. If not, set the quota for the new user. It's a bit of a kludge,
but it should work.
The only solution I can think of is to run a cronjob frequently to get
the list of users with quotas. Then check to see if each user is on the
list. If not, set the quota for the new user. It's a bit of a kludge,
but it should work.
Thanks!
It's indeed what I've done. I give up with the automatic home creation and stuff like that.
I run now a script that check for new users, create home, set quota in the cronjob.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.