From 3c57944bc3bce0e103d4e1085ca7d330293b4d45 Mon Sep 17 00:00:00 2001 From: Estela Ramirez Date: Mon, 17 Jan 2022 21:06:18 -0800 Subject: [PATCH 1/2] update passwords --- blue-team/linux/update_passwords.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 blue-team/linux/update_passwords.sh diff --git a/blue-team/linux/update_passwords.sh b/blue-team/linux/update_passwords.sh new file mode 100644 index 0000000..094316f --- /dev/null +++ b/blue-team/linux/update_passwords.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# change password for users +grep "/home" /etc/passwd | awk -F: '{print $1}' > users.txt +while read user; do + echo "$user@123" | passwd --stdin "$user" +done < users.txt + From 584b15b13d6de141aced86721bc91b0f9848cdcb Mon Sep 17 00:00:00 2001 From: Estela Ramirez Date: Mon, 17 Jan 2022 21:07:03 -0800 Subject: [PATCH 2/2] backs up docker containers --- blue-team/linux/docker_backup.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 blue-team/linux/docker_backup.sh diff --git a/blue-team/linux/docker_backup.sh b/blue-team/linux/docker_backup.sh new file mode 100644 index 0000000..d42afc4 --- /dev/null +++ b/blue-team/linux/docker_backup.sh @@ -0,0 +1,13 @@ +# backup docker containers + +# write container ids to text file +echo docker ps -aq > container_ids.txt + +i = 0 +while read id; do + docker commit -p "$id" "docker-backup$i" + name = "container$i" + docker save -o ~/$name.tar "docker-backup$i" + # save tar file to termbin + ((i=i+1)) +done < container_ids.txt \ No newline at end of file