PC Review


Reply
Thread Tools Rate Thread

Clear user password in VB

 
 
fmc via AccessMonster.com
Guest
Posts: n/a
 
      29th Jul 2005

Does anyone know of a way to clear a user's password in VB if the user's old
password is unavailable? In other words, using VB code to do the same thing
as going to Tools/Security/User and Group Accounts... and clicking the Clear
Password button.

Thanks.


--
Message posted via http://www.accessmonster.com
 
Reply With Quote
 
 
 
 
TC
Guest
Posts: n/a
 
      29th Jul 2005
You do mean VB - not VBA?

I've never done it from VB. Maybe try something like this:

(UNTESTED)

' open the workgroup information file.
with dbengine
.systemdb = "xxx"
.defaultuser = "yyy"
.defaultpassword = "zzz"
end with
' erase user Fred's password.
dbengine(0).users("Fred").new*password "", "new password"
set dbengine = nothing

In that code, replace xxx with the full path to the relevant workgroup
information file; yyy with the name of any member of the Admins group
of that workgroup file; and zzz with that user's password.

HTH,
TC

 
Reply With Quote
 
fmc via AccessMonster.com
Guest
Posts: n/a
 
      29th Jul 2005

Thanks for the reply. Actually, I did mean VBA but it doesn't matter. The
security menu in Access will work for this project.

Thanks again.


--
Message posted via http://www.accessmonster.com
 
Reply With Quote
 
TC
Guest
Posts: n/a
 
      31st Jul 2005
If you meant VBA (not VB) then the code I gave you will not work.

To do it in VBA, you would use CreateWorkspace to create a workspace
for a member of the Admins group, then NewPassword to reset the
relevant user's password.

HTH,
TC

 
Reply With Quote
 
fmc via AccessMonster.com
Guest
Posts: n/a
 
      31st Jul 2005

Thank you!

--
fmc


Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...urity/200507/1
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to clear the previous user id and password for windows explorer for using FTP? Eric Windows XP General 3 18th Dec 2008 12:43 AM
To clear the Open Other User's Folder list & To clear the Find a Contact list JW Microsoft Outlook 1 30th Jan 2008 07:19 PM
How to clear "Save user name and password" for this web page Spin Windows XP Basics 2 12th Jul 2006 06:59 PM
How to clear "Save user name and password" for this web page Spin Windows XP General 2 12th Jul 2006 06:59 PM
Password: How to clear password list saved by Window? =?Utf-8?B?S3lhdyBTb2UgTGlu?= Windows XP Security 0 8th Apr 2005 09:55 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:39 PM.