Discussion Locked

Setting users passwords with Ldifde

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Microsoft Article ID: Q263991 talks about using ldifde to set user passwords. I have been attempting "The second way to modify the..." described in the article.

I plan on creating student accounts from a CSV file using csvde, this works fine, and then using ldifde to assign a password to the newly created student accounts, this produces errors.

The command I am running is this:
========================================
ldifde -i -f changepass.ldf -s servername -b admin_user kvcc.edu admin_password

The errors I receive while attempting this are:
========================================
Connecting to "mtec-2k"
Logging in as "admin_user" in domain
Importing directory from file "changepass.ldf
Loading entries.
There is a syntax error in the input file
Failed on token starting with 'I' on line 0 0 entries modified successfully.
An error has occurred in the program

the changepass.ldf file contains this:
======================================
dn: CN=Some User,OU=graphics,DC=servername,DC=kvcc,DC=edu
changetype: modify
replace: unicodePwd
unicodePwd::Im1pbmci

the password is enclosed in quotes and is base64 encoded.

encoded password = Im1pbmci
decoded password = "ming"

I am open to other methods toaccomplish this goal as well.

Thanks for your help.

7 replies

by sergey kovzik

Well... I assume everything is fine with your CN/OU/DC secription line. There is one thing - may be spaces isn't allowed but it isn't likely. Now about more serious thing - try to use IgBtAGkAbgBnACIA instead of Im1pbmci :)

Sincerely, Sergey
Brainbench MVP for Win98 Administration

by mr.mcse

Tried IgBtAGkAbgBnACIA, same error. The CN/OU/DC is correct because its a direct copy from the file that was used to import/create the user account which worked fine. Thanks.

by sergey kovzik

heh. ok. would you mind to add '-' string to next line after "unicodePwd::" string? right as it is in Microsofts example? =) but - if you'll get permissions error - this will mean that you have some restrictive policies in your domain or you don't have 128-bit security system etc...

Sincerely, Sergey
Brainbench MVP for Win98 Administration

by shanghai sam

Ok, I did have the syntax wrong. The "-" at the end is required. (MS Article ID: Q237677) However, I am still not able to modify a password (I tried both mine and yours). We have 128-bit enryption and I am running the command on the server itself so the secure connection from client to server should not be an issue. The error is different now though.

I am running this command:
ldifde -i -v -f cpass.ldif -s server_name -b admin_user kvcc.edu admin_password

The "cpass.ldif" file is this:
--------- start of file ------------
dn: CN=Scott Culp,OU=test,DC=kvcc,DC=edu
changetype: modify
replace: department
department: Staff
-

dn: CN=Scott Culp,OU=test,DC=kvcc,DC=edu
changetype: modify
replace: unicodePwd
unicodePwd::Im1pbmci
-

--------- end of file ------------

The results of running this command are:
----------------------------------------
Connecting to "server_name"
Logging in as "admin_user" in domain "kvcc.edu" using SSPI
Importing directory from file "cpass.ldif"
Loading entries
1: CN=Scott Culp,OU=test,DC=kvcc,DC=edu
Entry modified successfully.

2: CN=Scott Culp,OU=test,DC=kvcc,DC=edu

Add error on line 7: Unwilling To Perform
The server side error is "Illegal modify operation. Some aspect of the modificat
ion is not permitted."
1 entry modified successfully.
An error has occurred in the program

---------

Any ideas?

by expertpc

1st, you need to give Sergey (sp) some credit! He solved one of your problems. You stated you now have a new problem. Pay up.

Next, try running your command as a VB script as this circumvents any security when run on the DC. As I do not do VB I can not give you the proper script.

by mr.mcse

I would love to give some points to Sergey for his help. I am a newbie here (this happens to be my first question). How do I give him partial credit and yet leave the question open??

If I mark an answer as having been helpfull then that question has to be closed. Surely you would agree that my original question is yet unanswered because I still can't change users passwords via a script.

Thanks for the tip

This discussion is closed to new replies.