Change default admin password in ApacheDS
Asked Answered
B

3

7

Am new to ApacheDS - am using apacheds-2.0.0-M17.

The default password for admin is secret.

Does anyone know where I can change the value to something else?

Inside:

apacheds/instances/default/conf/config.ldif 

Found the following entry:

ads-pwdattribute: userPassword

When googling it, there are a lot of examples that mention doing it using Apache Directory Studio but the particular instance I am trying to configure is running in a Linux shell in a headless (no UI) mode.

Tried using the following command with ldapmodify and the cursor hangs (keeps blinking) after pressing enter. I even tried prepending it with sudo and the same thing happens.

ldapmodify -H ldap://localhost:10389 -D "uid=admin,ou=system" -x -w secret

Does anyone know why it hangs?

What am I possibly doing wrong?

Thanks again,

James

Bimolecular answered 19/10, 2015 at 18:29 Comment(0)
B
8

Changing the admin account password is documented in the ApacheDS documentation.

ldapmodify, if not given a file to process with -f parameter, waits for input from standard input, on which it expects a LDIF formatted file with modifications to perform.

In your case such a LDIF file would look something like:

dn: uid=admin,ou=system
changetype: modify
replace: userPassword
userPassword: new-password
Booma answered 23/10, 2015 at 19:13 Comment(0)
O
1

BTW, you can still use Apache Directory Studio (or any other graphical LDAP client) to make this change, even if your directory is running on a headless server. LDAP is, after all, a network protocol. Just run the LDAP client on a local machine and connect over the network to your server. (Of course, I leave it to you to figure out if you have to open up some firewall rules or whatever.)

Outlast answered 24/12, 2019 at 4:43 Comment(0)
L
0
dn: uid=admin,ou=system
changetype: modify
replace: userPassword
userPassword: new-password
-

After each modification, you need to add the end of "-"!!!

Lignite answered 9/9, 2021 at 2:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.