Hello,
We have radius server and using mysql. I would like to determine who are the users
who have not login to our dialup server for over six months and then disable the account
In the example below, I'm just using > 10 days


mysql> SELECT distinct username,framedipaddress,acctstarttime,acctstoptime from radacct where DATEDIFF(CURDATE(),acctstoptime) > 10 order by username;
+------------+-----------------+---------------------+---------------------+
| username | framedipaddress | acctstarttime | acctstoptime |
+------------+-----------------+---------------------+---------------------+
| testuser | 191.168.2.37 | 2005-04-11 14:56:40 | 2005-04-11 15:02:45 |
| testuser | 191.168.2.47 | 2005-04-24 15:23:18 | 2005-04-24 15:35:58 |
| testuser | 191.168.2.42 | 2005-04-19 18:38:51 | 2005-04-19 19:06:11 |
| testuser | 191.168.2.51 | 2005-04-14 16:57:14 | 2005-04-14 18:16:20 |
| testuser | 191.168.2.41 | 2005-04-25 16:22:30 | 2005-04-25 16:32:44 |


The problem here is that "testuser" may have logged in the day before the command was executed. So my question is how to get the users last login to the server and
if it's more than 6 months disable the account.


Thanks


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to