Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

MICRO PROJECT REPORT

ON

In Partial fulfilment of Diplomain IT Engineering( Sixth Semester )


In the subject of
Linux Administration
By
Ms.Pranjalborkar
Ms.kshitijadwande
Ms.PriyankaGawai
Ms. RutujaGawai
Mr. Prajwal kale
Submitted To
Government Polytechnic, Amravati
(An AutonomousInstitute of Govt. of Maharashtra)

Under the guidance of


Dr.P.P.Karde
Lecturer in IT
Linux Administration
Department of Information Technology
Government Polytechnic Amravati,(2021- 2022)
Certificate

This is to certify that Mr./Ms.Pranjal Borkar(19IF007), kshitija dwande(19IF010) ,Priyanka Gawai(19IF021), Rutuja
Gawai(19IF022), Prajwal kale (20IF204) of sixth Semester Diploma in IT Engineering has satisfactorily completed the
micro project entitled “ A. Write a script to create a file named, ‘function_return.sh’. The function, gpa() return a string
value into the variable, Val which prints later by combining with other string. Bash function can pass both numeric and
string values B. Write and Understand 10 network services” Linux Administration (IF5469) for the academic year 2021-
2022 as prescribed in curriculum.

Place:Amravati Lecturer in

Date: / /2020 Linux Administration


Annexure-I

PART A- Plan (About 1-2 pages)

Format for Micro-Project Proposal

Title of Micro Project:

A. Write a script to create a file named, ‘function_return.sh’. The function, gpa() return a string value into
the variable, Val which prints later by combining with other string. Bash function can pass both numeric
and string values

B. Write and Understand 10 network services

1.0 Brief Introduction


(Importance of the project, in about 4 to 5 sentences)

A. Bash is a Unix command line interface for interacting with the operating system,
available for Linux and macOS. Bash scripts help group commands to create a program.
All instructions that run from the terminal work in Bash scripts as well. Bash scripting
is a crucial tool for system administrators and developers Bash scripts can be used for
various purposes, such as executing a shell command, running multiple commands
together, customizing administrative tasks, performing task automation etc. So
knowledge of bash programming basics is important for every Linux user.

B. A network service is an application running at the network application layer and


above, that provides data storage, manipulation, presentation, communication or other
capability which is often implemented using a client–server or peer-to-peer
architecture based on application layer network . Services in Linux and other
operating systems are applications or a set of applications that run in the background,
enabling certain capabilities as and when they become necessary. This lesson takes a
look at Linux services that deal with network capabilities like connecting to a network
and file sharing.

2.0 Aim of the Micro-Project


This Micro-Project aims at:
 To create a bash function which can pass both numeric and string values
 To write and understand 10 network services in the Linux

3.0 Action Plan (Sequence and time required for major activities for 8 weeks)
S.N. Details of activity Planned start Planned I. Code &Name of Team
date Finish date Members
1 Planning 20/05/2022 20/05/2022 All team member
2 Collecting information 21/05/2022 24/05/2022 Prajwal Kale(20IF204)
Priyanka Gawai
(19IF021)
3 Collecting pictures 22/05/2022 24/05/2022 Kshitija Dwande
(19IF010)
4 Preparing Report File 25/05/2022 26/05/2022 Rutuja Gawai
(19IF022)
5 Program 23/05/2022 25/05/2022 Pranjal Borkar
(19IF007)

4.0 Resources Required (major resources such as raw material, some machining facility,
software etc)
S.N. Name of Resource/material Specifications Qty Remarks
1 Android 1
2 Laptop Lenovo 1
3 Software - word application

Guideline for Assessment of Micro-Project

Evaluation as per suggested Rubric for Assessment of Micro-Project

Assessment Characteristic to be assessed Average Good Excellent


Parameter (1 mark) (1.5 (2 mark)
mark)
Process Relevance of the courses &
Assessment proposals
(06) Literature survey/market
survey/information collection
Analysis of data & completion of
the target as per proposal/
Product Report Preparation/Quality of
Assessment Prototype/model
(04) Presentation / Viva
Annexure-I

PART B- (Outcomes after Execution)


Format for Micro-Project Report

Title of Micro Project

A. Write a script to create a file named, ‘function_return.sh’. The function, gpa() return a string
value into the variable, Val which prints later by combining with other string. Bash function can
pass both numeric and string values

B. Write and Understand 10 network services

1.0 Brief Introduction (Importance of the project.)

A. Bash is a Unix command line interface for interacting with the operating system,
available for Linux and macOS. Bash scripts help group commands to create a program.
All instructions that run from the terminal work in Bash scripts as well. Bash scripting
is a crucial tool for system administrators and developers Bash scripts can be used for
various purposes, such as executing a shell command, running multiple commands
together, customizing administrative tasks, performing task automation etc. So
knowledge of bash programming basics is important for every Linux user.

B. A network service is an application running at the network application layer and


above, that provides data storage, manipulation, presentation, communication or other
capability which is often implemented using a client–server or peer-to-peer
architecture based on application layer network . Services in Linux and other
operating systems are applications or a set of applications that run in the background,
enabling certain capabilities as and when they become necessary. This lesson takes a
look at Linux services that deal with network capabilities like connecting to a network
and file sharing.

