Description of problem:
Section 23.3 Disabling anonymous binds
Example show -w secret for putting in the password on the command line, remainder of example acts as if -W was put in and prompts for password. As well it would probably be best to do this bind using tls so adding -ZZ to the command.
Same page also references using service to restart dirsrv, through this will work probably best to use systemctl.
Actually check that, restarting the service that way will not even work. So that needs to be fixed as well.
Good catch. Tomas Capek is already busy with fixing issues like that in our IdM guide, I am moving this bug to his queue so that he does not forget.
The correct command & output is indeed:
$ ldapmodify -x -D "cn=Directory Manager" -W -h server.example.com -p 389 -ZZ
Enter LDAP Password:
modifying entry "cn=config"