-
Jan 6th, 2002, 11:39 PM
#1
Thread Starter
Hyperactive Member
Reset VSS Admin Password
Hi,
One of my colleagues has this problem. Does anyone know a way thru this one?
"I forgot my VSS admin password. How to reset it?"
thanks,
Jemima.
-
Jan 7th, 2002, 06:59 AM
#2
Thread Starter
Hyperactive Member
-
Jan 7th, 2002, 07:02 AM
#3
Reinstall is about the only way I can think of...
-
Jan 7th, 2002, 07:13 AM
#4
Fanatic Member
The best place to do this, is in an empty VSS database. Save the data\um.dat
file here, and get a copy of the data\um.dat file from the database where
the admin password is lost. Verify that you are prompted for a password when
opening VSS Admin on this database.
With a good binary data editor, like UltraEdit-32, replace the 2 bytes just
before "Admin" with BC 7F, and the 2 bytes at offset +32 bytes counting from
the A in Admin with 90 6E. In a database where Admin is the first entry, the
(decimal) offsets are 130, 131 for the first 2 bytes, (the 'A' in Admin has
offset 132), and 164, 165 for the last 2 bytes. When Admin is not the first
entry (VSS saves users alphabetically), these offsets are +64 per user
before Admin. You can also easily test that this is the needed change by
saving um.dat before and after setting the Admin password in an empty VSS
database, and (binary) compare the before and after um.dat files (this is
how we found this hack anyway). Now verify with VSS admin that there is no
password prompt anymore, and then copy the fixed um.dat file back to the
database where the problem occurred.
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Jan 7th, 2002, 07:18 AM
#5
Fanatic Member
heres the c++ code to do it for you....
Code:
// Reset Admin password in um.dat to blank:
//
// Must be able to read and write in current directory containing
// um.dat. The fixed version of um.dat is written to umfix.dat, which
// must be manually renamed to um.dat (be sure to backup um.dat
// first).
//
// Compile with Visual C: cl resetadm.c
#include <stdio.h>
#define MAXBUF 65536
// The entire um.dat file is read and written in one chunk. If 64K is
// not enough, increase this value.
main()
{
FILE *fpr, *fpw;
char buf[MAXBUF];
int nr, nw, i;
fpr=fopen("um.dat", "rb");
if(!fpr)
fprintf(stderr, "Cannot open um.dat for read\n");
fpw=fopen("umfix.dat", "wb");
if(!fpw)
fprintf(stderr, "Cannot open umfix.dat for write\n");
if(!fpr || !fpw)
{
perror("fopen");
exit(1);
}
nr = fread(buf, sizeof(char), MAXBUF, fpr);
if(!feof(fpr))
{
fprintf(stderr, "Did not reach EOF on um.dat\n");
exit(2);
}
// Search for admin password:
for(i=132; i<nr; i+=64)
{
if(0==memcmp(buf+i, "Admin", 5))
break;
}
if(i>nr)
{
fprintf(stderr, "Could not find admin password\n");
exit(3);
}
buf[i-2]=0xBC;
buf[i-1]=0x7F;
buf[i+32]=0x90;
buf[i+33]=0x6E;
nw = fwrite(buf, sizeof(char), nr, fpw);
if(nw != nr)
{
fprintf(stderr, "Could not write umfix.dat\n");
exit(4);
}
printf("Now backup um.dat, and rename umfix.dat to um.dat\n");
fclose(fpr);
fclose(fpw);
return 0;
}
if you want it compiling to an EXE let me know....
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Jan 7th, 2002, 10:29 AM
#6
Thread Starter
Hyperactive Member
Hi Crispin,
My colleague says "Thanks soo much. Its worked!"
He used the tool u suggested.
You were of gr8 help.
thanks,
jemima.
-
Jan 7th, 2002, 10:29 AM
#7
Fanatic Member
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|