Hi there!
Found out on a Centos 7 that no matter what the user omdadmin wont
federate. The first bug report I must file is: Logging facility - none
found. The second one is that the htpasswd.py is expecting an OS passwd
file, while official documentation (
https://httpd.apache.org/docs/2.4/misc/password_encryptions.html) is
documenting otherwise.
I debugged and came with the next patch.
--- /tmp/htpasswd.py 2019-03-02 15:12:40.572009697 -0600
+++ /omd/sites/site/share/check_mk/web/plugins/userdb/htpasswd.py 2017-03-27
06:25:13.000000000 -0600
@@ -27,11 +27,12 @@
import crypt
import defaults
+
def encrypt_password(password, salt = None):
import md5crypt
if not salt:
salt = "%06d" % (1000000 * (time.time() % 1.0))
- return md5crypt.md5crypt(password, salt, '$apr1$')
+ return md5crypt.md5crypt(password, salt, '$1$')
class HtpasswdUserConnector(UserConnector):
@@ -59,7 +60,6 @@
#
def check_credentials(self, username, password):
-
users = self.load_htpasswd()
if username not in users:
return None # not existing user, skip over
@@ -87,7 +87,7 @@
# crypt() and md5 hashes. This should be the common cases in the
# used htpasswd files.
def password_valid(self, pwhash, password):
- if pwhash[:6] == '$apr1$':
+ if pwhash[:3] == '$1$':
salt = pwhash.split('$', 3)[2]
return pwhash == encrypt_password(password, salt)
else:
#======================
Thank you for your kind attention.
Patricio Mario Dorantes Jamarne
_______________________________________________
omd-users mailing list
[email protected]
Manage your subscription or unsubscribe
https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/omd-users