Hello,
i want to encrypt my database password with nxencpasswd. At first i executed this command:
# nxencpasswd netxms 'k081vv3C$UKe7z!ysP4Yf408^4m78SGF'
gyuWboDpO52LQYPeHCQ6LlksHezjf3cJmhb5/VpmgJE=
Than i edited my /etc/netxmsd.conf to this:
## Option #3 - MySQL:
DBDriver=mysql.ddr
DBServer=10.10.11.20
DBName=netxms
DBLogin=netxms
DBEncryptedPassword=gyuWboDpO52LQYPeHCQ6LlksHezjf3cJmhb5/VpmgJE=
Now i started netxmsd service and got this error:
2020.01.13 20:57:49.856 Log file opened (rotation policy 2, max size 16777216)
2020.01.13 20:57:49.857 *I* [ ] Code page set to ISO8859-1
2020.01.13 20:57:49.858 *I* [ ] Platform subagent "/usr/lib/x86_64-linux-gnu/netxms/linux.nsm" successfully loaded
2020.01.13 20:57:49.860 *I* [db.drv ] Database driver "mysql.ddr" loaded and initialized successfully
2020.01.13 20:58:14.907 *E* [ ] Unable to establish connection with database (Access denied for user 'netxms'@'10.10.11.15' (using password: YES))
I hope someone knows what the problem is.
Thanks in advance!
On my system this encoded password is different:
➜ ~ nxencpasswd netx 'k081vv3C$UKe7z!ysP4Yf408^4m78SGF'
STeHwaoRxKBJIy3cwcleEAcdrDERe/54rbusH9c57kA=
Do you use prepackaged binaries or do you compile netxms yourself?
I made a mistake in my previous post. I corrected my old post. This is why your encoded password is different. I installed NetXMS from packages.
nxencpasswd does not support passwords longer than 32 symbols, you have 33:
➜ orig git:(master) ✗ nxencpasswd netxms 'k081vv3C$UKe7z!ysP4Yf408^4m78SGF'
gyuWboDpO52LQYPeHCQ6LlksHezjf3cJmhb5/VpmgJE=
➜ orig git:(master) ✗ nxencpasswd netxms 'k081vv3C$UKe7z!ysP4Yf408^4m78SG'
gyuWboDpO52LQYPeHCQ6LlksHezjf3cJmhb5/VpmgJE=
➜ orig git:(master) ✗ nxencpasswd netxms 'k081vv3C$UKe7z!ysP4Yf408^4m78S'
gyuWboDpO52LQYPeHCQ6LlksHezjf3cJnms/LdPWmmg=
Okay, thank you very much! :D Now it's working.
Can you change this limitation in future releases of NetXMS, because many passwords are longer than 32 symbols. When you see it from security perspective, you shouldn't limt the password length with such a "low" limit. Now 32 symbols are quite "okay", but I think in future this limitation could be critical.
Hi,
I just increased maximum password length for nxencpasswd in 3.2 branch.
Best regards,
Victor
Okay. Thank you very much! :D
Best regards