I have created users with userman, now i want that any user who login first time on server, an email should be sent to admin taht this account is now active. how to do that?
That MAY be doable via a script ?? Get changeip ’ attention he may be able to help there…
You could use something like syslog2ODBC (windows) and dirrect the data to a SQL server.
At the SQL server create a trigger on the table and fire off a query that tests for the 1st occurance of a login account..
Something like.. ( I do mean LIKE )
Select UserID
From syslog
Where not in (Select UserID from Active where UserID = inserted.UserID)
Insert into Active (UserID,RecordStamp) Values (Inserted.UserID,GetDate())
EXEC master.dbo.xp_sendmail
@recipients=N’someone@somewhare.com;‘,
@query=N’SELECT * From User Manager SQL Trigger, (SQL Statement IE select * from inserted)
@Subject=N’*** TESTING *** New User Login, (Pass usr ID here)
@attach_results = ‘TRUE’, (Will attach qry as an attachment)
@width = 50, (Width of the query table returned (will word wrap))
@message=N’Sales Goals Test Data. See Attached file.'; (Body of the message)
Hope this helps..
Thanks for the tip
but unfortunately I have never worked on SQL & syslog2ODBC.
However I will give it a try. thanks ![]()