LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-15-2008, 04:51 AM   #1
accarlson
LQ Newbie
 
Registered: Aug 2007
Posts: 19

Rep: Reputation: 0
set quota when user logon on samba


Hi!

which approach would be the best one to set the user quota when they logon?
I'm using SAMBA with LDAP for windows user logon. I have quota enabled.

Thanks in advance!

Regards,

Augusto
 
Old 02-16-2008, 07:45 AM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
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.
 
Old 02-19-2008, 06:14 AM   #3
accarlson
LQ Newbie
 
Registered: Aug 2007
Posts: 19

Original Poster
Rep: Reputation: 0
Smile

Hi!

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
 
Old 11-21-2009, 01:34 PM   #4
Rifo
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by accarlson View Post
Hi!

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?

Thanks a lot

Fabrizio
 
Old 11-22-2009, 05:39 PM   #5
accarlson
LQ Newbie
 
Registered: Aug 2007
Posts: 19

Original Poster
Rep: Reputation: 0
Hi Rifo!

Long time has passed. Just after I posted this thread I moved to another job.

I have not found a solution. I was trying something with command line quota editor. I think it was setquota.

Sorry to no be able to help.

Regards,

Augusto
 
Old 11-23-2009, 01:30 AM   #6
Rifo
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Rep: Reputation: 0
Hi,

Thanks, I'm still looking for that.. But I guess that I will soon give up, seems to not be really solution for that..

Bye

Fabrizio

Quote:
Originally Posted by accarlson View Post
Hi Rifo!

Long time has passed. Just after I posted this thread I moved to another job.

I have not found a solution. I was trying something with command line quota editor. I think it was setquota.

Sorry to no be able to help.

Regards,

Augusto
 
Old 12-05-2009, 11:48 AM   #7
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
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.
 
Old 12-06-2009, 02:18 AM   #8
Rifo
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by carltm View Post
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.

Bye

Fab.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set quota for AD youer through samba procfs Linux - Newbie 1 11-04-2007 12:18 AM
samba new user cannot logon from W95 dgermann Linux - Networking 5 01-23-2006 08:01 PM
How to set quota to user account? Khmer Linux - Newbie 1 12-11-2005 11:21 PM
how do i set a user disk quota axis Linux - Security 5 09-01-2003 10:33 PM
set user quota size juno Linux - General 2 10-25-2002 03:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration