Unlocking the locked user accounts Part 94

  • دعنا نشارك هذا :
ترتيب الدرس : 94
المدة : 00:13:43
التحكم :
Text version of the video
http://csharp-video-tutorials.blogspot.com/2012/12/unlocking-locked-user-accounts-part-94.html

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
https://www.youtube.com/channel/UC7sEwIXM_YfAMyonQCrGfWA/?sub_confirmation1

Slides
http://csharp-video-tutorials.blogspot.com/2013/08/part-94-unlocking-user-accounts.html

All ASP .NET Text Articles
http://csharp-video-tutorials.blogspot.com/p/free-aspnet-video-tutorial.html

All ASP .NET Slides
http://csharp-video-tutorials.blogspot.com/p/aspnet-slides.html

All Dot Net and SQL Server Tutorials in English
https://www.youtube.com/user/kudvenkat/playlists?view1&sortdd

All Dot Net and SQL Server Tutorials in Arabic
https://www.youtube.com/c/KudvenkatArabic/playlists

In Part 93, of this video series we have discussed about locking user accounts, if a user repeatedly enters the wrong password. The accounts are locked to prevent hackers from guessing passwords and dictionary attacks. Please watch Part 93, before proceeding with this video.

In this video, we will discuss about unlocking the locked user accounts. There are several ways to unlock the user accounts.
Approach 1. The end user calls the technical helpdesk. The authorised person can issue a simple update query to remove the lock.

Update tblUsers
set RetryAttemptsnull, IsLocked0, LockedDateTimenull
where username'CallersUserName'

However, running UPDATE queries manually against a production database is not recommended, as it is error prone and we may un-intentionally modify other rows that we do not intend to update.

Approach 2. Another approach would be to provide a web page that lists all the locked user accounts. From this page, the helpdesk agent, can unlock the account by clicking a button. This is not as dangerous as running a manual update query, but still a manual process and may be in-efficient. If you know how to write basic ADO.NET code, this approach should not be very difficult to achieve. If you are new to ADO.NET, Click here for a video series that I have recorded on ADO.NET
http://www.youtube.com/playlist?listPL6n9fhu94yhX5dzHunAI2t4kE0kOuv4D7

Approach 3. Another approach would be, to create a SQL Server job. This job checks tblUsers table for locked accounts periodically and then unlocks them. The frequency at which the job should run is configurable.

In this video, we will discuss about creating and scheduling the SQL Server Job to unlock user accounts.

First let us write the update query to unlock the user accounts. For example, The organization's policy is that, the user account can only be unlocked after 24 hours, since the account is locked. The update query to satisfy the organization's policy is shown below. DateDiff function is used in the update query. If you are new to DateTime functions in SQL Server, please check this video by clicking here.
http://www.youtube.com/watch?veYsizQVa_EU

At the following link, you can find the text version of this video. You will also find the code samples used in the demo.
http://csharp-video-tutorials.blogspot.com/2012/12/unlocking-locked-user-accounts-part-94.html

سيتم تفعيل التعليقات قريبا

y
Sep 23, 2020 07:32:24
youtube