Menu

#5 Unix command line NTsyslogctrl

open
nobody
None
5
2003-02-04
2003-02-04
Anonymous
No

It would be nice to be able to configure hundreds of
NTsyslogs from a script running on Unix/Linux servers.
Of course NTsyslog should require some kind of
authentication (maybe souce IP address).

Discussion

  • Troy Johnson

    Troy Johnson - 2005-02-11

    Logged In: YES
    user_id=2488

    This could already be done with a combination of Samba and
    OpenSSH:

    1) Use smbclient (or scp or pscp) to push a "file.reg" file
    (containing the settings you require) to the client, or just
    put it on an accessable share (or any other viable
    ftp/http/file protocal option).
    2) Use ssh to merge the registry file (regedit /s file.reg).
    3) Use ssh to restart the NTsyslog service ('net stop
    NTsyslog', and 'net start NTsyslog').

    and the settings are in effect. This would require OpenSSH
    to be installed on all the Windows boxes, but that is much
    better (from a security perspective) than enabling telnet on
    the boxes. There may be other ways of remotely executing
    commands, but I don't remember any off the top of my head.

     
  • Troy Johnson

    Troy Johnson - 2005-02-11

    Logged In: YES
    user_id=2488

    Here is a script (batch file) to facilitate making the
    registry files:

    @ECHO off
    REM *** Export the current NTSyslog settings to a file

    SET RE=regedit
    SET KEY=HKEY_LOCAL_MACHINE\SOFTWARE\SaberNet
    SET FILE=ntsyslog.reg

    IF "%1"=="" GOTO default
    SET FILE=%1

    :default
    ECHO Exporting registry key:
    ECHO.
    ECHO %KEY%
    ECHO.
    ECHO to file:
    ECHO.
    ECHO %FILE%
    ECHO.

    %RE% /e %FILE% %KEY%

    ECHO Complete.
    ECHO.
    ECHO Now %FILE% can be edited, merged via gui, or use:
    ECHO.
    ECHO %RE% /s %FILE%
    ECHO.
    ECHO in a login script to import with no prompt.
    ECHO.

    PAUSE

     

Log in to post a comment.

MongoDB Logo MongoDB