Merge branch 'develop' into dinger1986-added-passwordless-sudo-verify

This commit is contained in:
Dan
2024-05-18 22:23:59 -07:00
committed by GitHub
10 changed files with 42 additions and 31 deletions

View File

@@ -987,6 +987,8 @@ def bulk(request):
debug_info={"ip": request._client_ip}, debug_info={"ip": request._client_ip},
) )
ht = "Check the History tab on the agent to view the results."
if request.data["mode"] == "command": if request.data["mode"] == "command":
if request.data["shell"] == "custom" and request.data["custom_shell"]: if request.data["shell"] == "custom" and request.data["custom_shell"]:
shell = request.data["custom_shell"] shell = request.data["custom_shell"]
@@ -1001,7 +1003,7 @@ def bulk(request):
username=request.user.username[:50], username=request.user.username[:50],
run_as_user=request.data["run_as_user"], run_as_user=request.data["run_as_user"],
) )
return Response(f"Command will now be run on {len(agents)} agents") return Response(f"Command will now be run on {len(agents)} agents. {ht}")
elif request.data["mode"] == "script": elif request.data["mode"] == "script":
script = get_object_or_404(Script, pk=request.data["script"]) script = get_object_or_404(Script, pk=request.data["script"])
@@ -1016,7 +1018,7 @@ def bulk(request):
env_vars=request.data["env_vars"], env_vars=request.data["env_vars"],
) )
return Response(f"{script.name} will now be run on {len(agents)} agents") return Response(f"{script.name} will now be run on {len(agents)} agents. {ht}")
elif request.data["mode"] == "patch": elif request.data["mode"] == "patch":
if request.data["patchMode"] == "install": if request.data["patchMode"] == "install":

View File

@@ -1,5 +1,5 @@
black black
daphne==4.1.0 daphne
Werkzeug Werkzeug
django-extensions django-extensions
isort isort

View File

@@ -7,4 +7,4 @@ pytest-xdist
pytest-cov pytest-cov
refurb refurb
flake8 flake8
daphne==4.1.0 daphne

View File

@@ -1,46 +1,47 @@
adrf==0.1.5 adrf==0.1.6
asgiref==3.7.2 asgiref==3.8.1
celery==5.3.6 celery==5.4.0
certifi==2024.2.2 certifi==2024.2.2
cffi==1.16.0 cffi==1.16.0
channels==4.0.0 channels==4.1.0
channels_redis==4.2.0 channels_redis==4.2.0
cryptography==42.0.5 cryptography==42.0.7
Django==4.2.11 Django==4.2.13
django-cors-headers==4.3.1 django-cors-headers==4.3.1
django-filter==24.2 django-filter==24.2
django-rest-knox==4.2.0 django-rest-knox==4.2.0
djangorestframework==3.15.1 djangorestframework==3.15.1
drf-spectacular==0.27.1 drf-spectacular==0.27.2
hiredis==2.3.2 hiredis==2.3.2
kombu==5.3.7
meshctrl==0.1.15 meshctrl==0.1.15
msgpack==1.0.8 msgpack==1.0.8
nats-py==2.7.2 nats-py==2.7.2
packaging==24.0 packaging==24.0
psutil==5.9.8 psutil==5.9.8
psycopg[binary]==3.1.18 psycopg[binary]==3.1.19
pycparser==2.21 pycparser==2.21
pycryptodome==3.20.0 pycryptodome==3.20.0
pyotp==2.9.0 pyotp==2.9.0
pyparsing==3.1.2 pyparsing==3.1.2
python-ipware==2.0.2 python-ipware==2.0.2
qrcode==7.4.2 qrcode==7.4.2
redis==5.0.3 redis==5.0.4
requests==2.31.0 requests==2.31.0
six==1.16.0 six==1.16.0
sqlparse==0.4.4 sqlparse==0.5.0
twilio==8.13.0 twilio==8.13.0
urllib3==2.2.1 urllib3==2.2.1
uvicorn[standard]==0.29.0 uvicorn[standard]==0.29.0
uWSGI==2.0.24 uWSGI==2.0.25.1
validators==0.24.0 validators==0.24.0
vine==5.1.0 vine==5.1.0
websockets==12.0 websockets==12.0
zipp==3.18.1 zipp==3.18.1
pandas==2.2.1 pandas==2.2.2
kaleido==0.2.1 kaleido==0.2.1
jinja2==3.1.3 jinja2==3.1.4
markdown==3.6 markdown==3.6
plotly==5.20.0 plotly==5.22.0
weasyprint==61.2 weasyprint==62.1
ocxsect==0.1.5 ocxsect==0.1.5

View File

