[Check_mk (english)] How do I create a new user from the command line?

So far I’ve been able to find a command line alternative to various WATO capabilities that I’ve needed to exercise via an automation script. However, I have yet to figure out how to create a new monitoring user via a script outside of editing the users.mk file using various Bash commands. Is there some supported way of doing this using OMD or CMK commands?

`Hi,

you can use the API. Check out the possibilities: `

`

https://checkmk.de/cms_web_api_references.html

`

···

On 11/20/19 5:58 PM, Ron Wurzberger wrote:

So far I’ve been able to find a command line alternative to various WATO capabilities that I’ve needed to exercise via an automation script. However, I have yet to figure out how to create a new monitoring user via a script outside of editing
the users.mk file using various Bash commands. Is there some supported way of doing this using OMD or CMK commands?


_______________________________________________
checkmk-en mailing list
Manage your subscription or unsubscribe

checkmk-en@lists.mathias-kettner.dehttps://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en


-- Beste Grüße
Ghassan Elrayah
Mail:

ghassan.elrayah@live.de

`here is the English reference

`

`https://checkmk.com/cms_web_api_references.html

`

···

On 11/20/19 5:58 PM, Ron Wurzberger wrote:

So far I’ve been able to find a command line alternative to various WATO capabilities that I’ve needed to exercise via an automation script. However, I have yet to figure out how to create a new monitoring user via a script outside of editing
the users.mk file using various Bash commands. Is there some supported way of doing this using OMD or CMK commands?


_______________________________________________
checkmk-en mailing list
Manage your subscription or unsubscribe

checkmk-en@lists.mathias-kettner.dehttps://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en


-- Beste Grüße
Ghassan Elrayah
Mail:

ghassan.elrayah@live.de

Thanks for the suggestion. Unfortunately I cannot use that method because it requires me to transmit login credentials in clear text, which is forbidden under the security rules I must operate under.

···

On Wed, Nov 20, 2019 at 12:08 PM Ghassan Elrayah ghassan.elrayah@live.de wrote:

`here is the English reference

`

`https://checkmk.com/cms_web_api_references.html

`
On 11/20/19 5:58 PM, Ron Wurzberger wrote:

So far I’ve been able to find a command line alternative to various WATO capabilities that I’ve needed to exercise via an automation script. However, I have yet to figure out how to create a new monitoring user via a script outside of editing
the users.mk file using various Bash commands. Is there some supported way of doing this using OMD or CMK commands?

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
[https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en](https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en)

-- Beste Grüße
Ghassan Elrayah
Mail: ghassan.elrayah@live.de

checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

Manage your subscription or unsubscribe

https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en

well, you could transmit over SSL, I assume you have setup https for check_mk. We use all the time the API over SSL for all kind of operations, only for the users we use LDAP/AD.

···

On 11/20/19 6:31 PM, Ron Wurzberger wrote:

Thanks for the suggestion. Unfortunately I cannot use that method because it requires me to transmit login credentials in clear text, which is forbidden under the security rules I must operate under.

On Wed, Nov 20, 2019 at 12:08 PM Ghassan Elrayah ghassan.elrayah@live.de wrote:

`here is the English reference

`

`https://checkmk.com/cms_web_api_references.html

`
On 11/20/19 5:58 PM, Ron Wurzberger wrote:

So far I’ve been able to find a command line alternative to various WATO capabilities that I’ve needed to exercise via an automation script. However, I have yet to figure out how to create a new monitoring user via a script outside of editing
the users.mk file using various Bash commands. Is there some supported way of doing this using OMD or CMK commands?

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
[https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en](https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en)

-- Beste Grüße
Ghassan Elrayah
Mail: ghassan.elrayah@live.de

checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

Manage your subscription or unsubscribe

https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en


-- Beste Grüße
Ghassan Elrayah
Mail:

ghassan.elrayah@live.de

Hi Ron,

you don’t have to submit the clear text passwords. First use an automation user for the API. This user cannot login to the website.

And if you use HTTPS then you also will not transmit in clear text.

The API is the only way to add/modify users outside of WATO.

Best regards

Andreas

···

Am Mi., 20. Nov. 2019 um 18:31 Uhr schrieb Ron Wurzberger rewurzb@gmail.com:

Thanks for the suggestion. Unfortunately I cannot use that method because it requires me to transmit login credentials in clear text, which is forbidden under the security rules I must operate under.

On Wed, Nov 20, 2019 at 12:08 PM Ghassan Elrayah ghassan.elrayah@live.de wrote:

`here is the English reference

`

`https://checkmk.com/cms_web_api_references.html

`
On 11/20/19 5:58 PM, Ron Wurzberger wrote:

So far I’ve been able to find a command line alternative to various WATO capabilities that I’ve needed to exercise via an automation script. However, I have yet to figure out how to create a new monitoring user via a script outside of editing
the users.mk file using various Bash commands. Is there some supported way of doing this using OMD or CMK commands?

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
[https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en](https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en)

-- Beste Grüße
Ghassan Elrayah
Mail: ghassan.elrayah@live.de

checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

Manage your subscription or unsubscribe

https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

Manage your subscription or unsubscribe

https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en

Hi Ron,

you don't have to submit the clear text passwords. First use an automation user for the API. This user cannot login to the website.
And if you use HTTPS then you also will not transmit in clear text.
The API is the only way to add/modify users outside of WATO.

      I think the concern is GET vs POST and browser history (AFAIK
only place where they are really different when run from within
HTTPS). Automation user may not login to website (I guess that means
WATO since the API is connecting using https) but still can do lots of
exciting things.

···

On Sat, Nov 23, 2019 at 12:50 PM Andreas Döhler <andreas.doehler@gmail.com> wrote:

Best regards
Andreas

Am Mi., 20. Nov. 2019 um 18:31 Uhr schrieb Ron Wurzberger <rewurzb@gmail.com>:

Thanks for the suggestion. Unfortunately I cannot use that method because it requires me to transmit login credentials in clear text, which is forbidden under the security rules I must operate under.

On Wed, Nov 20, 2019 at 12:08 PM Ghassan Elrayah <ghassan.elrayah@live.de> wrote:

here is the English reference

Command reference for the HTTP-API

On 11/20/19 5:58 PM, Ron Wurzberger wrote:

So far I've been able to find a command line alternative to various WATO capabilities that I've needed to exercise via an automation script. However, I have yet to figure out how to create a new monitoring user via a script outside of editing the users.mk file using various Bash commands. Is there some supported way of doing this using OMD or CMK commands?

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en

--

Beste Grüße

Ghassan Elrayah
Mail: ghassan.elrayah@live.de

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en