Linux Soln

You might also like

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

T.Y. B.Sc. (IT) : Sem.

Linux Administration
Time : 2 Hrs.]

Prelim Question Paper

[Marks : 75

Vi
dy
al
an
ka
r

[10]
10]
Q.1 Attempt any TWO:
Q.1 (a) Explain Linux distributions.
[5]
[5
(A) Linux Distributions
Although there is only one standard version of Linux, there are actually
several different distributions. Different companies and groups have packaged
packag
Linux and Linux software in slightly different ways.

Red Hat Linux


[Any
marks]
Any five
ve distribution
distributio  5 ma
Red Hat Linux is currently the most popular Linux
Red
nux distribution.
ution. As a company,
compa
Hat provides software and services to implement
and
plementt and support professional
pr
commercial Linux systems. Red Hat freely
ely distributes
tributes its version of
o Linux under
the GNU Public License. Red Hat generates
professional level
erates income
ome by providing profess
support, consulting, and training services.
the RPM
package
es. Red Hat originated
orig
R
system used on several distributions,
butions, which automatically
automatical installs
insta and removes
software packages.

Red Hat maintains an


documentation that is freely
n extensive
nsive library of
f Linux docum
accessible online. On its Web site, you ca
can
its support page, which lists
n link to it
the complete set
et of Red Hat manuals, all
a in Web page format for easy viewing
with any Web
b browser.
er.
Red Hat offers several commercial
commercial
c
mercial products
produc and services for business and ecommerce
rce
ce solutions.

Mandrake
ke
popular Linux distribution with many of the same
Mandrake Linux is another p
pop
focuses on providing up-to-date enhancements and an
features
atures as Red Hat. It foc
and
easy-to-use installation
install
a GUI configuration.
SuSE
SuS
language-based distribution, SuSE has become very
Originally a German
Orig
Ge
throughout Europe and is currently one of the fastest growing
popular thro
popula
distributions worldwide.
distributio
Debian
Deb
Debian Linux is an entirely noncommercial project, maintained by hundreds of
volunteer programmers.
1

Vidyalankar : T.Y. B.Sc. (IT)  Linux

Its aim is to enhance Linux with new and improved applications and
implementations.

Vi
dy
al
an
ka
r

Caldera
Caldera OpenLinux is designed for corporate commercial use.
ges
Caldera has organized its OpenLinux distribution into several differentt packages,
ckage, which
hich is
each geared to different markets. These include the eDesktop package,
designed for basic workstation operations, and the eServer package,
e, which is
designed for Linux servers.
ary Linux
ux packages
packages.
Caldera also offers a line of commercial and proprietary

Slackware
net sites,
es, and yo
you
u can order the C
Slackware is available from numerous Internet
CD
ware distribution
stribution takes sspecial car
from Walnut Creek Software. The Slackware
care to
remain as closely Unix compliant as possible.
ssible.
TurboLinux
TurboLinux provides English,, Chinese, and
of Linux. It
nd Japanese versions
versio
includes several of its own
for automatically
wn packages, such as TurboPkg,
Tur
updating applications.

Q.1 (b) How loader works?


grub and lilo.
[5]
rks? State
tate the difference
differenc between
betw
(A)
Grub : Grub stands for Grand Unified Bootloader.
Bootloa
The bootlader
ader is the
he software prog
program.
If you have multiple kernel images
installed on your system, you can choose
image insta
which
ch one to be executed.
executed
waits for few seconds, if you dont enter
GRUB displays a splash screen,
sc
w
anything,
default kernel image as specified in the grub
ing, it loads the de
defau
configuration file. (grub.conf
(g
.con in /boot)
knowledge
of the filesystem (the older Linux loader LILO
GRUB has the knowledg
kn
didnt
filesystem).
nt understand
understa files
Grub configuration
file is/boot/grub/grub.conf (/etc/grub.conf is a link to
confi
this).
[Working
of loader 3 marks and difference 2 marks (4 points)]
th
[W
GRUB
GRUB
G
RUB stands for GR and Unified
Bootloader.
Boo
GRUB supports an unlimited number
of boot entries.
GRUB can boot from network.

LILO
Stands for Linux Loader

LILO supports only up to 16


different boot selections;
LILO cannot boot from network.

Prelim Paper Solution

LILO must be written again every


time you change the configuration
file.
eract
LILO does not have an interactive
command interface.
LILO doesnt have the
e know ledge
ledged
file system.

ar

There is no need to change GRUB


when the configuration file is
changed as GRUB is dynamically
configurable.
GRUB has an interactive command
interface.
GRUB has the knowledge of the file
system.

Q.1 (c) State any 5 linux supported file systems and explain ext3 and
d ext 2.
[5]
(A)
5 Linux Supported File System
[1 mark]
1. ext3
2. ext2
3. Reiser
4. FAT
5. NTFS

Vi
dy
al
a

ext2(non-journaling file system)


[2 marks]
em)
x xt2 stands for second extended file system.
x ext2 does not have journaling
aling feature.
x On flash drives, usb drives, ext2 is recommended,
recomm
as it doesnt need to
do the over head of journalin
journaling.
x Can handle file systems
tems up to 4 TB
x It supports long
g file names up to 11012 characters.
x In case user processes fill up
u a file system, ext2 normally reserves
about
out 5% of disk blocks for exclusive
e
use by root so that root can easily
recover
over from that situation.
sit
Ext3
[2 marks]
x Ext3 stands for third extended
e
file system.
x Starting from Linux Kernel 2.4.15 ext3 was available.
x The main benefit
b
of ext3 is that it allows journaling.
x Journaling
urna
has a dedicated area in the file system, where all the changes
are tracked. When the system crashes, the possibility of file system
corruption is less because of journaling. (If no journaling, then fsck
commend(file system consistency check) is used to check for the corrupted
file and to repair that file).
x Under ext2, when a file system is uncleanly mounted, the whole file
system must be checked. This takes a long time on large file systems.
ext3 keeps a record of uncommitted file transactions and applies only
those transactions when the system is brought back up.
3

Vidyalankar : T.Y. B.Sc. (IT)  Linux

x
x
x

Maximum individual file size can be from 16 GB to 2 TB


Overall ext3 file system size can be from 2 TB to 32 TB
You can convert a ext2 file system to ext3 file system directly (without
backup/restore).
[5]

Vi
dy
al
an
ka
r

Q.1 (d) Explain RAID levels with diagram.


(A)
RAID :
x Is an acronym for Redundant Array of Independent Disks.
ks.
x Used for maintaining copy of the data.

There are two types of RAID hardware RAID and


d Software
are RAID.
Hardware RAID in H. RAID, the disks have their
eirr own RAID controller with
w
built in software that handles RAID disk setup.
p. The controller is a card iin one
of the systems expansion slots. Ot it may be builtt onto the system bo
board. The
Th
O/S does not control the RAID level used,
sed, it is controlled by the hardware
hardw
RAID controller.
Software RAID there is no RAID controller
controller card. The O/S is used to set
up a logical array and the O/S
by the system.
/S controls the
he RAID leve
level used b

Six RAID levels are commonly used.


used
The three most commonly
mmonly
y used RAID levels a
are
x RAID level 0 stripping
[ mark]
ripping
This level
and uses a method called striping
el requires
ires at least two disks
d
that writes data
There
is no redundancy provided by
ta across both drives.
d
Th
thiss level of RAID, since the loss of either drive makes it impossible to
recover
levell does give a speed increase in writing to the
over the data. This
Th leve
disks.
ks.

Prelim Paper Solution

RAID level 1 Mirroring


[ mark]
This level requires at least two disks and uses a method called mirroring.
With mirroring, the data is written to both of the drives. So, each drive is
an exact mirror of the other one and if one fails the other still holds all
the data. There are two variants to level 1 with one variant using a sing
single
es two disk
disk controller that writes to both disks. The other variant uses
own as
a
controllers, one for each disk. This variant of RAID level 1 is known
duplexing.

Vi
dy
al
an
ka
r

RAID level 2 Error Checking and Correction


[1 mark]
Requires minimum 3 disks.
and correcting
ks. RAID 2 adds
adds error checking
check
checksums to RAID-1.
code in which each data
ID-1. ECC is Error correcting
correc
cod
signal confirmss to specific
so that departures from
ecific rules of construction
constr
this construction
uction in
n the received signal
sig
can generally be automatically
detected and corrected.
orrected.
RAID 2

A1
B1
C1
D1

Disk 0

A2
2
B2
C2
D2

Disk 1

A3
B3
C3
D3

Disk 2

A4
B4
C4
D4

Disk 3

Ap1
Bp1
Cp1
Dp1

Disk 4

Ap2
Bp2
Cp2
Dp2

Disk 5

Ap3
Bp3
Cp3
Dp3

Disk 6

[1 mark]
RAID level 3 Byte-Level Striping with Parity Disk
Requires minimum 3 disks. It does striping, like RAID-0, but at a very
Req
small granularity. It also adds parity disks which helps in error detection
and recovery.

Vidyalankar : T.Y. B.Sc. (IT)  Linux

RAID 3

A3
A6
B3
B6

A2
A5
B2
B5

Ap(13)
Ap(46)
Bp(13)
Bp(46)

Vi
dy
al
an
ka
r

A1
A4
B1
B4

Disk 0

Disk 1

Disk 2

Disk 3

RAID level 4 Block-Level Striping with Parity


[1 mark]
arity
rity disk
mar
requires minimum 3 disks. It attemptss to add error checking and
recovery to RAID-3 by doing block level
of a
vel striping
riping with the addition
addit
single parity disk.
RAID
D4
A1
B1
C1
D1

A2
B2
C2
D2
D

A3
B3
C3
D3
D

Ap

Disk 0

Disk 1

Disk 2

Disk 3

Bp
Cp
Dp

RAID
ID level 5 Block-Level Striping
Striping with Distributed Parity [1 mark]
S
It requires at least three disks and uses striping to write the data
across
to
ss the two disks similarly
s
t RAID 1. But unlike 1, this level uses the
hird disk to hold parity info
third
information that can be used to reconstruct the
ata from either, but n
data
not both, of the two disks after a single disk
failure.
ilure
RAID 5

A1
B1
C1
Dp

A2
B2
Cp
D1

A3
Bp
C2
D2

Ap
B3
C3
D3

Disk 0

Disk 1

Disk 2

Disk 3

The information of systems RAID configuration is stored in /etc/traidtab .


6

Prelim Paper Solution

Vi
dy
al
an
ka
r

Q.2 Attempt any TWO:


[10]
Q.2 (a) How to manage rc scripts using chkconfig?
[5]
(A)
To configure any software package to work at boot time use this command
with following options:
[Each point 1 mark]
1. To check all packages working at which run levels
#chkconfig list
2. To check whether package is working at boot time
#chkconfig list packagename
3. To reset run levels for any package
#chkconfig levels 0123456 packagename OFF
4. To set run levels for any package
#chkconfig levels 23456 packagename ON
Q.2 (b) Configure a network for class c and
d also set ip for default
defau
[5
[5]
gateway and DNS.
(A)
Setting IP for the machine:
[3 Mark]
#ifconfig etho 192.168.2.1 netmask
sk 255.255.255.0
255.0 broadcast
broadcas 192.168.2.255
192.1
Setting IP for the Default Gateway:
[1 Mark]
teway:
#route add default gw 192.168.2.3
168
168.2.3
Setting IP for the DNS:
[1 Mark]
#vi /etc/resolv.conf
Set two IP and save
e the file

Q.2 (c) What is the


floppy?
e process
ess to create grub boot fl
[5]
(A)
(a) Boot a Linux with
ith Grub support
suppor and log
lo in as root or in superuser mode
(su
[1 mark]
u followed by the password)
(b) Format
rmat the floppy in
i MsDOS (or Ext2) by typing "mkmsdosfs -F32
/dev/fd0"
inserting a floppy
into the drive.
[1 mark]
ev/fd0" after insert
flo
(c) Create
mount the floppy and make the necessary
reate a mounting point,
poi
directories
irectories to store the
th files at a designated location where Grub will
search for the
them
/dev/fd0 /mnt/fd0
#mkdir /mnt/fd0mount
/mn
/mnt/fd0m
#mkdir /mnt/fd0/boot
/mnt/f
/mnt/fd0/boot/grub
#mkdir /mnt
(d) Copy all tthe necessary files in /boot/grub directory of the booted Linux
to the mounted fd0
cd /boot/grubtar
[2 mark]
#c
To remove or erase the content of /mnt/fd0/boot/grub/menu.lst. Grub
(e) T
will boot to Grub prompt if there is no instruction in the menu.lst or the
menu.lst is empty or unavailable. If the System Rescuse CD is used its
menu.lst has already been emptied.
7

Vidyalankar : T.Y. B.Sc. (IT)  Linux

(g) Reboot the Linux, again log in as root or in superuser mode, drop into
command prompt and activate Grub by just type grubroot (fd0)setup
(fd0) Grub will search the stage1 and stage2 files in the floppy. If they
exist Grub will install them in the boot sector.
[1 mark]

Vi
dy
al
an
ka
r

Q.2 (d) What are the security considerations for NFS?


[5]
(A)
Authentication: Client should prove that it is a valid user through
hroug
authentication.
[Every
ery point
nt 1 mark]
Encryption and decryption: Since files are traversing in a network,
work, there is
possibility of an attack, so convert the file in cipher text using
ing encryption
and decryption technique.
Hard Mooting and soft mounting: The process
ess
ss of requesting a serv
server
continuously till client gets the file is called ass hard mounting.
The process of requesting a server periodically
called
dically for some attempts is calle
as soft mounting.
Cross Domain Mounting: Two machines
is
ines mounting
untin the
the files of each other
o
known as Cross Domain Mounting
Root Squash: Squashing the rights
ights of root
root user of client
c
for tthe exported
file is called as Root Squash.
h.
Per User and Per Host: It is possible to provide security
securi w.r.t machine or
user.

Q.3 Attempt any TWO:


Q.3 (a) Explain the NTP utility programs.
(A)
PROGRAM
OGRAM
ntpdate
date
ntpdc
pdc
ntp-keygen
p-keygen
ntpq
ntpsim
ntptime
time
ntptrace
tickadj

[10]
[5]
[Any 5 program 5 marks]

DESCRIPTION
DESCR
Sets the system date and time via NTP
Controls the NTP daemon, ntpd
Generates
Generate public and private keys for use with NTP
Querie
Queries the NTP daemon
Provides
Pro
NTP simulation for development and testing
Displays the time variables maintained by the Linux kernel
Traces a chain of NTP servers back to the primary source
Sets certain time variables maintained by the Linux kernel

Prelim Paper Solution

Q.3 (b) Write the configuration for accessing /data from linux machine.
[5]
(A)
On Linux Machine:
[4 marks]
#mkdir /data
#chmod 777 /data
Edit samba configuration file and set WORKGROUP= samba, also make
/data
ke /da
sharable with some users for e.g. abc.
[1 mark]
ark]

Vi
dy
al
an
ka
r

On windows machine:
Open My Network Places -> samba-> login as abc
This makes /data sharable with windows.

Q.3 (c) State and explain any 5 parameters of squid.conf


conf
onf
[5]
(A)
Squid.conf
[Any
Any 5 lines
nes explanation 5 marks]
ma
1. Chache  effective user  user : squid.conf
conf
2. chache  effective user  group : squid
quid
3. httpd_accer_with_proxy yes/No
o
4. httpd_accer_IP
5. httpd_accer_porl  50
6. httpd_accer_uses_host_hiodes
 yes/No
t_hi
t_hiodes
7. httpd_access : allow all/cliny
cliny a
all
x
x
x
x
x
x

line 1 & 2 Specifies


ifies name of squid.
Line 3 if yes.
caching.chi.squid only proposy
s. Squid is proxy wi
with
th cach
caching.chi.s
Line 4 spceifies
pceifiess IP of caching
Line 5 specifiess part of caching
Line
automatically, else manually.
ne 6 if yes. Clinet will be configure
co
access squid.
Line
e 7 Specifies who is going to a

Q.3 (d)
d) Write a short note on squid.
squ
[5]
(A))
Providing Process Caching S
Server:
[Diagram 2 marks and explanation 3 marks]
(SQUID)
SQUID
a process server but can also be used as a caching
QUID is by default
d
souses. For eg.

C1

C2
C3

S
Q
U
I
D

C4
C5
C6

Vidyalankar : T.Y. B.Sc. (IT)  Linux

SQUID which maintains the caching recourses is responsible to cahce


frequency vistted websites web pages to that the time is should from
accessing the webpage.
The caching resource is also because accelerates recourse (accel).

Vi
dy
al
an
ka
r

Q.4 Attempt any TWO:


[10]
Q.4 (a) Define zone and create a zone file for www.abc.com having
aving Ip
p [5]
[5
233.41.22.4
(A)
Zone Definition:
[2 marks]
Zone www.abc.com IN
{
Type Master;
File abc.zone;
}
Zone File
@ IN SOA www.abc.com
(
42; Serial
3H; Refresh
15M; Retry
2D; Expiry
3D); Minimum TTL
IN A 233.41.2.4
2.4

[3 marks]

Q.4 (b) Write Configuration steps of ca


caching dns server
[5]
(A)
1. Install
tall DNS package.
# rpm  I bind
b

installed.
Output : bind verno inst
installe
2. Once DNS is installed,
installed DNS configuration file named.conf will be
having following definition.
created, which
whic SHOULD
SHOU
Zone . I
IN
{
Type Hint;
Hint
named.ca ;
File na
}
[1 mark]
Make sure that, DNS cache has an entry to map local host to loopback.
3. Ma
Make sure that /etc/nsswith.conf contain the following line to redirect
4. M
the client.
hosts: file dns
5. Make sure that / etc/hosts has the word bind
10

Prelim Paper Solution

6. Make sure that/etc/resolv.conf has IP of DNS.


7. Start the revises of DNS
#revises bind starts

[4 marks]

Vi
dy
al
an
ka
r

Q.4 (c) Give syntax and example of scp and sftp.


[[5]
(A)
Answer not given
1. ssh (Secure Shell): It is a replacement of telnet which connect
ect a local
cal m/
m/s
to a remote m/c through command terminal. The traffic between
n 2 m/c is
incrupted and a virtual tunnel is created.
[1 marks]
2. scp (Securce Copy) : It is a replacement of scp to copy a file
le from a local
m/c to a remote m/c and vice versa.
Syntart : # scp src dutn
e.g. 1 : Copy file it from a local m/c a remote
te m/c B/abc directory
# scp fl.fxt B:/abc
e.g. 2: Copy a file f2 from remote m/c B/abc
bc directory into local m/c /pq
r directory.
# scp B/abc/f2.txt/pqr
[2 marks]
3. sttp (secures file transfer protocol)
file t transfer
ol) : It is a replac
replacement of f
a file between client and a serves.
Syntax : sttp src destn
stn
Eg.1 : copy contentt of file it from local m/c remote
m/c B/abc directory.
re
m
Eg. 2: Copy contents
directory into local
ntents of file from remote m/c B/abc
B
m/c/pq directory.
ctory.
# step B/abc?f2.txt/[pqr/f2.txt
[2 marks]
/abc?f2.txt/[pqr/f2.txt
2.txt/[pqr/f2.txt

Q.4 (d) Explain


server.
n the important files used by DNS
D
[5]
(A)
/etc/nsswitch.conf
c/nsswitch.conf
sswitch.conf
[Any 5 for 5 marks]
It tellss the browser not to contact
the DNS server directly, first check
cont
whether
present in DNS cache
her required entry is p
pres
/etc/hosts
It iss DNS Cache
Cach

/etc/resolv.conf
/e
It contains
IP
c
I of DNS servers

/etc/named.conf
/etc/na
It is general DNS Server Configuration File

/var/named/named.local
It is used for mapping Loopback IP to Local Host
11

Vidyalankar : T.Y. B.Sc. (IT)  Linux

/var/named/named.ca
It is DNS cache server configuration File
/etc/named.conf/zone
It is used for forward mapping.

Vi
dy
al
an
ka
r

/etc/named.conf/reverse zone
It is used for reverse mapping.
Q.5 Attempt any TWO:
[10]
Q.5 (a) How to configure user level ftp access?
[5]
(A)
Answer not given
[3 marks]
The /etc/vsftpd/ftpusers file is the simplest to
o understand. It contain
contains a
list of user or account names, one per line,, that are
re not allowed to log in
using FTP. This file is used to increase security.
cracker
ty. For example, if a cracke
somehow obtains the root password but (stupidly)
upidly) tries to llog in as root
using FTP, the login attempt will fail.
il. Notice
e that the filename
filenam is annoyingly
an
counterintuitive: user accounts listed
to log in
sted in
n this file are not permitted
permitte
p
to the system via FTP. In general,
used to prevent
neral, /etc/vsftpd/ftpusers
/etc/vsftpd/ftpus
is us
privileged user accounts, such
uch as root,
root from using FTP
F
to obtain access to
the system. The following
file:
ng code
de shows the default /etc/vsftpd/ftpusers
/
/etc/vs
root
bin
daemon
adm
Ip
sync
shutdown
hutdown
own
halt
maill
news
uucp
operator
perato
gamess
nobody
So, to preve
prevent a user named bubba from using FTP to log in, or, rather, to
bubba from logging in to the system via FTP, add bubba to the end of
prevent b
pre
/etc/vsftpd/ftpusers. In most cases, these default entries should be
/etc/vs
suff
sufficient, but if you install a software package, such as a database package,
that requires one are more special user accounts, consider adding such special
accounts to /etc/vsftpd/ftpusers in order to maintain strict limits on how the
FTP server can be accessed.
12

Prelim Paper Solution

Vi
dy
al
an
ka
r

The
/etc/vsftpd/user_list
file
serves
a
purpose
similar
to
/etc/vsftpd/ftpusers, limiting FTP access, but it is more flexible. If you
compare the two files, though, you see that the users listed in
/etc/vsftpd/user_list are the same ones listed in /etc/vsftpd/ftpusers. So,
ftpuse
what is the difference between the two files? /etc/vsftp/ftpusers
d/user_list
_list
unconditionally denies access to the system via FTP; /etc/vsftpd/user_list
th
can be used to deny or permit access, depending on the value of the
userlist_deny directive in /etv/vsftpd/vsftpd.conf. If userslist_deny
slist_deny
eny is set
TP access
ss only to the
to NO (that is, userlist_deny=NO), then vsftpd allows FTP
o YES (that is,
users listed in /etc/vsftpd.user_list. If userlist_deny is set to
pd/user_list
r_list will not be
userlist_deny=YES), no user listed in /etc/vsftpd/user_list
permitted to login via FTP. Such users will not
ott even be prompted for a
[2 ma
marks]
password.

Q.5 (b) Write the steps to configure postfix server..


[5]
(A)
#rpm i postfix
[All
All steps compulsory
compulsor for 5 marks]
#service sendmail stop
#chkconfig levels 0123456 sendmail
endmail
il OFF
#chkconfig levels 2345 postfix
ostfix
stfix ON
#service postfix start
#telnet localhost 25
Q.5 (c) Create a file f1.txt in /data and upload
uplo
it on server whose ip is [5]
2.3.4.5. Also
so download
wnload file 2.txt fr
from ser
server.
(A)
#mkdir /data
[All steps compulsory for 5 marks]
#cd mkdir
kdi
kdir
#touch
ouch f1.txt
#ftp 2.3.4.5
Username:
name: abc
Password:***
assword
ftp> put /data/f1
/data/f1.txt
>get f2.txt
f2.tx
ftp>get
ftp>quit
#

Q.5 (d) Explain


protocols
required to configure mail server.
Ex
p
[5]
(A))
Tracing
Tracin the Email Delivery Process
The usual email delivery process involves three components, a mail user
agent, a mail transfer agent, and a mail delivery agent.

13

Vidyalankar : T.Y. B.Sc. (IT)  Linux

Mail User Agent (MUA)


To be able to send mail, you or your users need a program called a mail
user agent, commonly abbreviated as MUA and widely referred to as a
mail client. The MUA provides users an interface for reading and writing
email messages. Two types of MUAs are available: those that have a
d or KMail,
Mail
graphical user interface (GUI), such as Mozilla Thunderbird
elm.
and those that have a command line interface (CLI), such ass Mutt or elm
Whether your MUA is a GUI or CLI, the functionality is the same.
ame. After
ransfer agent
composing an email message, the MUA sends it to a mail transfer
etwork.
(MTA), which transmits the message across the network.

Vi
dy
al
an
ka
r

i)

ii) Mail Transfer Agent (MTA)


ed as MTA, is the program that
A mail transfer agent, usually abbreviated
sends the message across the network..

The MTA reads the information in


n the To: section of the email
e
message
me
and determines the IP addresss of the recipient's mail server. T
Then the
MTA tries to open a connection
ection
n to the recipient's server through a
TCP/IP port, typically port
System, plays a
ort 25. DNS,
DN the Domain Name S
role in mail deliver, too.
oo. MTAs query a domain's
domain' DNS mail
m exchanger, or
MX, record, to determine
responsible for receiving mail
ermine the host th
that is rresponsib
for that domain.. If the
machine
can establish a
he MTA on the
the sending
sen
m
connection to
transmits the message using the
o the destination MTA, it transm
Simple Message
essage Transfer
ansfer Protocol (S
(SMTP).
In some
me cases, the message mi
might not be immediately deliverable, so the
sending
queue
nding MTA will store in a local
lo
que and attempt retransmission after
a set
et amount of time.
time In other cases, the receiving MTA might refuse
to bounce and be returned to the sender's
delivery,
livery, causing the message
m
MUA
MUA.

iii) Mail Delivery Agent (MDA)


After the MDA ((sometimes referred to as a local delivery agent, or
LDA)
DA) receives
r
tthe message from the MTA, it stores the new message in
recipient's mailbox file. The mailbox file, known traditionally as the
the recipien
spool, is almost always identified by the recipient's username.
mail spoo

Introdu
Introducing
SMTP
The SMTP protocol can transfer only ASCCII text. It cant handle fonts,
co
colors, graphics, or attachments. If you want to be able to send these items,
you need to add another protocol to SMTP, MIME. MIME stands for
Multipurpose Internet Mail Extensions. MIME is implemented on top of the

14

Prelim Paper Solution

SMTP protocol and enables you to add colors, sounds, and graphics to your
messages and still deliver them via SMTP. For MIME to work, you must have
a MIME-compliant MUA (most are).

Vi
dy
al
an
ka
r

Understanding POP3
Two other protocols are part of the email process: Post Office Protocol
ocol version
sion
3, known as POP3, and Internet Message Access Protocol version
on 4, known
own as
a
IMAP4.
Without POP3 (or IMAP), and MUA and MTA can't communicate.
ommunicate.
ate. That is, if
you want to read your mail, need POP3 (or IMAP) to
o retrieve
ieve messages that
arrive at your MTA while you're offline. POP3 uses the MTA's storage to
hold messages until they are requested. When
hen users
sers want to check their
t
email, they connect to the POP3 server and retrieve
were
etrieve messages th
that wer
stored by the server. After retrieval, the messages
ssages are stored
store locally (that
(t
is, locally to the MUA) and use the MUA on your PC to read them at
a your
leisure.

Q.6 Attempt any TWO:


Q.6 (a) Write a code to host three
hree
e websites with same ip
(A)
Write the following code
ode in httpd.conf
pd.con
NameVirtualHost 192.168.2.1:80
92.168.2.1:80
8.2.1:80
<VirtualHost *:*>>
ServerName www.a.com
com
DocumentRoot
Root /var/www/a/html
r/www/a/html
DocumentIndex
entIndex home.html
home.h
</VirtualHost>
rtualHost>
ualHost>
<VirtualHost
VirtualHost
Host *:*>
*:
ServerName
erName www.b.com
www
DocumentRoot /var/www/b/html
/var/www/b/
DocumentIndex home.html
home.htm
h
</VirtualHost>
VirtualHost>
<VirtualHost
alHos *:*>
ServerName
www.c.com
ServerNa
www
DocumentRoot
/var/www/c/html
Do
DocumentRoo
DocumentIndex
home.html
Doc
DocumentI
</VirtualHost>
</Virtua

[10]
[5]

[2 marks]

[2 marks]

15

Vidyalankar : T.Y. B.Sc. (IT)  Linux

Vi
dy
al
an
ka
r

Q.6 (b) Explain rpm command with its options


[5]
(A)
Rpm stands for red hat package manager which can be used with different
options
[Any 5 options for 5 marks]
To check which all packages are installed use qa
#rpm -qa
To check whether specific package is installed or not use q
#rpm q packagename
To install specific package use i
#rpm i packagename
To update the package use U
#rpm U packagename
To remove the package use e
#rpm e packagename

Q.6 (c) Why the name apache for Web server?


erver? State the difference
dif
[5]
between apache 1.0 and apache 2.0.
.0.
(A)
Apace 1.0
[2
[2 marks]
1. Apache 1.0 makes the use
e of monatomic
monatomic proces
process model tto handle the
traffic.
2. As the traffic increases,
child server
eases,
s, master web server mail creates
cr
process (CSP). This
is is called
d as sparing the sserver.
3. When the child
due to many traffic
ld server
rver process gets overloaded
overload
ov
master server
ver creates
tes are more child server process.
(max 2sc CSP)
4. When the traffic
fic is reduced.
5. Master
process.
ster server will kill
kill child se
k
server p
Forr eq.
MASTER
M
ASTER WEB SERVER

Csp1
Cs

Csp2

Csp2 SC

CSP : Child Server Process


CS
Monatomic Process Model

Disadvantage:
Heavy weight technique spawning and Rilling requires huge
D
rescores

16

Prelim Paper Solution

Apache 2.0
[2 marks]
1. Apache 2.0 makes the use of multi processing model (mpm)
2. As the traffic increases, master web server creates child server
process which in two creates child threads.
3. As the traffic is decreased, the child threads and when child server
serv
process will be Rilled.
E.g. Multiprocessing model (mpm)
with

Vi
dy
al
an
ka
r

Master

CSP1

CT

CSP2

CTM

CT

CSP256

CTM

x CSP : Child Server Process


roc
rocess
x CT : Child Thread
d
Advantage : Light weight
threads requires
eight technique,
hnique, spawning
spawning and Rilling
Ri
less require resources.
rces.

Q.6 (d) Explain useradd


radd command
ommand with options
option
[5]
(A)
This command
mand addss user to the system.
sys
[Any 5 options for 5 marks]
Syntax:
x:
#useradd
[-f] [-g] [-G] [-p]
[-s] [-u] [-n] [-r] username
seradd
add [-c] [-d] [-e] [[
Options:
ns:
x C:: comment
x D: home dir
x E: Account expiration
ex
x F: days after
afte which
whic password expires
x g: prim
primary group
grou
x G: Supplemental
group
Suppleme
x P: password
passwo
x S: Shells
She
x U:uid
U:u
x R:
R acc but no dir is assigned
E.g.
E #useradd abc

17

Vidyalankar : T.Y. B.Sc. (IT)  Linux

Vi
dy
al
an
ka
r

Q.7 Attempt any THREE:


[15]
Q.7 (a) Explain swap partition
[5]
(A)
Swap partition
[All points compulsory for 5 marks]
x As the disk is much slower than RAM, the systems performance is
slower when the operating system has to perform a lot of paging. Virtual
memory enables one to run programs using swap partition that one
otherwise could not run.
x It is used for virtual memory to hold data that is too large to fit into
system RAM.
The swap partition should be at least 32MB or two times
mes the systems RAM,
whichever larger.
Q.7 (b) Explain mount command with 5 options
[5]
(A)
Mount command is used on client machine
e for mounting
ting the file on
o Client
from server machine.
[Any 5 options
option for 5 marks]
mar
Syntax:
#mount source mount point
E.g.
#mount server A:/home / pqr
qr
Different options of mount
nt command:
1. ro
Requesting for read
d only operation
2. rw
Requesting for
or read write operation
3. bg
Do all the
he operation in background without
withou disturbing user
4. Soft
ft
Use
se softt mounting
5. Hard
rd
Use hard mounting
Q.7
7 (c) How to configure
configur samba?
samb
Also explain how to add samba user.
[5]
(A)
Configure
figure Samba
[3 marks]
#rpm i samba
sa
#vi
#v /etc/samba/smb.conf
/etc/samba
#service
samba
start
#se
sa
#smbmount
//terry/c /mnt/win
#
#smbmou
Adding
[2 marks]
Addin samba user
#useradd
username
#u
#passwd username
#smbpasswd a username
#smbpasswd username
18

Prelim Paper Solution

Vi
dy
al
an
ka
r

Q.7 (d) What is dns used for? Explain different types of dns servers
[5]
(A)
DNS is used for mapping URL to IP.
[2 marks]
Types of DNS SERVERS
[every server 1 marks each]
Primary or master: This is a DNS server maintained by ISP to map URL to
IP.
Secondary or Secure : This is a backup securer of primary and hence is a
replica of primary. It replies only if primary fails.
Caching or hint: This is a DNS cache which is maintained on a client machine
chine
that contains ip of frequently visited URL.

Q.7 (e) How to disable unknown user upload? What is warez


arez server?
rver?
[5]
(A)
There are following two methods that can disable
e unknown user:
u
Method 1:
[2 ma
marks]
1. Find all the directories and files uploaded
ded by user ftp and remove them
#find / user(ftp)|xargs rm rf
2. Remove user ftp
#userdel ftp
Method 2:
[2 marks]
In a file user_list put username
name ftp and in vsftpd.con
vsftpd.conf set USER_DENY=yes
U
also set anonymous_enable=no
ble=no
no
The server that becomes
distribute illegal document
mes source
ce to circulate
circulate and
an distr
like virus is called as WAREZ
REZ server

Q.7 (f) What is content


ntent negotiation?
[5]
(A)
Content negotiation
n refers to the technique
techniqu Web clients and servers use to
select how to present a resource,
resourc such as a document that is available in
several
For example,
suppose that a Web page is
eral different formats.
forma
ex
available
languages. One
ble in different langu
O way to select the proper language is to
give the user an index page
which she chooses the desired language.
pag from
fr
Content negotiation enables
enable the server to choose the preferred language
automatically based
bas
on information a Web browser sends, indicting what
representations
[Basic explanation with example 5 marks]
resentations it prefers.
pre

19

You might also like