NetXMS Support Forum

English Support => General Support => Topic started by: Woody on January 13, 2020, 11:12:19 PM

Title: login with nxencpasswd not working
Post by: Woody on January 13, 2020, 11:12:19 PM
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!
Title: Re: login with nxencpasswd not working
Post by: Alex Kirhenshtein on January 14, 2020, 02:10:07 PM
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?
Title: Re: login with nxencpasswd not working
Post by: Woody on January 15, 2020, 11:33:52 AM
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.
Title: Re: login with nxencpasswd not working
Post by: Alex Kirhenshtein on January 15, 2020, 01:21:18 PM
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=
Title: Re: login with nxencpasswd not working
Post by: Woody on January 15, 2020, 02:40:07 PM
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.
Title: Re: login with nxencpasswd not working
Post by: Victor Kirhenshtein on January 16, 2020, 11:31:17 AM
Hi,

I just increased maximum password length for nxencpasswd in 3.2 branch.

Best regards,
Victor
Title: Re: login with nxencpasswd not working
Post by: Woody on January 16, 2020, 02:10:30 PM
Okay. Thank you very much!  :D

Best regards