@@ -21,21 +21,21 @@ MAC_UNINSTALL = BASE_DIR / "core" / "mac_uninstall.sh"
AUTH_USER_MODEL = "accounts.User" AUTH_USER_MODEL = "accounts.User"
# latest release # latest release
TRMM_VERSION = "0.18.2-dev" TRMM_VERSION = "0.18.3-dev"
# https://github.com/amidaware/tacticalrmm-web # https://github.com/amidaware/tacticalrmm-web
WEB_VERSION = "0.101.43" WEB_VERSION = "0.101.44"
# bump this version everytime vue code is changed # bump this version everytime vue code is changed
# to alert user they need to manually refresh their browser # to alert user they need to manually refresh their browser
APP_VER = "0.0.191" APP_VER = "0.0.192"
# https://github.com/amidaware/rmmagent # https://github.com/amidaware/rmmagent
LATEST_AGENT_VER = "2.7.0" LATEST_AGENT_VER = "2.7.0"
MESH_VER = "1.1.21" MESH_VER = "1.1.21"
NATS_SERVER_VER = "2.10.12" NATS_SERVER_VER = "2.10.14"
# Install Nushell on the agent # Install Nushell on the agent
# https://github.com/nushell/nushell # https://github.com/nushell/nushell
@@ -43,7 +43,7 @@ INSTALL_NUSHELL = True
# GitHub version to download. The file will be downloaded from GitHub, extracted and installed. # GitHub version to download. The file will be downloaded from GitHub, extracted and installed.
# Version to download. If INSTALL_NUSHELL_URL is not provided, the file will be downloaded from GitHub, # Version to download. If INSTALL_NUSHELL_URL is not provided, the file will be downloaded from GitHub,
# extracted and installed. # extracted and installed.
INSTALL_NUSHELL_VERSION = "0.91.0" INSTALL_NUSHELL_VERSION = "0.92.1"
# URL to download directly. This is expected to be the direct URL, unauthenticated, uncompressed, ready to be installed. # URL to download directly. This is expected to be the direct URL, unauthenticated, uncompressed, ready to be installed.
# Use {OS}, {ARCH} and {VERSION} to specify the GOOS, GOARCH and INSTALL_NUSHELL_VERSION respectively. # Use {OS}, {ARCH} and {VERSION} to specify the GOOS, GOARCH and INSTALL_NUSHELL_VERSION respectively.
# Windows: The ".exe" extension will be added automatically. # Windows: The ".exe" extension will be added automatically.
@@ -64,7 +64,7 @@ NUSHELL_ENABLE_CONFIG = False
INSTALL_DENO = True INSTALL_DENO = True
# Version to download. If INSTALL_DENO_URL is not provided, the file will be downloaded from GitHub, # Version to download. If INSTALL_DENO_URL is not provided, the file will be downloaded from GitHub,
# extracted and installed. # extracted and installed.
INSTALL_DENO_VERSION = "v1.41.3" INSTALL_DENO_VERSION = "v1.42.1"
# URL to download directly. This is expected to be the direct URL, unauthenticated, uncompressed, ready to be installed. # URL to download directly. This is expected to be the direct URL, unauthenticated, uncompressed, ready to be installed.
# Use {OS}, {ARCH} and {VERSION} to specify the GOOS, GOARCH and INSTALL_DENO_VERSION respectively. # Use {OS}, {ARCH} and {VERSION} to specify the GOOS, GOARCH and INSTALL_DENO_VERSION respectively.
# Windows: The ".exe" extension will be added automatically. # Windows: The ".exe" extension will be added automatically.

View File

