Вы находитесь на странице: 1из 19

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

V
Linux Administration
Time : 2½ Hrs.] Prelim Question Paper [Marks : 75

Q.1 Attempt any TWO: [10]


10]
Q.1 (a) Explain Linux distributions. [5]
[5
(A) Linux Distributions
Although there is only one standard version of Linux, there are actually

r
several different distributions. Different companies and groups have packaged
packag
Linux and Linux software in slightly different ways.

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

Red Hat maintains an n extensive


nsive library of documentation that is freely
f Linux docum
accessible online. On its Web site, you ca
can its support page, which lists
n link to it
al
the complete setet 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 e-
commercece solutions.
rce
dy

Mandrake
ke
Mandrake Linux is another p popular Linux distribution with many of the same
pop
features focuses on providing up-to-date enhancements and an
atures as Red Hat. It foc
easy-to-use installation
install and
a GUI configuration.
Vi

SuSE
SuS
Originally a German
Orig Ge language-based distribution, SuSE has become very
popular thro
popula throughout Europe and is currently one of the fastest growing
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.

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

r
ka
ary Linux
Caldera also offers a line of commercial and proprietary ux packages
packages.

Slackware
net sites,
Slackware is available from numerous Internet es, and yo
you
u can order the CCD
from Walnut Creek Software. The Slackwareware distribution
stribution takes sspecial car
care to
remain as closely Unix compliant as possible.
an ssible.

TurboLinux
TurboLinux provides English,, Chinese, and
nd Japanese versions
versio of Linux. It
includes several of its own
wn packages, such as TurboPkg,
Tur for automatically
updating applications.

Q.1 (b) How loader works?rks? State


tate the difference
differenc between
betw grub and lilo. [5]
al
(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
dy

GRUB displays a splash screen,


sc waits for few seconds, if you don’t enter
w
anything,
ing, it loads the de default kernel image as specified in the grub
defau
configuration file. (grub.conf
(g .con in /boot)
knowledge
GRUB has the knowledg
kn of the filesystem (the older Linux loader LILO
didn’t
n’t understand filesystem).
understa files
Grub configuration
confi file is/boot/grub/grub.conf (/etc/grub.conf is a link to
Vi

this).
th [Working
[W of loader 3 marks and difference 2 marks (4 points)]

GRUB LILO
GRUB
G RUB stands for GR and Unified Stands for Linux Loader
Bootloader.
Boo
GRUB supports an unlimited number LILO supports only up to 16
of boot entries. different boot selections;
GRUB can boot from network. LILO cannot boot from network.

2
Prelim Paper Solution

There is no need to change GRUB LILO must be written again every


when the configuration file is time you change the configuration
changed as GRUB is dynamically file.
configurable.
GRUB has an interactive command eract
LILO does not have an interactive
interface. command interface.
GRUB has the knowledge of the file LILO doesn’t have the
e know ledge
ledged
system. file system.

ar
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

ext2(non-journaling file system)


em) [2 marks]
x xt2 stands for second extended file system.
ax ext2 does not have journaling
aling feature.
x On flash drives, usb drives, ext2 is recommended,
recomm as it doesn’t need to
do the over head of journalin
journaling.
al
x Can handle file systems
tems up to 4 TB
x It supports longg 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
dy

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
Vi

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 Maximum individual file size can be from 16 GB to 2 TB


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

Q.1 (d) Explain RAID levels with diagram. [5]


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

r
ka
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 system’s 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
an 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
/S controls the
he RAID leve by the system.
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
ripping [½ mark]
al
This level
el requires
ires at least two disks
d and uses a method called striping
that writes datata across both drives.
d There
Th is no redundancy provided by
thiss level of RAID, since the loss of either drive makes it impossible to
recover
over the data. This levell does give a speed increase in writing to the
Th leve
dy

disks.
ks.
Vi

4
Prelim Paper Solution

x 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
controllers, one for each disk. This variant of RAID level 1 is known
own as
a
duplexing.

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

A1 A2 A3 A4 Ap1 Ap2 Ap3


B1 2
B2 B3 B4 Bp1 Bp2 Bp3
C1 C2 C3 C4 Cp1 Cp2 Cp3
D1 D2 D3 D4 Dp1 Dp2 Dp3
Vi

Disk 0 Disk 1 Disk 2 Disk 3 Disk 4 Disk 5 Disk 6

x RAID level 3 – Byte-Level Striping with Parity Disk [1 mark]


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.

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

RAID 3

A1 A2 A3 Ap(13)
A4 A5 A6 Ap(46)
B1 B2 B3 Bp(13)
B4 B5 B6 Bp(46)

r
Disk 0 Disk 1 Disk 2 Disk 3

ka
x RAID level 4 – Block-Level Striping with Parity
rity disk
arity [1 mark]
mar
requires minimum 3 disks. It attemptss to add error checking and
recovery to RAID-3 by doing block level riping with the addition
vel striping addit of a
single parity disk. RAIDD4
an A1
B1
C1
A2
B2
C2
A3
B3
C3
Ap
Bp
Cp
Dp
D1 D2
D D3
D
al
Disk 0 Disk 1 Disk 2 Disk 3

x 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
dy

across
ss the two disks similarly
s to
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
Vi

A1 A2 A3 Ap
B1 B2 Bp B3
C1 Cp C2 C3
Dp D1 D2 D3

Disk 0 Disk 1 Disk 2 Disk 3

The information of system’s RAID configuration is stored in /etc/traidtab .

6
Prelim Paper Solution

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

r
#chkconfig –levels 0123456 packagename OFF

ka
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) an Setting IP for the machine: [3 Mark]
#ifconfig etho 192.168.2.1 netmasksk 255.255.255.0 broadcas 192.168.2.255
255.0 broadcast 192.1
Setting IP for the Default Gateway:
teway: [1 Mark]
#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 savee the file
al
Q.2 (c) What is the e process
ess to create grub boot fl floppy? [5]
(A) (a) Boot a Linux with
ith Grub support
suppor and loglo in as root or in superuser mode
(suu followed by the password) [1 mark]
(b) Format
rmat the floppy ini MsDOS (or Ext2) by typing "mkmsdosfs -F32
dy

/dev/fd0" inserting a floppy


ev/fd0" after insert flo into the drive. [1 mark]
(c) Create
reate a mounting point,
poi mount the floppy and make the necessary
directories th files at a designated location where Grub will
irectories to store the
search for the
them
#mkdir /mnt/fd0mount
/mn
/mnt/fd0m /dev/fd0 /mnt/fd0
#mkdir /mnt/fd0/boot
/mnt/f
Vi

/mnt/fd0/boot/grub
#mkdir /mnt
(d) Copy all tthe necessary files in /boot/grub directory of the booted Linux
to the mounted fd0
#c cd /boot/grubtar [2 mark]
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]

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

r
possibility of an attack, so convert the file in cipher text using ing encryption

ka
and decryption technique.
Hard Mooting and soft mounting: The process ess
ss of requesting a servserver
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.
anCross Domain Mounting: Two machines ines mounting
untin the
the files of each other
o is
known as Cross Domain Mounting
Root Squash: Squashing the rightsights 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: [10]


al
Q.3 (a) Explain the NTP utility programs. [5]
(A) [Any 5 program 5 marks]

PROGRAM
OGRAM DESCRIPTION
DESCR
dy

ntpdate
date Sets the system date and time via NTP
ntpdc
pdc Controls the NTP daemon, ntpd
ntp-keygen
p-keygen Generates
Generate public and private keys for use with NTP
ntpq Querie
Queries the NTP daemon
ntpsim Provides
Pro NTP simulation for development and testing
ntptime
time Displays the time variables maintained by the Linux kernel
Vi

ntptrace Traces a chain of NTP servers back to the primary source


tickadj Sets certain time variables maintained by the Linux kernel

8
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.

On windows machine: [1 mark]


ark]
Open My Network Places -> samba-> login as abc

r
This makes /data sharable with windows.

ka
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
an 3. httpd_accer_with_proxy yes/No o
4. httpd_accer_IP
5. httpd_accer_porl  50
6. httpd_accer_uses_host_hiodes
t_hi
t_hiodes  yes/No
7. httpd_access : allow all/cliny
cliny a
all

x line 1 & 2 Specifies


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

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

C1 S C4
Q
U
C2 C5
I
D
C3 C6

9
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).

Q.4 Attempt any TWO: [10]


Q.4 (a) Define zone and create a zone file for www.abc.com having
aving Ipp [5]
[5
233.41.22.4
(A) Zone Definition: [2 marks]

r
Zone “www.abc.com” IN

ka
{
Type “Master”;
File “abc.zone”;
}

an Zone File [3 marks]


@ IN SOA www.abc.com
(
42; Serial
3H; Refresh
15M; Retry
2D; Expiry
3D); Minimum TTL
al
IN A 233.41.2.4
2.4

Q.4 (b) Write Configuration steps of ca caching dns server [5]


(A) 1. Install
tall DNS package.
dy

# rpm  I bind
b €
installed.
Output : bind verno inst
installe
2. Once DNS is installed,
installed DNS configuration file “named.conf” will be
created, which
whic SHOULD
SHOU having following definition.
Zone “ . “ IIN
{
Vi

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]

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]

r
2. scp (Securce Copy) : It is a replacement of scp to copy a file le from a local

ka
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
an r directory.
# scp B/abc/f2.txt/pqr € [2 marks]
3. sttp (secures file transfer protocol) ol) : It is a replac
replacement of ffile t transfer
a file between client and a serves.
Syntax : sttp src destn stn €
Eg.1 : copy contentt of file it from local m/c remote
re m/c B/abc directory.
m
Eg. 2: Copy contents
ntents of file from remote m/c B/abc B directory into local
m/c/pq directory.
ctory.
al
# step B/abc?f2.txt/[pqr/f2.txt
/abc?f2.txt/[pqr/f2.txt
2.txt/[pqr/f2.txt [2 marks]

Q.4 (d) Explainn the important files used by DNS


D server. [5]
(A) /etc/nsswitch.conf
c/nsswitch.conf
sswitch.conf [Any 5 for 5 marks]
dy

It tellss the browser not to contact


cont the DNS server directly, first check
whether present in DNS cache
her required entry is p
pres

/etc/hosts
It iss DNS Cache
Cach
Vi

/etc/resolv.conf
/e
It contains
c IP
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.

/etc/named.conf/reverse zone
It is used for reverse mapping.

r
Q.5 Attempt any TWO: [10]
Q.5 (a) How to configure user level ftp access? [5]

ka
(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. ty. For example, if a cracke
cracker
somehow obtains the root password but (stupidly) upidly) tries to llog in as root
an using FTP, the login attempt will fail.il. Notice
e that the filename
filenam is annoyingly
an
counterintuitive: user accounts listed
sted inn this file are not permitted
permitte
p to log in
to the system via FTP. In general,
neral, /etc/vsftpd/ftpusers
/etc/vsftpd/ftpus used to prevent
is us
privileged user accounts, such
uch as root,
root from using FTPF to obtain access to
the system. The followingng code
de shows the default /etc/vsftpd/ftpusers
/
/etc/vs file:
root
bin
al
daemon
adm
Ip
sync
shutdown
hutdown
own
dy

halt
maill
news
uucp
operator
perato
gamess
Vi

nobody
So, to preve
prevent a user named bubba from using FTP to log in, or, rather, to
prevent b
pre bubba from logging in to the system via FTP, add bubba to the end of
/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

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,
what is the difference between the two files? /etc/vsftp/ftpusers ftpuse
d/user_list
unconditionally denies access to the system via FTP; /etc/vsftpd/user_list _list
can be used to deny or permit access, depending on the value of the th
userlist_deny directive in /etv/vsftpd/vsftpd.conf. If userslist_deny eny is set
slist_deny
to NO (that is, userlist_deny=NO), then vsftpd allows FTP TP access
ss only to the

r
users listed in /etc/vsftpd.user_list. If userlist_deny is set too YES (that is,

ka
pd/user_list
userlist_deny=YES), no user listed in /etc/vsftpd/user_list r_list will not be
permitted to login via FTP. Such users will not ott even be prompted for a
password. [2 ma
marks]

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


(A) an #rpm –i postfix [All
All steps compulsory
compulsor for 5 marks]
#service sendmail stop
#chkconfig –levels 0123456 sendmail
il OFF
endmail
#chkconfig –levels 2345 postfix
stfix ON
ostfix
#service postfix start
#telnet localhost 25
al
Q.5 (c) Create a file f1.txt in /data and upload
uplo it on server whose ip is [5]
2.3.4.5. Alsoso 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
dy

#ftp 2.3.4.5
Username:
name: abc
Password:***
assword
ftp> put /data/f1
/data/f1.txt
>get f2.txt
ftp>get f2.tx
ftp>quit
Vi

Q.5 (d) Explain


Ex protocols
p required to configure mail server. [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

i) 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
graphical user interface (GUI), such as Mozilla Thunderbird d or KMail,
Mail
and those that have a command line interface (CLI), such ass Mutt or elm
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

r
etwork.
(MTA), which transmits the message across the network.

ka
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
an and determines the IP addresss of the recipient's mail server. T Then the
MTA tries to open a connection n to the recipient's server through a
ection
TCP/IP port, typically portort 25. DNS,
DN the Domain Name S System, plays a
role in mail deliver, too.
oo. MTAs query a domain's
domain' DNS mail m exchanger, or
MX, record, to determine
ermine the host th responsible for receiving mail
that is rresponsib
for that domain.. If thehe MTA on the the sending
sen machine
m can establish a
connection to transmits the message using the
o the destination MTA, it transm
al
Simple Message
essage Transfer
ansfer Protocol (S
(SMTP).

In some
me cases, the message mimight not be immediately deliverable, so the
sending
nding MTA will store in a local
lo queue
que and attempt retransmission after
a set
et amount of time.
time In other cases, the receiving MTA might refuse
dy

delivery,
livery, causing the message
m to bounce and be returned to the sender's
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
Vi

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 can’t 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).

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.

r
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

ka
arrive at your MTA while you're offline. POP3 uses the MTA's storage to
hold messages until they are requested. Whenhen users
sers want to check their
t
email, they connect to the POP3 server and retrieve
etrieve messages th were
that wer
stored by the server. After retrieval, the messages
ssages are stored
store locally (that
(t
anis, locally to the MUA) and use the MUA on your PC to read them at a your
leisure.

Q.6 Attempt any TWO: [10]


Q.6 (a) Write a code to host threehreee websites with same ip [5]
(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 *:*>>
al
ServerName www.a.com com
DocumentRoot
Root /var/www/a/html
r/www/a/html
DocumentIndex
entIndex home.html
home.h
</VirtualHost>
rtualHost>
ualHost> [2½ marks]
dy

<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 *:*>
Vi

ServerName
ServerNa www.c.com
www
DocumentRoot
Do
DocumentRoo /var/www/c/html
DocumentIndex
Doc
DocumentI home.html
</VirtualHost>
</Virtua [2½ marks]

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

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

r
To update the package use –U

ka
#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]
an 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 process model tto handle the
monatomic proces
traffic.
2. As the traffic increases,
eases,s, master web server mail creates
cr child server
process (CSP). Thisis is calledd as sparing the sserver.
3. When the child ld server
rver process gets overloaded
overload
ov due to many traffic
master server tes are more child server process.
ver creates
al
(max 2sc CSP)
4. When the trafficfic is reduced.
5. Master
ster server will kill
kill child se
k server pprocess.
Forr eq.
dy

MASTER
MASTER WEB SERVER
Vi

Csp1
Cs Csp2 Csp2 SC

x CSP : Child Server Process


CS
Monatomic Process Model

Disadvantage:
D Heavy weight technique spawning and Rilling requires huge
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)

Master with

r
ka
CSP1 CSP2 CSP256

an CT CTM CT

x CSP : Child Server Process


x CT : Child Thread d
roc
rocess
CTM

Advantage : Light weight


eight technique,
hnique, spawning
spawning and Rilling
Ri threads requires
less require resources.
rces.
al
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
add [-c] [-d] [-e] [-
seradd [-f] [-g] [-G] [-p]
[ [-s] [-u] [-n] [-r] username
dy

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
Vi

x G: Supplemental
Suppleme group
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

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 system’s 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.

r
The swap partition should be at least 32MB or two times
mes the system’s RAM,

ka
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
an E.g.
#mount server A:/home / pqr
Different options of mount
qr
nt command:
1. ro
Requesting for read d only operation
2. rw
al
Requesting for
or read write operation
3. bg
Do all the
he operation in background without
withou disturbing user
4. Softft
dy

Use
se softt mounting
5. Hard
rd
Use hard mounting

Q.77 (c) How to configure


configur samba?
samb Also explain how to add samba user. [5]
(A) Configure
figure Samba [3 marks]
Vi

#rpm –i samba
sa
#vi
#v /etc/samba/smb.conf
/etc/samba
#service
#se samba
sa start
#smbmount
#
#smbmou //terry/c /mnt/win
Adding
Addin samba user [2 marks]
#useradd
#u username
#passwd username
#smbpasswd –a username
#smbpasswd username

18
Prelim Paper Solution

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.

r
ka
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
an 2. Remove user ftp
#userdel ftp
Method 2: [2½ marks]
In a file user_list put username vsftpd.conf set USER_DENY=yes
name ftp and in vsftpd.con U
also set anonymous_enable=no
ble=no
no
The server that becomes mes source
ce to circulate
circulate and distribute illegal document
an distr
like virus is called as WAREZ
REZ server
al
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
eral different formats.
forma For example,
ex suppose that a Web page is
dy

available languages. One


ble in different langu O way to select the proper language is to
give the user an index page
pag from
fr which she chooses the desired language.
Content negotiation enables
enable the server to choose the preferred language
automatically based
bas on information a Web browser sends, indicting what
representations
resentations it prefers.
pre [Basic explanation with example 5 marks]
Vi

‰‰‰‰‰

19

Вам также может понравиться