From cb259593ef3394872f6cd822f654820721013b96 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Jan 14 2020 00:25:38 +0000 Subject: Issue 50816 - dsconf allows the root password to be set to nothing Bug Description: dsconf allows you to set the root DN password to nothing/ Fix Description: Do not allow the root DN password to be set to nothing relates: https://pagure.io/389-ds-base/issue/50816 Reviewed by: firstyear(Thanks!) --- diff --git a/src/lib389/lib389/idm/directorymanager.py b/src/lib389/lib389/idm/directorymanager.py index bb3b583..4c573e7 100644 --- a/src/lib389/lib389/idm/directorymanager.py +++ b/src/lib389/lib389/idm/directorymanager.py @@ -31,6 +31,8 @@ class DirectoryManager(Account): self._protected = True def change_password(self, new_password): + if new_password == "": + raise ValueError("You can not set the Directory Manager password to nothing") self._instance.config.set('nsslapd-rootpw', new_password) def bind(self, password=PW_DM, *args, **kwargs):