@@ -2,6 +2,8 @@
SCRIPT_VERSION="32" SCRIPT_VERSION="32"
export DEBIAN_FRONTEND=noninteractive
GREEN='\033[0;32m' GREEN='\033[0;32m'
YELLOW='\033[1;33m' YELLOW='\033[1;33m'
BLUE='\033[0;34m' BLUE='\033[0;34m'
@@ -78,7 +80,7 @@ mkdir ${tmp_dir}/opt
POSTGRES_USER=$(/rmm/api/env/bin/python /rmm/api/tacticalrmm/manage.py get_config dbuser) POSTGRES_USER=$(/rmm/api/env/bin/python /rmm/api/tacticalrmm/manage.py get_config dbuser)
POSTGRES_PW=$(/rmm/api/env/bin/python /rmm/api/tacticalrmm/manage.py get_config dbpw) POSTGRES_PW=$(/rmm/api/env/bin/python /rmm/api/tacticalrmm/manage.py get_config dbpw)
pg_dump --dbname=postgresql://"${POSTGRES_USER}":"${POSTGRES_PW}"@localhost:5432/tacticalrmm | gzip -9 >${tmp_dir}/postgres/db-${dt_now}.psql.gz pg_dump --no-privileges --no-owner --dbname=postgresql://"${POSTGRES_USER}":"${POSTGRES_PW}"@localhost:5432/tacticalrmm | gzip -9 >${tmp_dir}/postgres/db-${dt_now}.psql.gz
node /meshcentral/node_modules/meshcentral --dbexport # for import to postgres node /meshcentral/node_modules/meshcentral --dbexport # for import to postgres
@@ -88,7 +90,7 @@ if grep -q postgres "/meshcentral/meshcentral-data/config.json"; then
fi fi
MESH_POSTGRES_USER=$(jq '.settings.postgres.user' /meshcentral/meshcentral-data/config.json -r) MESH_POSTGRES_USER=$(jq '.settings.postgres.user' /meshcentral/meshcentral-data/config.json -r)
MESH_POSTGRES_PW=$(jq '.settings.postgres.password' /meshcentral/meshcentral-data/config.json -r) MESH_POSTGRES_PW=$(jq '.settings.postgres.password' /meshcentral/meshcentral-data/config.json -r)
pg_dump --dbname=postgresql://"${MESH_POSTGRES_USER}":"${MESH_POSTGRES_PW}"@localhost:5432/meshcentral | gzip -9 >${tmp_dir}/postgres/mesh-db-${dt_now}.psql.gz pg_dump --no-privileges --no-owner --dbname=postgresql://"${MESH_POSTGRES_USER}":"${MESH_POSTGRES_PW}"@localhost:5432/meshcentral | gzip -9 >${tmp_dir}/postgres/mesh-db-${dt_now}.psql.gz
else else
mongodump --gzip --out=${tmp_dir}/meshcentral/mongo mongodump --gzip --out=${tmp_dir}/meshcentral/mongo
fi fi

View File

@@ -1,4 +1,4 @@
FROM nats:2.10.12-alpine FROM nats:2.10.14-alpine
ENV TACTICAL_DIR /opt/tactical ENV TACTICAL_DIR /opt/tactical
ENV TACTICAL_READY_FILE ${TACTICAL_DIR}/tmp/tactical.ready ENV TACTICAL_READY_FILE ${TACTICAL_DIR}/tmp/tactical.ready

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
SCRIPT_VERSION="83" SCRIPT_VERSION="84"
SCRIPT_URL="https://raw.githubusercontent.com/amidaware/tacticalrmm/master/install.sh" SCRIPT_URL="https://raw.githubusercontent.com/amidaware/tacticalrmm/master/install.sh"
sudo apt install -y curl wget dirmngr gnupg lsb-release ca-certificates sudo apt install -y curl wget dirmngr gnupg lsb-release ca-certificates
@@ -33,6 +33,8 @@ fi
rm -f $TMP_FILE rm -f $TMP_FILE
export DEBIAN_FRONTEND=noninteractive
if [ -d /rmm/api/tacticalrmm ]; then if [ -d /rmm/api/tacticalrmm ]; then
echo -ne "${RED}ERROR: Existing trmm installation found. The install script must be run on a clean server.${NC}\n" echo -ne "${RED}ERROR: Existing trmm installation found. The install script must be run on a clean server.${NC}\n"
exit 1 exit 1

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
SCRIPT_VERSION="57" SCRIPT_VERSION="58"
SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/restore.sh' SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/restore.sh'
sudo apt update sudo apt update
@@ -29,6 +29,8 @@ fi
rm -f $TMP_FILE rm -f $TMP_FILE
export DEBIAN_FRONTEND=noninteractive
if [ -d /rmm/api/tacticalrmm ]; then if [ -d /rmm/api/tacticalrmm ]; then
echo -ne "${RED}ERROR: Existing trmm installation found. The restore script must be run on a clean server, please re-read the docs.${NC}\n" echo -ne "${RED}ERROR: Existing trmm installation found. The restore script must be run on a clean server, please re-read the docs.${NC}\n"
exit 1 exit 1

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
SCRIPT_VERSION="152" SCRIPT_VERSION="153"
SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/update.sh' SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/update.sh'
LATEST_SETTINGS_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/api/tacticalrmm/tacticalrmm/settings.py' LATEST_SETTINGS_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/api/tacticalrmm/tacticalrmm/settings.py'
YELLOW='\033[1;33m' YELLOW='\033[1;33m'
@@ -26,6 +26,8 @@ fi
rm -f $TMP_FILE rm -f $TMP_FILE
export DEBIAN_FRONTEND=noninteractive
force=false force=false
if [[ $* == *--force* ]]; then if [[ $* == *--force* ]]; then
force=true force=true