2.0 Aim of the Micro-Project

 To create a bash function which can pass both numeric and string values
 To write and understand 10 network services in the Linux.

3.0 Course Outcomes Integrated (Add to the earlier list if more Cos are addressed)

 Discuss shell programming in Linux operating system


 Demonstrate the role and responsibilities of a Linux system administrator.

4.0 Actual Procedure Followed


Write step wise the work was done, including which team member did what work and how the
data was analyzed (if any)

S.N. Details of activity Planned start Planned I. Code &Name of Team


date Finish date Members
1 Planning 1/12/2021 5/12/ 2020 All team member
2 Collecting information 6/12/2021 8/12/2021 Prajwal kale 20IF204
PriynkaGawai 19IF021
3 Collecting picture 9/12/2021 10/12/2021 KshitijaDawande 19IF010
VaibhavDongre 20IF201
4 Preparing Report File 11/12/2021 12/12/2021 RutujaGawai 19IF022
5 Defect report 11/12/2021 12/12/2021 PranjalBorkar 19IF007

5.0 Actual Resources used (Mention the actual resources used)

S.N. Name of Resource/material Specifications Qty Remarks


1 Android 1
2 Laptop Lenovo 1
3 Software - word application

6.0 Information

Bash Scripting
Bash scripting allows a user to elegantly sequence commands together, as well as review commands to
avoid potential havoc on data, files, and file structures. Style conventions in your scripts help the
debugging process and enable fellow programmers to more easily read the code.

Pass Return Value from Function:


Bash function can pass both numeric and string values. How you can pass a string value from the
function is shown in the following example. Create a file named, ‘function_return.sh’ and add the
following code. The function, greeting() returns a string value into the variable, val which prints later by
combining with other string.

Program
#!/bin/bash

function greeting() {

str="Hello, $name"

echo $str

echo "Enter your name"

read name

val=$(greeting)

echo "Return value of the function is $val"

Run the file with bash command.

$ bash function_return.sh

Output

Network Services in Linux

What is network services?

Services in Linux and other operating systems are applications or a set of applications that run in the
background, enabling certain capabilities as and when they become necessary.
It is a capability that facilitates a network operation. It typically is provided by a server (which can be
running one or more services), based on network protocols running at the application layer in the Open
Systems Interconnection (OSI) model of the network.
1) Ntpd

This service executes the Network Time Protocol (NTP) daemon ntpd. The purpose is to synchronize the
time of the local computer to a NTP server or other reference time source such as a radio or satellite
receiver or modem. The NTP system uses two main roles for participating computers: server or client.
Time servers supply time to one or more NTP clients. NTP clients use the reference time from one or
more NTP servers to determine the local time.

Service management:

# /sbin/service ntpd
usage: /etc/init.d/ntpd {start|stop|restart|condrestart|status}
Configuration File:
/etc/ntp.conf

2) Httpd

httpd is the Apache Hyper Text Transfer Protocol (HTTP) server program. It is designed to be run as a
standalone daemon process. When used like this it will create a pool of child processes or threads to
handle requests.
In general, httpd should not be invoked directly, but rather should be invoked via apachectl on Unix-
based systems.
The httpd RPM package provides the /usr/sbin/httpd daemon and its configuration files.
Service Management:
/sbin/service httpd show
Usage: httpd {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}
Configuration file:
/etc/httpd/conf/httpd.conf

3) Sshd

The sshd (Secure Shell Daemon) service is part of the OpenSSH implementation for Linux that provides
authenticated, end-to-end encrypted networked communication. For example, a user on one host can log
in to another system without using a password because the sshd service can be configured to use
alternate authentication techniques such as exchanging shared-key information.
The openssh-server RPM package provides the /usr/sbin/sshd daemon and its configuration files
Two versions of the SSH communication protocol exist, version 1 and version 2. Connections between
the client and the sshd daemon are made on TCP/IP port 22 by default, using either UDP or TCP
protocols.

Service Management:
To manage the sshd service on demand, use the service tool or run the /etc/init.d/sshd script directly:
# /sbin/service sshd help
Usage: /etc/init.d/sshd {start|stop|restart|reload|condrestart|status}
# /etc/init.d/sshd help
Usage: /etc/init.d/sshd {start|stop|restart|reload|condrestart|status}
Configuration File for SSHD:
/etc/ssh/sshd_config

4) Sendmail

This executes Mail Server Daemon which runs as a daemon in the background, listening for incoming
mail from other machines.
Sendmail can handle both incoming and outgoing mail. Sendmail routes mail for the user to the proper
delivery program based on the email address. It accepts mail from a user’s mail program, interprets the
mail address, rewrites the address into the proper form for the delivery program, and routes the mail to
the correct delivery program. Sendmail insulates the end user from these details. If the mail is properly
addressed, sendmail will see that it is properly passed on for delivery. Likewise, for incoming mail, send
mail interprets the address and either delivers the mail to a user’s mail program or forwards it to another
system.

