SecPod Community Forums SanerScript

Contribute technical scripts that solve real-world cybersecurity challenges. Empowering members to streamline tasks and build innovative solutions together.
Viewing 5 topics - 1 through 5 (of 5 total)
    • Topic
    • Voices
    • Posts
    • Last Post
    • Script to Update Devices Apt Repos #!/bin/sh # Backup the original sources.list mv /etc/apt/sources.list /etc/apt/sources.list.bak # Create a new sources.list file in the sources.list.d directory touch /etc/apt/sources.list.d/sources.list # Get the OS version os_version=$(lsb_release -sr) echo "OS version is $os_version" # Populate t...#!/bin/sh # Backup the original sources.list mv /etc/apt/sources.list /etc/apt/sources.list.bak # Create a new sources.list file in the sources.list.d directory touch /etc/apt/sources.list.d/sources.list # Get the OS version os_version=$(lsb_release -sr) echo "OS version is $os_version" # Populate t...

      Started by: Community Manager

    • 1
    • 1
    • Community Manager

    • Patch repository creation for Amazon Linux #!/bin/bash # Exit script on any error set -e # Update the system and install necessary packages sudo yum update -y sudo yum install -y httpd createrepo yum-utils # Start and enable Apache web server sudo systemctl start httpd sudo systemctl enable httpd # Create directory for the repository REP...#!/bin/bash # Exit script on any error set -e # Update the system and install necessary packages sudo yum update -y sudo yum install -y httpd createrepo yum-utils # Start and enable Apache web server sudo systemctl start httpd sudo systemctl enable httpd # Create directory for the repository REP...

      Started by: Community Manager

    • 1
    • 1
    • Community Manager

    • Patch repository creation for ubuntu 18,20,22 LTS Ubuntu ClientSide #!/bin/sh log_file="/var/log/create_sources_list.log" ip_address="192.168.2.50" # Replace with your desired IP address protocol="https" # Replace with your desired protocol (http/https) # Create a backup of the existing sources.list mv /etc/apt/sources.list /etc/apt/sources.list...Ubuntu ClientSide #!/bin/sh log_file="/var/log/create_sources_list.log" ip_address="192.168.2.50" # Replace with your desired IP address protocol="https" # Replace with your desired protocol (http/https) # Create a backup of the existing sources.list mv /etc/apt/sources.list /etc/apt/sources.list...

      Started by: Community Manager

    • 1
    • 2
    • Community Manager

    • Patch repository creation for RHEL 8 and 9 RHEL 8 and 9 ClientSide #!/bin/bash # Specify the values ip_address="192.168.2.50" protocol="https" rhel_version="8" # Generate the repository configuration dynamically repo_filename="/etc/yum.repos.d/rhel${rhel_version}.repo" cat <<EOL > "$repo_filename" [RepoBaseOS] name = rhel-${rhel_...RHEL 8 and 9 ClientSide #!/bin/bash # Specify the values ip_address="192.168.2.50" protocol="https" rhel_version="8" # Generate the repository configuration dynamically repo_filename="/etc/yum.repos.d/rhel${rhel_version}.repo" cat <<EOL > "$repo_filename" [RepoBaseOS] name = rhel-${rhel_...

      Started by: Community Manager

    • 1
    • 3
    • Community Manager

    • Patch repository creation for RHEL 7 RHEL_7 ClientSide #!/bin/bash # Specify the values ip_address="192.168.2.60" protocol="https" rhel_version="7" # Generate the repository configuration dynamically repo_filename="/etc/yum.repos.d/rhel${rhel_version}_custom.repo" cat <<EOL > "$repo_filename" [RepoMainrepo] name = rhel-${rh...RHEL_7 ClientSide #!/bin/bash # Specify the values ip_address="192.168.2.60" protocol="https" rhel_version="7" # Generate the repository configuration dynamically repo_filename="/etc/yum.repos.d/rhel${rhel_version}_custom.repo" cat <<EOL > "$repo_filename" [RepoMainrepo] name = rhel-${rh...

      Started by: Community Manager

    • 1
    • 2
    • Community Manager

Viewing 5 topics - 1 through 5 (of 5 total)
  • You must be logged in to create new topics.