Re: How to change users' password

From: Alex (Alex_at_discussions.microsoft.com)
Date: 12/30/04


Date: Thu, 30 Dec 2004 09:49:05 -0800

Thank you for your reply
Yes I could use cursor to do that, I just thought someone already had that
kind of script, I should metioned that earlyer, sorry.
Now the question is where can I get user's list (it is
master..sysxlogins?)and exclude windows logins such as BUILTIN\Administrators
or domain\users
Should I use xstatus to filter them out? I reallzied all local users has "2"
for xstatus
what is xstatus any way?
What are two users that has NULL for name and NULL for sid??
And there are 2 "sa" accounts on that table...??

Thank you so much.

"Derrick Leggett" wrote:

> From Books Online:
>
> sp_password
> New Information - SQL Server 2000 SP3.
>
> Adds or changes a password for a Microsoft® SQL ServerT login.
>
> Syntax
> sp_password [ [ @old = ] 'old_password' , ]
> { [ @new =] 'new_password' }
> [ , [ @loginame = ] 'login' ]
>
>
>
> You can write a script to collect all the logins into a table. Then just
> use a WHILE loop to loop through the table and change all the passwords to
> the same thing. Let us know if you need a script to do this.
>
>
>
>
>
> "Alex" <Alex@discussions.microsoft.com> wrote in message
> news:0BE69EBA-23CD-4038-9993-80B89439782F@microsoft.com...
> > Hi
> > I have a database that will retire, but not so soon. I need to restrict
> the
> > access to the database that has over 400 user accounts. I want to reset
> the
> > password of them to something, so they don't get any access, deleting
> > accounts are not acceptable at this point.
> > Is there anyway to change 400 users' password to same password using a
> > simple query? (and of course sa and windows accounts are excluded)
> > Thank you



Relevant Pages

  • Re: How to change users password
    ... >> Adds or changes a password for a Microsoft® SQL ServerT login. ... >> You can write a script to collect all the logins into a table. ... >> use a WHILE loop to loop through the table and change all the passwords to ...
    (microsoft.public.sqlserver.security)
  • Re: Report in FM 6 or 7
    ... achieve this report format will have to be done via scripting. ... but they will simplify the script and Sort Order. ... End Loop ... The normal 'Dancer' field is used so that if there are more than one ...
    (comp.databases.filemaker)
  • Re: recreate database script not work
    ... I got a script which is supposed to regenerate database systax. ... REM gen_dbse_9.sql ... end loop; ...
    (comp.databases.oracle.server)
  • Re: Loop Problem (At Least I think)
    ... If there are no images matching the product ... "" Then" statement (the one below the loop, outside of it), is this just ... >> script to finish. ... > 2) Read the database table and acess the dictionary object for the ...
    (microsoft.public.scripting.vbscript)
  • Re: How to set up a global variable in a sub-routine?
    ... the 'global variables' are more like constants ... ... single script, I need a way to tell it only once where the file is and ... So, if you construct a loop with a loop variable, you ... >programmers avoid global variables completely. ...
    (perl.beginners)