Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set SQl Login Passwords 1

Status
Not open for further replies.
Mar 12, 2003
678
US
Is there a script to set my sql logins passwords to ' ' (blank)? I am using sql 2000 sp4
 
That is generated by SQL Server 2005 and I can't teste this on SQL Server 2000 now:
Code:
USE [master]
GO
ALTER LOGIN [YourUserNameHere] WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO
USE [master]
GO
ALTER LOGIN [YourUserNameHere] WITH PASSWORD=N''
GO

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
Microsoft MVP VFP
 
Thanks for the reply: but this is the error i get:

Line 1: Incorrect syntax near 'LOGIN'.
 
Sorry, I can't get the script for SQL Server 2000 now.
How you login into SQL Server? With your Windows Account or SQL Server one?

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
Microsoft MVP VFP
 
Look in the Books OnLine for sp_password.

But WHY would you set the password to blank? That is so unsecure.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
If you login with Windows authentication you should set your own Windows password to blank. BUT!!!!! Are you sure you want that?

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
Microsoft MVP VFP
 
I have an application that is in a test environment that was moved from one server to another. I have 300 users that when they log into the test application their password will not work, so I as admin have to go into the application and reset each and every password. However if I set the users password to blank the application will force the user to create a password when they log in for the first time.
 
Than that application didn't use Windows Authentication. It uses SQL Server one.
Script what SQL Server does when you change password for some user and use that script.

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
Microsoft MVP VFP
 
I'll repeat:

Look in the Books OnLine for sp_password.


-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
Just as a followup this is what worked:

Code:
 sp_password,NULL,'123','login'

This will reset the password to 123, in which when you log into the app for the first time after the reset it forces the user to change the password.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top