.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Preventing users from changing password

Posted By:      Posted Date: September 04, 2010    Points: 0   Category :Sql Server
How to i keep users from changing password for a mssql account? We have a shared login which is readonly to the database.  But every now and then, someone decides to change the password.

View Complete Post

More Related Resource Links

Use Membership but bypass / disable password usage for users


I have an application that does LDAP authentication. The authentication is done on the code behind page of my Login.aspx page. Once the user passes LDAP authentication, a cookie is set and I redirect:

FormsAuthentication.RedirectFromLoginPage(UserName.Text, False)

I would like to setup membership in my application and keep track of some user information. But due to company security requirements, I cannot store user passwords on my application. That must stay on the LDAP server only.

Is there a way to store users but disable password storage on the aspnet_membership table?

How to remove a saved password from a users computer


Hi, I have an asp.net website that requires users to login using their Active Directory credentials. All users of the website have AD accounts. Some of the users are at remote locations and share a common computer login (I know this is not recommended but it is what it is, I have no say in that). Every so often a user will log into my website and click the Remember Passwod box which causes the next person that comes along to not be prompted to log in. All users are on IE 7.  I have tried having them go into tools and deleting the cookies, saved passwords, etc but when they go to my website they are still not being prompted to log in. I have recently migrated to IIS 7 and I understand there is a way to have the user enter the site through a custom form but I have not gotten that far yet. How can I make sure the users password is removed from IE? Thanks for any help.  

Change password for FBA users in claims setup not working as expected

Hi, I am trying to add a standard asp:changepassword control for external users. In the previous 2007 sharepoint environment this control was working "out of the box". I am pretty sure what is wrong as well,- but not sure how to fix it. A workaround that makes me able to change password is as follows: in the asp - control, I have added the option DisplayUserName="true" Then in the actual web-page, i can see that my username is: 0#.f|acaspnetsqlmembershipprovider|xxxxxx and not xxxxxx as i would excpect, as i use xxxxxx to log in. Editing the username to just xxxxxx makes the changing of password work, but this solution is not really nice to deploy to the normal end-users.. Any suggestion on how to make the username right? I've tried to set the username using the option UserName="<%=SPContext.Current.Web.CurrentUser.LoginName%>", but it does not seem to evaluate..  

Changing password character

Hi,  I have a textbox with single line mode, and i want to make it as password textbox not by making the textmode to password, but by programming, like calling a javascript function at onkeyup event and make the characters to a particular character, that should not show the characters i'm typing, any suggestions please.

Changing a users role with RadioButtons (User is always in single role)

So I have a set of 5 radio buttons corresponding to the roles a user can have on my website.  I have been successfully able to retreive what radio button needs to be checked for the role the user is currently in... string username = Request.QueryString["username"]; // Get Access Levels and populate radio buttons. if (Roles.IsUserInRole(username, "Banned") == true) { RadioButton4.Checked = true; } if (Roles.IsUserInRole(username, "Member") == true) { RadioButton1.Checked = true; } if (Roles.IsUserInRole(username, "FOB_Employee") == true) { RadioButton2.Checked = true; } if (Roles.IsUserInRole(username, "FOB_Administrator") == true) { RadioButton3.Checked = true; } if (Roles.IsUserInRole(username, "Webmaster") == true) { RadioButton5.Checked = true; } My problem is I do not know what to do with the actual procedure of changing the roles based on the new radio button selection.  I have tried many different methods, including using if statements to check if the user is currently in the role, remove him/her from that roll, and then add the user to the newly selected role.  It appears, from my testing, that you can not

Migrating existing cleat text users password to hashed password Membership Provider

