Submitted by moimichel on Sat, 01/29/2011 - 12:25
I have seen it somewhere but cannot remember where! How can I create an action upon a webmin user login? I would like to send an email each time a webmin/virtualmin user logs on in account.
Thanks in advance.
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Sat, 01/29/2011 - 12:28 Comment #1
There is a way to this, but it isn't very well documented - just edit
/etc/webmin/miniserv.conf
and add the line :login_script=/path/to/your/script.sh
then run :
/etc/webmin/restart
Submitted by JamieCameron on Sat, 01/29/2011 - 12:28 Comment #2
There is a way to this, but it isn't very well documented - just edit
/etc/webmin/miniserv.conf
and add the line :login_script=/path/to/your/script.sh
then run :
/etc/webmin/restart
Submitted by moimichel on Sat, 01/29/2011 - 12:32 Comment #3
Thanks. How can I use virtuamin variables in that script? $DOM $USER and so on...
Submitted by JamieCameron on Sat, 01/29/2011 - 12:35 Comment #4
You can't get the domain, but the parameters passed to script are : username, webmin session ID, remote IP address, local IP address
From the username, you could use the Virtualmin command line API to get the domain ..
Submitted by moimichel on Sat, 01/29/2011 - 12:43 Comment #5
a little more help... How do I get the value from variable username? I am new to perl scripting. Thanks in advance.
Submitted by JamieCameron on Sat, 01/29/2011 - 12:45 Comment #6
If this is a perl script, the username can be found in
$ARGV[0]
Submitted by moimichel on Sat, 01/29/2011 - 13:11 Comment #7
Thanks a lot.
Submitted by Issues on Sat, 02/12/2011 - 15:20 Comment #8
Automatically closed -- issue fixed for 2 weeks with no activity.