Link to home
Create AccountLog in
Avatar of ambri5h
ambri5hFlag for United Kingdom of Great Britain and Northern Ireland

asked on

adding bulk users through ldifde

Hi,

I am trying to import 200+ users into Active Directory using the ldifde command.
When I use: ldifde -i -f create.ldf I get the following error:

Connecting to "server.domain.com"
Logging in as current user using SSPI
Importing directory from file "Create.ldf"
Loading entries.
There is a syntax error in the input file
Failed on line 1.  The last token starts with 'ï'.
0 entries modified successfully.
An error has occurred in the program
No log files were written.  In order to generate a log file, please
specify the log file path via the -j option.

Below is a sample of the data I am importing from:

dn: CN=test,OU=users,DC=domain,DC=Com
changetype: add
cn: user1
sn: test
givenname: test
c: UK
l: LONDON
mail: ztest@hotmail.co.uk
instancetype: 4
displayname: test
userAccountControl: 512
logonHours:: gP8BgP8PgP8PgP8PgP8PgP8PgP8B
accountExpires: 130223808000000000
samAccountName: test
userprincipalname: test@domain.com
objectclass: user
homeDirectory: \\server\Users\test

Any help would be appreciated as its driving me nuts!

Many thanks,

Ambrish
SOLUTION
Avatar of Pedestrian1
Pedestrian1

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Avatar of Premkumar Yogeswaran
Premkumar Yogeswaran
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of ambri5h

ASKER

Thanks both, in the end I actually ended up converting the LDF file to CSV and combining this with a VBS script which then deals with password issues - i.e. password, expiry date of account, and forcing a password reset.

I'll distribute some points to you two in any case.