Opened 5 years ago

Closed 15 months ago

#131 closed enhancement (fixed)

runas

Reported by: anonymous Owned by: mickem
Priority: 1 Milestone: 0.4.0
Component: CheckExternalScripts Version: 0.3.0
Severity: Bugs Keywords:
Cc:

Description

It would be great if i can run each command from the NRPE Handlers with a different user like runas. Not all commands runs proberly with user system that is used for NSClient++ service. The password for the user in NSC.ini should be encrypted.
I have tried some other tools like "Encrypted Runas" together with NSClient++, but found no solution and not very practical.

Change History (6)

comment:1 follow-up: Changed 5 years ago by mickem

  • Milestone set to 0.4.0
  • Owner changed from MickeM to mickem
  • Status changed from new to assigned

First off, this could be doable, the "hard thing" is to figure out to how to add "options" for it, the ini file is getting "filled up".
but I think I could do a:

<command>=<the command>
<command>_user=<user>
<command>_password=<user>

As for encrypted, that is "impossible" (sort of) you could get them obfuscated, but since I need to "read them" it will be possible for others to do so as well (unless you do some "advanced" stuff).
But perhaps you meant obfuscated?

MickeM

comment:2 in reply to: ↑ 1 Changed 5 years ago by anonymous

Yes, you are right i meant obfuscated.
Thanks

comment:3 Changed 5 years ago by anonymous

Wish runas too. It's possible to implement it with 0.3.4? ;-)
CU

comment:4 Changed 5 years ago by mickem

it would clobber down the settings subsystem too much so I would rather add it after the re-worked settings system in 0.4.x)

MickeM

comment:5 Changed 15 months ago by mickem

  • Component changed from Core to CheckExternalScripts

comment:6 Changed 15 months ago by mickem

  • Resolution set to fixed
  • Status changed from assigned to closed

Added support for this like so:

[/settings/external scripts/scripts/test_user]
command=cmd /c "dir c:\windows\system32"
user=foobar
password=barfoo

This will be in RC3 (or next nightly build)

Note: See TracTickets for help on using tickets.