Is there any way that I can have a password that programatically changes to prevent someone from accessing the database after so many days or a specified date???????
There is no foolproof way to do this. You can put some code in your startup procedure and pull the password for the current date from a table. Obviously if you can read the tables, every one else can too...so any solution you come up with will only protect against casual intrusions.
Hmm. I just thought of a couple of pretty decent ways...
Make a form that allows the user to change his password without using the security menu item (there's code for this in the security faq, which you can get from MS or from my site). Put something in the code that records the user name and the date in a table every time the user changes his password (probably just update the date if the user is already in there, but you could make a history table if you wanted).
Then do one or both of the following:
1) Write code that fires when an admin logs in to go through that table and blank and then set-to-some-random-string the password for each person who hasn't updated their password in the past XX days.
2) Write code that fires each time a user logs in that, if they haven't changed their password in XX days, blanks their password and set it to some random string and then kicks them out of the database.
Shouldn't be that hard to set up, if you just crib the code from the faq.
And sounds like a nice set of code to own.
If you write it, I'd love to see a copy of it posted here.
Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.