Author Topic: login with nxencpasswd not working  (Read 90 times)

Woody

  • Newbie
  • *
  • Posts: 19
    • View Profile
login with nxencpasswd not working
« on: January 13, 2020, 11:12:19 pm »
Hello,
i want to encrypt my database password with nxencpasswd. At first i executed this command:
Code: [Select]
# nxencpasswd netxms 'k081vv3C$UKe7z!ysP4Yf408^4m78SGF'
gyuWboDpO52LQYPeHCQ6LlksHezjf3cJmhb5/VpmgJE=

Than i edited my /etc/netxmsd.conf to this:
Code: [Select]
## 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:
Code: [Select]
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!
« Last Edit: January 15, 2020, 11:30:38 am by Woody »

Alex Kirhenshtein

  • Team Member
  • Administrator
  • Hero Member
  • *****
  • Posts: 930
    • View Profile
Re: login with nxencpasswd not working
« Reply #1 on: January 14, 2020, 02:10:07 pm »
On my system this encoded password is different:
Code: [Select]
➜ ~ nxencpasswd netx 'k081vv3C$UKe7z!ysP4Yf408^4m78SGF'
STeHwaoRxKBJIy3cwcleEAcdrDERe/54rbusH9c57kA=

Do you use prepackaged binaries or do you compile netxms yourself?

Woody

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: login with nxencpasswd not working
« Reply #2 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.
« Last Edit: January 15, 2020, 11:35:26 am by Woody »

Alex Kirhenshtein

  • Team Member
  • Administrator
  • Hero Member
  • *****
  • Posts: 930
    • View Profile
Re: login with nxencpasswd not working
« Reply #3 on: January 15, 2020, 01:21:18 pm »
nxencpasswd does not support passwords longer than 32 symbols, you have 33:
Code: [Select]
➜ 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=

Woody

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: login with nxencpasswd not working
« Reply #4 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.

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 6829
    • View Profile
Re: login with nxencpasswd not working
« Reply #5 on: January 16, 2020, 11:31:17 am »
Hi,

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

Best regards,
Victor

Woody

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: login with nxencpasswd not working
« Reply #6 on: January 16, 2020, 02:10:30 pm »
Okay. Thank you very much!  :D

Best regards