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 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 +