Samba and quota on Win95-client... (Solution!)

Rudo de Jong crj at
Fri Aug 8 01:04:46 GMT 1997

>> But what I would like to see, is that a user gets the right
>> information about the free space he/she has got left on the network-drive
>> given to him/her by use of the quota-system. It now just shows the total
>> free space on the partition.
>> Is there a way to make Win95 see the right amount of free space?
> See the "dfree command" option in smb.conf. I don't know the admin
> commands which come with Linux quota - you'll have to take them into
> account when writing your script. Please upload your script for
> inclusion in the 'contrib' directory when you are done :-)

I got it to work! GREAT! Many thanks to Charlie!

The solution is quite simple and small, so I'll just put it in here:

--- smb.conf...

workgroup = WORKGROUP
message command = /bin/mail -s 'message from %f on %m' crj < %s; rm %s
server string = Samba-server at %h
comment = Linux-share...
os level = 2
domain logons = yes
logon script = scripts\%U.bat
security = user
map archive = no
load printers = yes
writeable = false
browsable = no
guest ok = no
dfree command = /usr/local/lib/samba/bin/dfree %U
This actually did the trick...

...the shellscript (make sure the ownership and permissions are ok)...

-rwxr-xr-x   1 root     root           89 Aug  8 01:00 dfree*

...looks like this (make sure you put in all the paths):

/usr/local/bin/quota $1 | /usr/bin/tail -1 | /usr/bin/awk '{print $4" "$4-$2}'


That's all!!!

Keep up the good work!


* C.R.J. de Jong (Rudo) *
*  E-mail: crj at   *

More information about the samba mailing list