Page 1 of 2

WMI_Authorization_File

Posted: Wed Oct 23, 2019 4:15 pm
by mamir
Hello Support,

I'm trying to use the Authorization file, however, im see the below error message. I followed this document exactly the Authorization File section.

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Please, help.

Re: WMI_Authorization_File

Posted: Wed Oct 23, 2019 4:17 pm
by mamir
Attached.

Re: WMI_Authorization_File

Posted: Wed Oct 23, 2019 4:25 pm
by mamir
Authorization File Pic.

Re: WMI_Authorization_File

Posted: Wed Oct 23, 2019 4:44 pm
by cdienger
Did you follow all of the steps in the documentation to setup a wmiagent account on the remote machine?

The message is an indication that the contents of the file do not contain the credentials needed to connect to the remote machine. Verify the username and password are correct in this file and that the account was created on the remote machine with the proper permissions.

Re: WMI_Authorization_File

Posted: Wed Oct 23, 2019 5:22 pm
by mamir
Yes, I did. Because When I use the same credentials in Nagios WMI, it works. But when I put same exact credentials into the file, it gives me this error which is strange. I have created the file manually, in the directory: /usr/local/nagios/etc/authorization.txt

When I created with the SSH, I don't see the file in the directory.

Re: WMI_Authorization_File

Posted: Thu Oct 24, 2019 1:00 pm
by mamir
Hello support,

Any updates on above query. Also, is there a specific method does this File must be created, I followed the document on Nagios with using commands, however when I attempt to create the file, for some reason it doesn't show up in the directories, I couldn't locate it. so I simply created manually the authentication file, no sure if that makes any difference?

Re: WMI_Authorization_File

Posted: Thu Oct 24, 2019 3:46 pm
by lmiltchev
Open a SSH (putty) session to the Nagios XI server, run the following commands, and show the output:

Code: Select all

ls-ls /usr/local/nagios/etc/authorization.txt
file /usr/local/nagios/etc/authorization.txt
cat /usr/local/nagios/etc/authorization.txt
Please, obfuscate sensitive info.

Re: WMI_Authorization_File

Posted: Thu Oct 24, 2019 4:54 pm
by mamir
[root@NSDNagiosXi ~]# ls-ls /usr/local/nagios/etc/authorization.txt
-bash: ls-ls: command not found
[root@NSDNagiosXi ~]# file /usr/local/nagios/etc/authorization.txt
/usr/local/nagios/etc/authorization.txt: ASCII text
[root@NSDNagiosXi ~]# cat /usr/local/nagios/etc/authorization.txt
username=test.account
password=WELcome12345678!
[root@NSDNagiosXi ~]#

Re: WMI_Authorization_File

Posted: Fri Oct 25, 2019 9:06 am
by lmiltchev
I had a typo in my first command - sorry about that! I wanted to check the permissions of the auth file. Then command should've been:

Code: Select all

ls -la /usr/local/nagios/etc/authorization.txt
The issue is however most likely caused by the "!" character in the password. Can you try changing your password to something simple (no special characters), just for testing purposes?

Re: WMI_Authorization_File

Posted: Fri Oct 25, 2019 1:08 pm
by mamir
[root@NSDNagiosXi ~]# ls -la /usr/local/nagios/etc/authorization.txt
-rwxrwxr-x 1 apache nagios 48 Oct 24 17:52 /usr/local/nagios/etc/authorization.txt
[root@NSDNagiosXi ~]# file /usr/local/nagios/etc/authorization.txt
/usr/local/nagios/etc/authorization.txt: ASCII text
[root@NSDNagiosXi ~]# cat /usr/local/nagios/etc/authorization.txt
username=test.account
password=WELcome12345678!
[root@NSDNagiosXi ~]#