This repository has been archived by the owner on Apr 19, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
189 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
Description: <short summary of the patch> | ||
TODO: Put a short summary on the line above and replace this paragraph | ||
with a longer explanation of this change. Complete the meta-information | ||
with other relevant fields (see below for details). To make it easier, the | ||
information below has been extracted from the changelog. Adjust it or drop | ||
it. | ||
. | ||
securityonion-nsmnow-admin-scripts (20120724-0ubuntu0securityonion135) trusty; urgency=medium | ||
. | ||
* issues 944 937 943 | ||
Author: Doug Burks <doug.burks@gmail.com> | ||
|
||
--- | ||
The information above should follow the Patch Tagging Guidelines, please | ||
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here | ||
are templates for supplementary fields that you might want to add: | ||
|
||
Origin: <vendor|upstream|other>, <url of original patch> | ||
Bug: <url in upstream bugtracker> | ||
Bug-Debian: http://bugs.debian.org/<bugnumber> | ||
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber> | ||
Forwarded: <no|not-needed|url proving that it has been forwarded> | ||
Reviewed-By: <name and email of someone who approved the patch> | ||
Last-Update: <YYYY-MM-DD> | ||
|
||
--- securityonion-nsmnow-admin-scripts-20120724.orig/usr/sbin/nsm_sensor_backup-config | ||
+++ securityonion-nsmnow-admin-scripts-20120724/usr/sbin/nsm_sensor_backup-config | ||
@@ -165,9 +165,12 @@ then | ||
BACKUP_FILE=$PROMPT_RET | ||
fi | ||
|
||
-# prompt to backup the configuration | ||
+# prompt to backup the configuration, ignore if --force-yes is used | ||
prompt_user_yesno "Backup Sensor Configuration" "All configurations for sensor \"$SENSOR_NAME\" will be backed up to:\n$BACKUP_FILE\n\nDo you want to continue?" "N" | ||
-[ "$?" -ne 0 ] && exit 1 | ||
+if [ $FORCE_YES == "yes" ] | ||
+then | ||
+ PROMPT_RET=Y | ||
+fi | ||
if [ "$PROMPT_RET" != "Y" -a "$PROMPT_RET" != "y" ] | ||
then | ||
exit 1 | ||
--- securityonion-nsmnow-admin-scripts-20120724.orig/usr/sbin/nsm_server_backup-config | ||
+++ securityonion-nsmnow-admin-scripts-20120724/usr/sbin/nsm_server_backup-config | ||
@@ -162,8 +162,13 @@ then | ||
BACKUP_FILE=$PROMPT_RET | ||
fi | ||
|
||
-# prompt to backup the configuration | ||
+# prompt to backup the configuration, ignore if --force-yes is used | ||
prompt_user_yesno "Backup Server Configuration" "All configurations for server \"$SERVER_NAME\" will be backed up to:\n$BACKUP_FILE\n\nDo you want to continue?" "N" | ||
+Do you want to continue?" "N" | ||
+if [ $FORCE_YES == "yes" ] | ||
+then | ||
+ PROMPT_RET=Y | ||
+fi | ||
[ "$?" -ne 0 ] && exit 1 | ||
if [ "$PROMPT_RET" != "Y" -a "$PROMPT_RET" != "y" ] | ||
then | ||
--- /dev/null | ||
+++ securityonion-nsmnow-admin-scripts-20120724/usr/sbin/nsm_server_user-list | ||
@@ -0,0 +1,55 @@ | ||
+#!/bin/bash | ||
+# | ||
+# Copyright (C) 2008-2009 SecurixLive <dev@securixlive.com> | ||
+# Modified by Doug Burks for Security Onion | ||
+# | ||
+# This program is free software; you can redistribute it and/or modify | ||
+# it under the terms of the GNU General Public License Version 2 as | ||
+# published by the Free Software Foundation. You may not use, modify or | ||
+# distribute this program under any other version of the GNU General | ||
+# Public License. | ||
+# | ||
+# This program is distributed in the hope that it will be useful, | ||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
+# GNU General Public License for more details. | ||
+# | ||
+# You should have received a copy of the GNU General Public License | ||
+# along with this program; if not, write to the Free Software | ||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
+# | ||
+ | ||
+# | ||
+# INCLUDES | ||
+# | ||
+INC="/etc/nsm/administration.conf" | ||
+. $INC | ||
+ | ||
+. $NSM_LIB_DIR/lib-console-utils | ||
+. $NSM_LIB_DIR/lib-nsm-common-utils | ||
+. $NSM_LIB_DIR/lib-nsm-server-utils | ||
+ | ||
+# ensure we are root user before continuing any further | ||
+is_root | ||
+if [ "${?}" -ne 0 ] | ||
+then | ||
+ echo_error_msg 0 "OOPS: Must be root to run this script!" | ||
+ exit 1; | ||
+fi | ||
+ | ||
+SERVER_NAME="securityonion" | ||
+ | ||
+# check that the server DOES exist via its config | ||
+if [ ! -f "/etc/nsm/${SERVER_NAME}/server.conf" ] | ||
+then | ||
+ echo_error_msg 0 "OOPS: The server \"${SERVER_NAME}\" does not exist!" | ||
+ exit 1 | ||
+else | ||
+ # load existing variables for the server | ||
+ . /etc/nsm/${SERVER_NAME}/server.conf | ||
+fi | ||
+ | ||
+mysql --defaults-file=/etc/mysql/debian.cnf -Dsecurityonion_db -e 'select uid,username,email,last_login,tzoffset from user_info where username != "auto";' | ||
+ | ||
+exit 0 | ||
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (C) 2008-2009 SecurixLive <dev@securixlive.com> | ||
# Modified by Doug Burks for Security Onion | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License Version 2 as | ||
# published by the Free Software Foundation. You may not use, modify or | ||
# distribute this program under any other version of the GNU General | ||
# Public License. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
# | ||
|
||
# | ||
# INCLUDES | ||
# | ||
INC="/etc/nsm/administration.conf" | ||
. $INC | ||
|
||
. $NSM_LIB_DIR/lib-console-utils | ||
. $NSM_LIB_DIR/lib-nsm-common-utils | ||
. $NSM_LIB_DIR/lib-nsm-server-utils | ||
|
||
# ensure we are root user before continuing any further | ||
is_root | ||
if [ "${?}" -ne 0 ] | ||
then | ||
echo_error_msg 0 "OOPS: Must be root to run this script!" | ||
exit 1; | ||
fi | ||
|
||
SERVER_NAME="securityonion" | ||
|
||
# check that the server DOES exist via its config | ||
if [ ! -f "/etc/nsm/${SERVER_NAME}/server.conf" ] | ||
then | ||
echo_error_msg 0 "OOPS: The server \"${SERVER_NAME}\" does not exist!" | ||
exit 1 | ||
else | ||
# load existing variables for the server | ||
. /etc/nsm/${SERVER_NAME}/server.conf | ||
fi | ||
|
||
mysql --defaults-file=/etc/mysql/debian.cnf -Dsecurityonion_db -e 'select uid,username,email,last_login,tzoffset from user_info where username != "auto";' | ||
|
||
exit 0 | ||
|