0% found this document useful (0 votes)
12 views1 page

Boot Script for Web Server Setup

This script installs and configures an Apache web server on a Linux system. It updates all packages, installs httpd, creates a basic HTML file, enables and starts the httpd service. It also creates a new system user called "student", sets their password to "cisco", adds them to the adm and wheel groups, enables password authentication for SSH, and restarts the SSH service.

Uploaded by

dheeraj
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views1 page

Boot Script for Web Server Setup

This script installs and configures an Apache web server on a Linux system. It updates all packages, installs httpd, creates a basic HTML file, enables and starts the httpd service. It also creates a new system user called "student", sets their password to "cisco", adds them to the adm and wheel groups, enables password authentication for SSH, and restarts the SSH service.

Uploaded by

dheeraj
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

#!

/bin/bash
yum update -y
yum install httpd -y
echo "<html><h1>This is WEB SERVER1</h1></html>"
>>/var/www/html/[Link]
systemctl enable [Link]
systemctl start [Link]

>>Create a user using boot Script<<


#!/bin/bash
yum update -y
useradd student
VAR="cisco"
printf "$VAR\n$VAR\n" | passwd student
touch /home/student/test
usermod -aG adm,wheel student
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g'
/etc/ssh/sshd_config
service sshd restart

You might also like