Service Management:
Usage:
/etc/init.d/sendmail {start|stop|restart|condrestart|status}
Configuration File:
/etc/mail/sendmail.cf

5) Snmpd
The snmpd service is an SNMP(Simple Network Management Protocol) agent which binds to a port and
awaits requests from SNMP management software. By using snmp, you can obtain the statistics of the
server, which is described by MIB file from remote host.
By default, snmpd listens for incoming SNMP requests on UDP port 161 on all IPv4 interfaces.
The snmpd service is provided by the net-snmp RPM package.

Service Management:
To manage the service on demand, use the service(8) tool or run the /etc/init.d/snmpd script directly:
# /sbin/service snmpd help
Usage: /etc/init.d/snmpd {start|stop|status|restart|condrestart|reload}
# /etc/init.d/snmpd help
Usage: /etc/init.d/snmpd {start|stop|status|restart|condrestart|reload}
Configuration File:
/etc/snmp/snmpd.conf

6) iptables

The iptables utility controls the network packet filtering code in the Linux kernel. If you need to set up
firewalls and/or IP masquerading, you should install this tool.
The iptables feature is used to set up, maintain, and inspect the tables of IP packet filter rules in the
Linux kernel. Several different tables may be defined. Each table contains a number of built-in chains and
may also contain user-defined chains.
Each chain is a list of rules which can match a set of packets. Each rule specifies what to do with a packet
that matches. This is called a ‘target’, which may be a jump to a user-defined chain in the same table.
RPM package name: iptables

Service Management
# service iptables
Usage: /etc/init.d/iptables {start|stop|restart|condrestart|status|panic|save}
Configuration File
/etc/sysconfig/iptables – iptables rules
/etc/sysconfig/iptables-config – iptables configuration

7) Nfsd

The Network File System (NFS) is a server/client based networking protocol. NFS daemons are
composed by nfsd, rpc.mountd, rpc.rquotad, rpc.lockd
– Daemon nfsd: nfsd handles client requests from remote systems. Multiple copies of this daemon are
usually run so that several requests can be handled simultaneously. However, too many copies of nfsd
can increase the demand for CPU time to the point where a drop in performance results. For the best
performance the number of copies of nfsd should be set to four.
– Daemon rpc.mountd: rpc.mountd handles mount requests from remote systems.
– Daemon rpc.rquotad: It is a rpc server which returns quotas for a user of a local file system which is
NFS-mounted onto a remote machine.
– Daemon rpc.lockd: rpc.lockd manages file locking on NFS client and server machines.
In order to run NFS service, the portmap daemon must run.

Service Management:
Usage: nfs {start|stop|status|restart|reload|condrestart}
Configuration File:
/etc/exports

8) Nscd

This is the Name Service Cache Daemon. It takes care of group and password lookups for running
programs and then caches the lookup results for the next query for services that can experience slowness
in picking up changes such as NIS or LDAP. If you’re running these services, you may want to run nscd.
This daemon can cache the data for name services, /etc/hosts, DNS, NIS, NIS+ or so. This is only for local
users on the machine, because the cache is realized by wrapping the functions in glibc, remote user can
never use this cache. It takes a time to change the cache even when the original DNS data is changed,
therefore be careful to use this daemon.

Service Management:
Usage: /etc/init.d/nscd {start|stop|status|restart|reload|condrestart}
Configuration File:
/etc/nscd.conf

9) Named

named actually executed DNS ( Dynamic naming Service) server daemon. It converts host names to IP
addresses and vice versa. There are several different kinds of DNS servers, such as primary server, slave
server and cached server etc. Its data is stored in the directory /var/named.The data stored in the DNS is
identified by domain names that are organized as a tree according to organizational or administrative
boundaries

Service Management

# /sbin/service

Named Usage: /etc/init.d/named {start|stop|status|restart|condrestart|reload|probe}

Configuration File

/etc/named.conf

10) Smbd

The Samba software suite is a collection of programs that implements the SMB protocol for UNIX
systems. This protocol is also known as the Common Internet File System (CIFS). The NetBIOS protocol is
implemented by the nmbd daemon.
The SMB server daemon smbd provides file sharing and printing services to Windows clients. The server
provides file space and printer services to clients via the SMB/CIFS protocol. The nmbd daemon is a
NetBIOS name server that provides NetBIOS naming services to clients . It understands and can reply to
NetBIOS over IP name service requests, like those produced by SMB/CIFS clients (windows).
Service Control
# /sbin/service smb
Usage: /etc/init.d/smb {start|stop|restart|reload|status|condrestart}
Configuration File
/etc/samba/smb.conf

7.0 Skills Developed/learning out of this Micro-Project


A script, with proper set permissions and syntax, can execute commands in a fraction of the time a user
would take. Bash scripting allows a user to elegantly sequence commands together, as well as review
commands to avoid potential havoc on data, files, and file structures.

Signature of Student
8.0 Assessment by Faculty as per Rubrics

Process Product Total Marks Signature of Faculty


Assessment Assessment (10)
(06) (04)

*********

You might also like