Hello all ,I had been trying to solve this but there is a hidden key i wish someone point me to.I had a simple membership database with users in first the Membership  Provider configured for clear passwordto retrieve the original password .Now a new requirement say that the password must be hashed and reset .I configure the Membership password to hash , and Implemented the Reset Password Module.My problem is as follow.If the user is new registered user with the new configuration the password and the security answer is hashed.also when I go and reset the password it continue to be hashed.Now I thought that with new configuration if any previous user with clear text configuration , If he use the password Reset module , because my configuration now is hashed , I expected that the new password  and security answer will be hashed  . what happen is old user continue in clear text even if the configuration is hashed.so If I had new users everything is fine.old users Membership Provider somehow know they had been stored in clear text and it keep change password and security answer in clear text .If I delete this user and create it , Membership Provider understand that everything will be hashed.I need to know how it know this , I need to migrate users not to delete and recreate users .If there is a solution for that kindly expl

Preventing of Javascript files from being loaded for Anonymous Users



we have  developed an internet  site using Sharepoint 2010 and are trying to fine fine tune the site w.r.t. the performance and are trying to block the OOTB javascript files(i.e ie55up.js, init.js,SP.Core.js,cui,js etc.) for anonymous users.

Have tried all the conventional ways followed in Sharepoint 2007 for the same (i.e. tweaking SharePoint:ScriptLink , asp:ScriptManager controls, using Sharepoint:SPSecurityTrimmedControl etc.) but in vain.

It appears that the OOTB controls placed even in the Sharepoint:SPSecurityTrimmedControl block are called for anonymous users and call  the .js files).

Can anyone suggest the ways to remove the page weight , currently the javascript alone are taking 2MB even for the anonymous users.


Thanks and Regards,


Problem With space When updating password of active directory users from asp.net


Hello Friend's

From long time i am facing problem with Reseting password of users of active directory from asp.net.

The coding is work fine when there are no space in username but it's cause a problem when there are space in username.


usernametochange = "Ketan Patel";
                       ds.Filter = "(&(objectClass=user)(sAMAccountName=(" + usernametochange + ")))";
                       ds.PageSize = 100;

                       SearchResult account = ds.FindOne();
                       DirectoryEntry user = account.GetDirectoryEntry();
                       object[] oPassword = new object[] { "krtya#123" };

                           object ret = user.Invoke("SetPassword", oPassword);

if you have any idea about it please help me.

Thank you.....

Cannot force users to change password... argh.


I'm working on a web page to allow users to activate AD accounts on demand. I have everything working except for one thing: I cannot set the 'user must change password on next logon' flag. I've tried using the user.invoke("put", "pwdlastset" , "0") statement, but it doesn't appear to be having any effect...

does anyone have any idea how to do this?





Shawn Keslar

Professional Technologist

WVU Office of Information Tecnology

Morgantown,WV 26506 

Settting password expiry to login/users without domain policy dependency


Hi Friends,

I would require your help,in setting password expiry for login/users.But this shouldnt have any dependency with Windows Domain users expiry policy.For example our domain user expiry policy 45 days but we want sql server login/users password expiry to be 180days.For any clarifications




SEcuring a set up file with user name and password from another users.


Hai ,Everybody,

the requirement is securing the setup file from other users.

the server having all the users details having UserName and password.

when ever the installation starts the setup has to ask the username and passwore.

at this time the setup will connect with the server and cvheck the details

if the provided is correct only the installer will continues other wise it will exists.


Sql 2008 Encryption and changing the "sa" password


We have a sql 2008 server that uses the t-sql encryption "library" built into sql server. We created a cert and password to effect the data encryption.  Now we want to change the "sa" password on that server and are concerned that doing so could invalidate or impact our encrypted data. Is there any basis for that concern?





Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Some areas of the site usually contain less-dynamic information. Internal memos and corporate policies are common examples of this information. One option for this information is to post these documents in a document library. Documents in a library are often stored in a few different formats: Word, Acrobat (PDF), or HTML. Each of these formats has its drawbacks.

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

How to Encrypt and Decrypt a Password using SQLSERVER 2005?(Video)

Encypt and Decrypt a Password using SQLSERVER 2005(Video)
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend