Submitted by jrhosting on Sat, 07/27/2013 - 08:54
Hi,
When adding a new user, the quota information is not put in the environment. The quota information is however exported in the environment for new domains. Would it be possible that we will also do this for users? That way I can easily deploy new users with a certain quota on a variety of machines.
thanks Remko
Status:
Active
Comments
Submitted by andreychek on Sat, 07/27/2013 - 15:59 Comment #1
Howdy -- just to clarify, how are you accessing that quota information for domains, that isn't available for users?
We just want to make sure we're looking into the correct problem... thanks!
Submitted by jrhosting on Sat, 07/27/2013 - 17:01 Comment #2
Hi Joe,
When creating a new virtual server, the environment has the VIRTUALSERVER_UQUOTA=524288 variables included. When creating a new email user, the environment has nothing wrt. QUOTA's. I would like to have that information readily available when creating a new user so that I can do something with that on a remote machine....
Submitted by JamieCameron on Sat, 07/27/2013 - 18:01 Comment #3
For a user, that information should be available in the USERADMIN_QUOTA environment variable.
Submitted by jrhosting on Sun, 07/28/2013 - 10:30 Comment #4
Hi Jamie,
Yes, it should , but it isn't. Not at the 'ldap users and groups' part where I setup the logging (since the user gets created in LDAP). The regular users and groups doesn't register any new email user at all and the enviroment for adding or modifying an alias doesn't specify the quota (since it's not a new server it doesn't register there either).
Submitted by JamieCameron on Sun, 07/28/2013 - 18:05 Comment #5
Are you creating these new users in the Virtualmin UI, or using the (LDAP) Users and Groups module in Webmin?
That variable is only set when using Virtualmin.
Submitted by jrhosting on Sun, 07/28/2013 - 18:13 Comment #6
I do this via Virtualmin [ domain -> edit users => new user ]
Submitted by JamieCameron on Sun, 07/28/2013 - 18:41 Comment #7
So I assume you have a post-user creation script setup that is being run after a new user is added?
If so, try adding a line to that script like :
env >/tmp/env.out
Which should capture all the environment variables that contain user details.
Submitted by jrhosting on Mon, 07/29/2013 - 06:58 Comment #8
Well. I have that in the LDAP users and groups already. Except for the password his is an example entry:
SERVER_PORT=10000 HTTP_HOST=admin.:10000 DOCUMENT_REALROOT=/usr/local/lib/webmin-1.630 SERVER_REALROOT=/usr/local/lib/webmin-1.630 QUERY_STRING= HTTP_ACCEPT_LANGUAGE=en-us HTTP_CONTENT_LENGTH=295 PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin USERADMIN_REAL=Remko LD_LIBRARY_PATH= HTTP_REFERER=https://admin:10000/virtual-server/edit_user.cgi?new=1&dom= HTTP_CONNECTION=keep-alive DOCUMENT_ROOT=/usr/local/lib/webmin-1.630 SERVER_ROOT=/usr/local/lib/webmin-1.630 MYSQL_PWD= SCRIPT_NAME=/virtual-server/save_user.cgi USERADMIN_GID=5002 REMOTE_HOST= PERLLIB=/usr/local/lib/webmin-1.630 HTTP_USER_AGENT=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1 PWD=/usr/local/lib/webmin-1.630/virtual-server/ REQUEST_METHOD=POST SERVER_SOFTWARE=MiniServ/1.630 HTTP_CONTENT_TYPE=application/x-www-form-urlencoded HTTP_DNT=1 SERVER_ADMIN= SERVER_NAME=admin. USERADMIN_DOM= USERADMIN_PASS= HTTP_ORIGIN=https://admin.:10000 CONTENT_LENGTH=295 SERVER_PROTOCOL=HTTP/1.0 HTTP_ACCEPT_ENCODING=gzip, deflate BASE_REMOTE_USER= CONTENT_TYPE=application/x-www-form-urlencoded HOME=/root MINISERV_PID=3557 USERADMIN_SOURCE= HTTP_COOKIE=; testing=1 USERADMIN_ACTION=CREATE_USER USERADMIN_SHELL=/dev/null REMOTE_ADDR= PATH_INFO= SCRIPT_FILENAME=/usr/local/lib/webmin-1.630/virtual-server/save_user.cgi HTTP_ACCEPT=text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 SERVER_PORT=10000 HTTP_HOST=admin:10000 DOCUMENT_REALROOT=/usr/local/lib/webmin-1.630 SERVER_REALROOT=/usr/local/lib/webmin-1.630 QUERY_STRING= HTTP_ACCEPT_LANGUAGE=en-us HTTP_CONTENT_LENGTH=295 PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin USERADMIN_REAL=Remko LD_LIBRARY_PATH= HTTP_REFERER=https://admin:10000/virtual-server/edit_user.cgi?new=1&dom= HTTP_CONNECTION=keep-alive DOCUMENT_ROOT=/usr/local/lib/webmin-1.630 SERVER_ROOT=/usr/local/lib/webmin-1.630 MYSQL_PWD= SCRIPT_NAME=/virtual-server/save_user.cgi USERADMIN_GID=5002 REMOTE_HOST= PERLLIB=/usr/local/lib/webmin-1.630 HTTP_USER_AGENT=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1 PWD=/usr/local/lib/webmin-1.630/virtual-server/ REQUEST_METHOD=POST SERVER_SOFTWARE=MiniServ/1.630 HTTP_CONTENT_TYPE=application/x-www-form-urlencoded HTTP_DNT=1 SERVER_ADMIN= SERVER_NAME=admin. USERADMIN_DOM= USERADMIN_PASS= HTTP_ORIGIN=https://admin:10000 CONTENT_LENGTH=295 SERVER_PROTOCOL=HTTP/1.0 HTTP_ACCEPT_ENCODING=gzip, deflate BASE_REMOTE_USER= CONTENT_TYPE=application/x-www-form-urlencoded HOME=/root USERADMIN_EMAIL=remko@ USERADMIN_SECONDARY= USERADMIN_GROUP= WEBMIN_CONFIG=/usr/local/etc/webmin HTTPS=ON REQUEST_URI=/virtual-server/save_user.cgi REMOTE_USER=admin USERADMIN_HOME=/usr/home//homes/clown007 USERADMIN_USER=clown007 WEBMIN_VAR=/var/log/webmin GATEWAY_INTERFACE=CGI/1.1 REMOTE_ADDR_PROTOCOL=4 USERADMIN_UID=5246 MINISERV_CONFIG=/usr/local/etc/webmin/miniserv.conf MINISERV_PID=3557 USERADMIN_SOURCE= HTTP_COOKIE=; testing=1 USERADMIN_ACTION=CREATE_USER USERADMIN_SHELL=/dev/null REMOTE_ADDR= PATH_INFO= SCRIPT_FILENAME=/usr/local/lib/webmin-1.630/virtual-server/save_user.cgi HTTP_ACCEPT=text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Submitted by JamieCameron on Mon, 07/29/2013 - 09:25 Comment #9
Which screen in Webmin / Virtualmin are you using to add a new user?
Submitted by jrhosting on Mon, 07/29/2013 - 13:28 Comment #10
Domain -> edit users (under Virtualmin).
Submitted by JamieCameron on Tue, 07/30/2013 - 03:07 Comment #11
And when editing or creating a user, do the fields for setting the user's quota appear?
Submitted by jrhosting on Tue, 07/30/2013 - 08:28 Comment #12
Yes. I have a default quota of 250MB configured and that information can be seen from the webGUI. But it is not available on the system itself.
Submitted by jrhosting on Thu, 08/01/2013 - 02:06 Comment #13
To clarify because I now read my text as possibly problematic:
I have quotas enabled on the system. The Virtualmin service sees that and applies that properly to the filesystem. When doing an env >> /tmp/user_create_before.txt (and after.txt) there is no mentioning about the quota variables, so I cannot take them and send them somewhere.
In my case it would also be fine when quota is exported to LDAP directly for a given user so that i can use the mailQuota attribute to delimit the amount of disk an user is allowed to use for his/her mailboxes. (needs to be taken into account in the global quota report though so that might take more work then with just exporting the variables :-))
Thanks Remko
Submitted by JamieCameron on Thu, 08/01/2013 - 04:00 Comment #14
Ok, I see the problem now - there is indeed a bug (or missing feature) in Virtualmin that can cause this.
I will include a fix for this in the next Webmin release.