Sie sind auf Seite 1von 51

Linux Interview Questions

Q: - How are devices represented in UNIX?


All devices are represented by files called special files that are located in /dev directory.
Q: - What is 'inode'?
All UNIX files have its description stored in a structure called 'inode'. he inode contains info about the file!si"e# its location# ti$e of last access# ti$e of last $odification# per$ission
and so on. %irectories are also represented as files and have an associated inode.
Q: - What are the process states in Unix?
As a process executes it chan&es state accordin& to its circu$stances. Unix processes have the followin& states'
(unnin& ' he process is either runnin& or it is ready to run .
)aitin& ' he process is waitin& for an event or for a resource.
*topped ' he process has been stopped# usually by receivin& a si&nal.
Zombie : The process is dead bt have not been removed !rom the process tab"e#
Q: - What command sho"d $o se to chec% the nmber o! !i"es and dis% space sed and each ser's de!ined &otas?
rep+uota
Q: - What command is sed to remove the password assi'ned to a 'rop?
&passwd ,r
Q: - What can $o t$pe at a command "ine to determine which she"" $o are sin'?
echo -*./LL
Q: - Write a command to !ind a"" o! the !i"es which have been accessed within the "ast () da$s#
find / !type f !ati$e !01 2 filena$e.txt
Q: - What is a *ombie?
3o$bie is a process state when the child dies before the parent process. In this case the structural infor$ation of the process is still in the process table.
Q: - What daemon is responsib"e !or trac%in' events on $or s$stem?
syslo&d
Linux Interview Questions
Q: - What do $o mean a +i"e ,$stem?
4ile *yste$ is a $ethod to store and or&ani"e files and directories on dis5. A file syste$ can have different for$ats called file syste$ types. hese for$ats deter$ine how the
infor$ation is stored as files and directories.
Q: - Te"" me the name o! director$ strctre hierarch$ !or -inx
/root
/boot
/bin
/sbin
/proc
/$nt
/usr
/var
/lib
/etc
/dev
/opt
/srv
/t$p
/$edia
Q: - What does .boot director$ contains?
he /boot/ directory contains static files re+uired to boot the syste$# such as the Linux 5ernel# boot loader confi&uration files. hese files are essential for the syste$ to boot properly.
Q: - I! some one de"etes .boot director$ !rom $or server/ than what wi"" happen?
In that case your server will be in unbootable state. 6our *erver can7t boot without /boot directory because this directory contains all bootable files
Q: - What does .dev director$ contain?
he /dev directory contains all device files that are attached to syste$ or virtual device files that are provided by the 5ernel.
Q: - What is the ro"e o! dev daemon?
he udev de$on used to create and re$ove all these device nodes or files in /dev/ directory.
Q: - What %ind o! !i"es or nodes .dev. director$ contains and how do I access or see device !i"es?
0"oc% 1evice +i"es:-
Linux Interview Questions
8loc5 device files tal5s to devices bloc5 by bloc5 9: bloc5 at a ti$e ;: bloc5 < =:> bytes to 0>?8@A.
/xa$ples' ! U*8 dis5# B%(CD# .ard %is5
E ls /dev/sdF
brw!rw!!!! : root root G# 1 Dar := >11H sda
brw!rw!!!! : root root G# : Dar := >11H sda:
brw!rw!!!! : root root G# > Dar := >11H sda>
brw!rw!!!! : root root G# 0 Dar := >11H sda0
brw!rw!!!! : root root G# I Dar := >11H sdaI
brw!rw!!!! : root root G# :J Dar := >11H sdb
Bharacter %evice 4iles'!
Bharacter device files tal5 to devices character by character.
/xa$ples' ! Kirtual ter$inals# ter$inals# serial $ode$s# rando$ nu$bers
2"s .dev.tt$3
crw!rw!!!! : root root I# JI Dar := >11H tty*1
crw!rw!!!! : root root I# J= Dar := >11H tty*:
crw!rw!!!! : root root I# JJ Dar := >11H tty*>
crw!rw!!!! : root root I# JL Dar := >11H tty*0
Q: - Te"" me the name o! device !i"e !or 4,.5 mose connection#
/dev/psaux
Q: - Te"" me the name o! device !i"e !or para""e" port 64rinters7#
/dev/lp1
Q: - What does .etc.X88. director$ contains?
he /etc/X::/ directory is for X )indow *yste$ confi&uration files# such as xor&.conf.
Q: - What does .etc.s%e"" director$ contains?
he /etc/skel directory contains files and directories that are auto$atically copied over to a new user's home directory when such user is created by the useradd or adduser co$$and.
Q: - Te"" me name o! -inx +i"e s$stems?
/xt>
/xt0
Linux Interview Questions
Q: - What is the di!!erence between ext5 and ext( !i"e s$stems?
he ext0 file syste$ is an enhanced version of the ext> file syste$.
he $ost i$portant difference between /xt> and /xt0 is that /xt0 supports Mournalin&.
After an unexpected power failure or syste$ crash ;also called an unclean system shutdown@# each $ounted ext> file syste$ on the $achine $ust be chec5ed for consistency by the
e>fsc5 pro&ra$. his is a ti$e!consu$in& process and durin& this ti$e# any data on the volu$es is unreachable.
he Mournalin& provided by the ext0 file syste$ $eans that this sort of file syste$ chec5 is no lon&er necessary after an unclean syste$ shutdown. he only ti$e a consistency chec5
occurs usin& ext0 is in certain rare hardware failure cases# such as hard drive failures. he ti$e to recover an ext0 file syste$ after an unclean syste$ shutdown does not depend on the
si"e of the file syste$ or the nu$ber of filesN rather# it depends on the si"e of the journal used to $aintain consistency. he default Mournal si"e ta5es about a second to recover#
dependin& on the speed of the hardware.
Q: - 9n$ idea abot ext: !i"e s$stem?
he extI or fourth extended filesyste$ is a Mournalin& file syste$ developed as the successor to ext0. /xtI filesyste$ released as a functionally co$plete and stable filesyste$ in
Linux with 5ernel version >.J.>G.
4eatures of extI file syste$'!
:. Burrently# /xt0 supports :J 8 of $axi$u$ file syste$ si"e and > 8 of $axi$u$ file si"e. /xtI have : /8 of $axi$u$ file syste$ si"e and :J T0 of $axi$u$ file si"e.
9An ;0 or exabyte is :1:G bytes or :#1IG#=LJ 8A
>. 4ast fsc5 chec5 than ext0
0 In /xtI the Mournalin& feature can be disabled# which provides a s$all perfor$ance i$prove$ent.
I. Cnline defra&$entation.
=. %elayed allocation
/xtI uses a filesyste$ perfor$ance techni+ue called allocate!on!flush# also 5nown as delayed allocation. It consists of delayin& bloc5 allocation until the data is &oin& to be written to
the dis5# unli5e so$e other file syste$s# which $ay allocate the necessary bloc5s before that step.
Q: - How we create ext( !i"e s$stem on .dev.sda< dis%?
E $5fs ,M /dev/sdaL
Q: - =an we convert ext5 !i"es$stem to ext( !i"e s$stem?
6es# we can convert ext> to ext0 file syste$ by tune>fs co$$and.
tune>fs ,M /dev/O8loc5!%evice!Na$e2
Q: - Is there an$ data "ose drin' conversion o! ext5 !i"es$stem to ext( !i"es$stem?
No
Q: - How we wi"" create ext: !i"e s$stem?
E $5e>fs !t extI /dev/%/K
Q: - ;xp"ain .proc !i"es$stem?
Linux Interview Questions
/proc is a virtual filesyste$ that provides detailed infor$ation about Linux 5ernel# hardware7s and runnin& processes. 4iles under /proc directory na$ed as Kirtual files. 8ecause /proc
contains virtual files that7s why it is called virtual file syste$.
hese virtual files have uni+ue +ualities. Dost of the$ are listed as "ero bytes in si"e. Kirtual files such as /proc/interrupts# /proc/$e$info# /proc/$ounts# and /proc/partitions provide
an up!to!the!$o$ent &li$pse of the syste$'s hardware. Cthers# li5e the /proc/filesyste$s file and the /proc/sys/ directory provide syste$ confi&uration infor$ation and interfaces.
Q: - =an we chan'e !i"es parameters p"aced nder .proc director$?
6es
o chan&e the value of a virtual file# use the echo co$$and and a &reater than sy$bol ;2@ to redirect the new value to the file. 4or exa$ple# to chan&e the hostna$e on the fly# type'
echo www.nextstepIit.co$ 2 /proc/sys/5ernel/hostna$e
Q: - What is the se o! s$sct" command?
he /sbin/sysctl co$$and is used to view# set# and auto$ate 5ernel settin&s in the /proc/sys/ directory
Q: - .proc. director$ contains a nmber o! directories with nmerica" names# What is that?
hese directories are called process directories# as they are na$ed after a pro&ra$'s process I% and contain infor$ation specific to that process.
Q: - What is >9I1?
(AI%# stands for (edundant Array of Inexpensive %is5s. (AI% is a $ethod by which sa$e data or infor$ation is spread across several dis5s# usin& techni+ues such as dis5 stripin&
;(AI% Level 1@# dis5 $irrorin& ;(AI% Level :@# and dis5 stripin& with parity ;(AI% Level =@ to achieve redundancy# lower latency# increased bandwidth# and $axi$i"ed ability to
recover fro$ hard dis5 crashes.
Q: - Wh$ sho"d we se >9I1?
*yste$ Ad$inistrators and others who $ana&e lar&e a$ounts of data would benefit fro$ usin& (AI% technolo&y.
4ollowin& are the reasons to use (AI%
! /nhances speed
! Increases stora&e capacity usin& a sin&le virtual dis5
! Dini$i"es dis5 failure
Q: - What is the di!!erence between hardware >9I1 and ,o!tware >9I1?
he hardware!based (AI% is independent fro$ the host. A .ardware (AI% device connects to the *B*I controller and presents the (AI% arrays as a sin&le *B*I drive. An external
(AI% syste$ $oves all (AI% handlin& Pintelli&enceP into a controller located in the external dis5 subsyste$. he whole subsyste$ is connected to the host via a nor$al *B*I
controller and appears to the host as a sin&le dis5.
*oftware (AI% is i$ple$ented under C* ?ernel level. he Linux 5ernel contains an D% driver that allows the (AI% solution to be co$pletely hardware independent. he
perfor$ance of a software!based array depends on the server BQU perfor$ance and load.
Linux Interview Questions
Q: - What are the common"$ sed >9I1 t$pes?
(AI% 1
(AI% :
(AI% =
Q: - ;xp"ain >9I1 )?
(AI% level 1 wor5s on Rstripin&S techni+ue. In (AI% 1 the array is bro5en down into strips and data is written into strips. (AI% 1 allows hi&h I/C perfor$ance but provides no
redundancy. (AI% 1 Array *i"e is e+ual to su$ of dis5s in array. If one drive fails then all data in the array is lost.
Q: - ;xp"ain >9I1 8?
(AI% Level : is based on Dirrorin& techni+ue. Level : provides redundancy by writin& identical data to each $e$ber dis5 of the array. he stora&e capacity of the level : array is
e+ual to the capacity of one of the $irrored hard dis5s in a .ardware (AI% or one of the $irrored partitions in a *oftware (AI%. (AI% : provides redundancy $eans &ood protection
a&ainst dis5 failure. In (AI% : write speed is slow but read speed is &ood.
Q: - ;xp"ain >9I1 ??
(AI% Level = is based on rotatin& parity with stripin& techni+ue. (AI%!= stores parity infor$ation but not redundant data ;but parity infor$ation can be used to reconstruct data@. he
stora&e capacity of *oftware (AI% level = is e+ual to the capacity of the $e$ber partitions# $inus the si"e of one of the partitions if they are of e+ual si"e. he perfor$ance of (AI%
= is based on parity calculation process but with $odern BQUs that usually is not a very bi& proble$. In (AI% = read and write speeds are &ood.
Q: - Which %erne" mod"e is re&ired !or ,o!tware >9I1?
R$dS $odule
Q: - which ti"it$ or command is sed !or creatin' so!tware >9I1@s !or >H;-??
$dad$
Q: - =an we create so!tware >9I1 drin' -inx insta""ation?
6es# we can create *oftware (AI% durin& Linux Installation by R1is% 1ridA
Q: - What is the ro"e o! chn% si*e !or so!tware >9I1?
Bhun5 si"e is very i$portant para$eter on which (AI% perfor$ance based.
)e 5now stripes &o across dis5 drives. 8ut how bi& are the pieces of the stripe on each dis5T he pieces a stripe is bro5en into are called chun5s.o &et &ood perfor$ance you $ust
have a reasonable chun5 si"e.
4or bi& I/Cs we re+uired s$all chun5s and for s$all I/Cs we re+uired bi& chun5s.
Linux Interview Questions
Q: - What is ,W94 ,pace?
Swap space in Linux is used when the a$ount of physical $e$ory ;(AD@ is full. If the syste$ needs $ore $e$ory resources and the (AD is full# inactive pa&es in $e$ory are
$oved to the swap space. )hile swap space can help $achines with a s$all a$ount of (AD# it should not be considered a replace$ent for $ore (AD. *wap space is located on hard
drives# which have a slower access ti$e than physical $e$ory.
Q: - What are the steps to create ,W94 !i"es or 4artition?
! Breate swap partition or file
! )rite special si&nature usin& Rm%swapS
! Activate swap space by Rswapon BaS co$$and
! Add swap entry into /etc/fstab file
Q: - How $o wi"" create swap !i"e o! si*e : C0 and exp"ain swap !i"e entr$ in .etc.!stab !i"e?
Use RddS co$$and to create swap file.
dd if</dev/"ero of</*)AQ4IL/ bs<:1>I count<I
$5swap /*)AQ4IL/
swapon ,a
/ntry into /etc/fstab file.
/*)AQ4IL/ swap swap defaults 1 1
Q: - Te"" me the steps to remove the swap !i"e?
4irstly disable the swap file by RswapoffS co$$and.
(e$ove *wap file entry fro$ /etc/fstab file.
Now re$ove the swap file by Rr$S co$$and.
Q: - What can we do with DpartedA command or ti"it$?
! Kiew the existin& partition table
! Add partitions fro$ free space or additional hard drives
! Bhan&e the si"e of existin& partitions
Q: - How we wi"" chec% !ree space on drive .dev.sda with parted command?
Eparted /dev/sda
print
Q: - =an we resi*e the si*e o! a partition?
6es# we can resi"e the si"e of partition by RpartedS co$$and.
2parted .dev.sda
Linux Interview Questions
print
o resi"e the partition# use the resi"e co$$and followed by the $inor nu$ber for the partition# the startin& place in $e&abytes# and the end place in $e&abytes. 4or exa$ple'
resi"e 0 :1>I >1IG
After resi"in& the partition# use the print co$$and to confir$ that the partition has been resi"ed correctly# is the correct partition type# and is the correct file syste$ type.
Q: - What is -EF?
LKD stands for Lo&ical Kolu$e Dana&er. LKD# is a stora&e $ana&e$ent solution that allows ad$inistrators to divide hard drive space into physical volu$es ;QK@# which can then be
co$bined into lo&ical volu$e &roups ;KU@# which are then divided into lo&ical volu$es ;LK@ on which the filesyste$ and $ount point are created.
Q: - What are the steps to create -EF?
! Breate physical volu$es by RpvcreateS co$$and
Epvcreate /dev/sda>
! Add physical volu$e to volu$e &roup by Rv&createS co$$and
Ev&create KLU1 /dev/sda>
! Breate lo&ical volu$e fro$ volu$e &roup by RlvcreateS co$$and.
Elvcreate !L :U !n LKD: KLU1
Now create file syste$ on /dev/sda> partition by R$5e>fsS co$$and.
E$5e>fs !M /dev/KLU1/LKD:
Q: - What is the di!!erence between -EF and >9I1?
(AI% provides redundancy but LKD doesn7t provide (edundancy.
Q: - What are -EF8 and -EF5?
LKD: and LKD> are the versions of LKD.
LKD> uses device $apper driver contained in >.J 5ernel version.
LKD : was included in the >.I series 5ernels.
Q: - What is Eo"me 'rop 6EC7?
he Kolu$e Uroup is the hi&hest level abstraction used within the LKD. It &athers to&ether a collection of Lo&ical Kolu$es and Qhysical Kolu$es into one ad$inistrative unit.
Q: - What is ph$sica" extent 64;7?
/ach physical volu$e is divided chun5s of data# 5nown as physical extentsN these extents have the sa$e si"e as the lo&ical extents for the volu$e &roup.
Q: - What is "o'ica" extent 6-;7?
/ach lo&ical volu$e is split into chun5s of data# 5nown as lo&ical extents. he extent si"e is the sa$e for all lo&ical volu$es in the volu$e &roup.
Linux Interview Questions
Q: - ;xp"ain -EF snapshot?
LKD snapshots allow the ad$inistrator to create a new bloc5 device which presents an exact copy of a lo&ical volu$e# fro"en at so$e point in ti$e.
Q: - How $o wi"" chec% on Gor server or s$stem device-mapper is insta""ed or not?
Bhec5 the followin& file.
Ecat /proc/$isc
if this file contains Pdevice!$apperP ter$ it $eans device $apper is installed on your syste$.
Q: - How are snapshots in -EF5 di!!erent !rom -EF8?
In LKD> snapshots are read/write by default# whereas in LKD:# snapshots were read only.
Q: - What is the maximm si*e o! a sin'"e -E?
4or >.I based 5ernels# the $axi$u$ LK si"e is >8.
4or 0>!bit BQUs on >.J 5ernels# the $axi$u$ LK si"e is :J8.
4or JI!bit BQUs on >.J 5ernels# the $axi$u$ LK si"e is G/8.
Q: - I! a vo"me 'rop named as EC) a"read$ exists bt i need to extend this vo"me 'rop p to :C0#;xp"ain a"" steps?
4irstly create Qhysical volu$e ;/dev/sdaL@ of si"e IU8.
Now run followin& co$$and.
v&extend KU1 /dev/sdaL
Q: - I! a vo"me 'rop EC) have ( 4E's 6.dev.sdaH/ .dev.sda</ .dev.sdaI7 bt i want to remove .dev.sda< pv !rom this EC)?
v&reduce KU1 /dev/sdaL
Q: - Which command is sed to extend a "o'ica" vo"me?
lvextend !!si"e VOaddsi"e2 /dev/Ov&na$e2/Olvna$e2
resi"e>fs /dev/Ov&na$e2/Olvna$e2
Q: - Te"" me a"" steps to remove a -EF?
o re$ove a lo&ical volu$e fro$ a volu$e &roup# first un$ount it with the u$ount co$$and'
u$ount /dev/Ov&na$e2/Olvna$e2
and then use the lvre$ove co$$and'
lvre$ove /dev/Ov&na$e2/Olvna$e2
Linux Interview Questions
Q: - Which command is sed to create -EF ,napshot?
vcreate !!si"e Osi"e2 !s !n Osnapshotna$e2 Olvna$e2
he lvcreate co$$and is used to create a new lo&ical volu$e# $eanin& there $ust be
free physical extents in the lo&ical volu$e &roup to create a snapshot. he !s option
$eans that the LK is a snapshot# Osnapshotna$e2 is the na$e of the new LK created# and
Olvna$e2 is the na$e of the LK fro$ which to create the snapshot.
Q: - Is there an$ re"ation between modprobe#con! !i"e and networ% devices?
6es# his file assi&ns a 5ernel $odule to each networ5 device.
4or /xa$ple '!
9rootWlocalhost XAE cat /etc/$odprobe.conf
alias eth1 bII
.ere bII is the 5ernel $odule for networ5 device eth1.
)e can Bonfir$ by followin& co$$and ;his $odule RbIIS is present or not@.
9rootWlocalhost XAE ls$od Y&rep bII
bII >H11= 1
Q: - What is the "ocation o! Jnetwor%J !i"e and what does this contains?
location '! /etc/sysconfi&/networ5
his file contains followin& fields
N/)C(?INU<yes
N/)C(?INUZIQKJ<no
.C*NAD/<localhost.localdo$ain
Q: - What is the ro"e o! .etc.reso"v#con! !i"e?
In this file we sets the %N* servers ;usin& their IQ addresses@ and the search do$ain. he values of the %N* servers are often added when the networ5 is activated because the data
can be provided by %.BQ or a si$ilar service.
Q: - Which deamon is re&ired to start Networ% services?
networ5
/etc/init.d/networ5 start
Q: - What JneatJ command wi"" do?
neat co$$and provides Uraphical interface to chan&e networ5 settin&s for networ5 devices.
Linux Interview Questions
Q: - Which protoco" is re&ired to a""ow "oca" printin' and print sharin'?
Internet Qrintin& Qrotocol ;IQQ@ is re+uired to allow local printin& and print sharin&.
Q: - What is =U4,?
BUQ* stands for PBo$$on UNIX Qrintin& *yste$P. BUQ* is a open source printin& syste$ developed by Apple Inc. BUQ* uses the Internet Qrintin& Qrotocol ;IQQ@ to allow local
printin& and print sharin&.
Q: -What is the "ocation o! "o' !i"es !or =U4,?
he lo& files for the BUQ* printin& syste$ are located in the /var/lo&/cups/ directory.
Q: - What is GUF?
6UD stands for 6ellow do& Updater# Dodified because it is based on 6UQ# the 6ellow do& Updater. )here does the na$e 6ellow do& co$e fro$T 6ellow %o& is a version of Linux
for the Qower Architecture hardware and is (QD!based# Must li5e (ed .at /nterprise Linux and 4edora. 6UQ# and later 6UD# were written by the Linux co$$unity as a way to
$aintain an (QD!based syste$.
Q: - What are the advanta'es o! GUF?
! Auto$atic resolution of software dependencies.
! Dultiple software locations at one ti$e.
! Ability to specify particular software versions or architectures.
Q: - How $o wi"" insta"" so!tware b$ GUF?
yu$ install Op5&na$e2
Q: - Which option is re&ired to assme the answer J$esJ to an$ &estions as%ed drin' insta""ation o! pac%a'e dependencies !or GUF?
he P!yP option is used to assu$e the answer PyesP.
4or /xa$ple
yu$ !y install s+uid
Q: - How to remove a so!tware b$ GUF?
yu$ re$ove Op5&na$e2
Q: - How Fan$ >n -eve"s present in -inx?
here are L run levels# with each havin& its own properties.
Linux Interview Questions
! 1' .alt the syste$
! :' *in&le!user $ode
! >' Not used
! 0' Dulti!user $ode with text lo&in
! I' Not used
! =' Dulti!user $ode with &raphical lo&in
! J' (eboot
Q: - Which con!i'ration !i"e is re&ired to chan'e the >n -eve" o! ,erver or s$stem?
/etc/inittab
o chan&e the default run level# $odify this line.
id'='initdefault'
Q: - ;xp"ain architectres re&ired !or >4Fs?
noarch Architecture!independent# can run on any architecture
i0GJ Ueneric build for a 0>!bit xGJ syste$
i=GJ *o$eti$es used when buildin& 5ernels for older xGJ processors
Intel[ Qentiu$ [ II# Intel Qentiu$ III# Intel Qentiu$ I# AD% Athlon# and
iJGJ AD% %uron syste$s ;Dost (QDs for these architectures are built usin& the i0GJ architecture# with the 5ernel for these architectures bein& built with the
iJGJ for opti$al perfor$ance.@
xGJZJI JI!bit processors such as AD% AthlonJI# AD% Cpteron# and Intel /DJI
iaJI Intel[ Itaniu$
ppc 0>!bit I8D[ QC)/(# I8D e*erver\ p*eries[# and I8D e*erver i*eries
s0H1x JI!bit I8D e*erver *yste$ "
Q: - How to insta"" -inx so!tware@s b$ >4F?
rp$ !ivh test!:.1!:.i0GJ.rp$
test EEEEEEEEEEEEEEEEEEEEEEEEE 9:11]A
Q: - I! a !i"e associated with test-8#)-8#i(IH#rpm de"eted/ than How we wi"" recover that !i"e?
)e can reinstall this rp$ a&ain.
Q: - I! $o are 'ettin' error Jpac%a'e is a"read$ insta""edJ bt $o have to insta"" pac%a'e an$ how# what option $o wi"" se?
rp$ !ivh test!:.1!:.i0GJ.rp$
Qreparin&... EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 9:11]A pac5a&e test!:.1!: is already installed
In this case you can use P!!replacep5&sP option.
rp$ !ivh ,replacep5&s test!:.1!:.i0GJ.rp$
Linux Interview Questions
Q: - Which options are re&ired to p'rade a >4F?
Up&radin& a pac5a&e is si$ilar to installin& one. ype the followin& co$$and at a shell pro$pt'
rp$ !Uvh test!>.1!:.i0GJ.rp$
Q: - In which director$ >4F database stored?
/var/lib/rp$
Q: - ;xp"ain the command Jrpm -&aJ?
It will +ueries all currently installed pac5a&es.
Q: - ;xp"ain the command Jrpm -&! J?
it +ueries the (QD database for which pac5a&e owns Ofilena$e2. )hen specifyin& a file# specify the absolute path of the file.
Q: - How to veri!$ a"" insta""ed pac%a'es?
rp$ ,Ka
Q: - How to veri!$ the si'natre o! an rpm?
rp$ !? test!:.1!:.i0GJ.rp$
Q: - How to "ist 4=I 1evices on $or server or ,$stem?
use PlspciP co$$and.
Q: - What is the ro"e o! JKd*J?
?ud"u is used to %etect new .ardware
Q: - What happens when $o add a new device a!ter insta""ation?
he ?ud"u pro&ra$ runs each ti$e the syste$ boots and perfor$s a hardware probe. If new hardware is found# ?ud"u atte$pts to $ap it to a 5ernel $odule. If successful# the
infor$ation is saved# and the device is confi&ured.
Q: - How to ;nab"e 9=-s !or .home partition?
Add followin& entry in /etc/fstab
LA8/L</ho$e /ho$e ext0 acl : >
Now re$ount /ho$e partition with acl option.
Linux Interview Questions
$ount !t ext0 !o acl /dev/sda0 /ho$e
Q: - How to Eiew 9=-s !or a !i"e6testL!i"e7?
&etfacl testZfile
Q: - How to remove an 9=-?
setfacl !!re$ove!all Ofile!na$e2
Q: - What is the di!!erence between pop( and imap protoco"s ?
4M4( ;Qost Cffice Qrotocol@ is the $ost co$$only used internet $ail protocol.It wor5s on ::1 port. It is easy to confi&ure and use. )ith a QCQ account you download the $ail to
your local co$puter and 5eep it there. Dost of the ti$e it &ets deleted off of the $ail server after bein& downloaded. Cne disadvanta&e of QCQ is that once you download it to your
co$puter you won't be able to chec5 your $ail fro$ a different co$puter since it will already be downloaded onto your own co$puter. It tends to be slower than IDAQ as well.
IF94 ;Internet Dessa&e Access Qrotocol@ uses a $ethod where all the $ailboxes and $essa&es are $aintained on the server. herefore you can access your e!$ail fro$ any location
with an internet connection. IDAQ is faster than QCQ because the $ail client reads all of the $essa&e headers without havin& to download the entire $essa&e. IDAQ is also supported
in a variety of clients Must li5e QCQ. Cne thin& to 5eep in $ind is the a$ount of dis5 space allocated to your $ail on the server $ay not be enou&h to hold all of your $ail.IDAQ
supports the folder synchroni"ation option e.& if you create any folder on the client $/c in outloo5;$ail client@ then that folder will auto$atically created on the $ailserver for the
account
QCQ wor5s best when you are usin& only a sin&le co$puter# since you don7t have to worry about chec5in& your e!$ail fro$ $ultiple locations. Qlus it is faster as well.
IDAQ would suit you better if you need to chec5 your e!$ail fro$ $ultiple locations if you travel a lot. o use IDAQ your I*Q/$ail provider $ust offer that type of account.
Q: - How to 1isab"e a User 9ccont in -inx ?
E passwd Ouserna$e2 !l
his $i&ht be useful in the situation where you don7t want to per$anently re$ove the user# but you Must want it disabled and no lon&er able to use the syste$. he user will still
receive e$ails for exa$ple# but he will not be able to lo&in and chec5 the$ out.
o re!enable the account #Must use below co$$and
E passwd Ouserna$e2 !u
Q: - How to detect =4U architectre.bitmode 6(5-bit or H:-bit7 !or -inx ?
2 cat /proc/cpuinfo Y &rep fla&s
you will find one of the$ with na$e Pt$;transparent $ode@P or
Pr$;real $ode@P or Pl$;lon& $ode@P
:. r$ tells #it is a :J bit processor
>. t$ tells# it is a 0> bit processor
0. l$ tells# it is a JI bit processor
Q: - What is the di!!erence between ,,H and Te"net ?
Linux Interview Questions
he Qri$ary difference between **. and elnet is of security i.e in ssh data transfer between the syste$s is in encrypted for$ so it is difficult for the hac5ers to understand what is
&oin& on networ5.
In elnet data transfer between the syste$s is in plain text.
**. uses a public 5ey for authentication while elnet does not use any authentication.
%ue to the security $easures that were necessary for **. to be used in public networ5s# each pac5et contains less data to $a5e roo$ for the data of the security $echanis$s. In order
to trans$it the sa$e a$ount of data# you would need to ta5e!up a lot $ore bandwidth. his is called overhead..
**. adds a bit $ore overhead to the bandwidth co$pared to elnet.
Q: - What is di!!erence between 9T and =>MN?
Bron co$$and is used to schedule the tas5 daily at the sa$e ti$e repeatedly #
at co$$and is used to schedule the tas5 only once i.e to run only one ti$e.
Q: - What is networ% bondin' in -inx and steps to con!i're networ% bondin' ?
Networ5 interface card ;NIB@ bondin& ;also referred to as NIB tea$in&@ is the bondin& to&ether of two or $ore physical NIBs so that they appear as one lo&ical device. his allows
for i$prove$ent in networ5 perfor$ance by increasin& the lin5 speed beyond the li$its of one sin&le NIB and increasin& the redundancy for hi&her availability. 4or exa$ple# you can
use two :!&i&abit NIBs bonded to&ether to establish a >!&i&abit connection to a central file server.
)hen bonded to&ether# two or $ore physical NIBs can be assi&ned one IQ address. And they will represent the sa$e DAB address. If one of the NIBs fails# the IQ address re$ains
accessible because it is bound to the local NIB rather than to a sin&le physical NIB.
*teps to confi&ure '
,tep 28: =reate a bond) con!i'ration !i"e
>ed Hat -inx stores networ% con!i'ration in .etc.s$scon!i'.networ%-scripts. director$# +irst/ $o need to create bond) con!i' !i"e:
E vi /etc/sysconfi&/networ5!scripts/ifcf&!bond1
Append followin& lines to it'
%/KIB/<bond1
IQA%%(<:H>.:JG.:.>1
N/)C(?<:H>.:JG.:.1
N/DA*?<>==.>==.>==.1
U*/(BL<no
8CCQ(CC<none
CN8CC<yes
(eplace above IQ address with your actual IQ address. *ave file and exit to shell pro$pt.
,tep 25: Fodi!$ eth) and eth8 con!i' !i"es:
Cpen both confi&uration usin& vi text editor and $a5e sure file read as follows for eth1 interface
E vi /etc/sysconfi&/networ5!scripts/ifcf&!eth1
Dodify/append directive as follows'
%/KIB/<eth1
U*/(BL<no
CN8CC<yes
DA*/(<bond1
*LAK/<yes
8CCQ(CC<none
Cpen eth: confi&uration file usin& vi text editor'
Linux Interview Questions
E vi /etc/sysconfi&/networ5!scripts/ifcf&!eth:Da5e sure file read as follows for eth: interface'
%/KIB/<eth:
U*/(BL<no
CN8CC<yes
DA*/(<bond1
*LAK/<yes
8CCQ(CC<none
*ave file and exit to shell pro$pt.
,tep 2 (: -oad bond driver.mod"e
Da5e sure bondin& $odule is loaded when the channel!bondin& interface ;bond1@ is brou&ht up. 6ou need to $odify 5ernel $odules confi&uration file'
E vi /etc/$odprobe.conf
Append followin& two lines'
alias bond1 bondin&
options bond1 $ode<balance!alb $ii$on<:11
,tep 2 :: Test con!i'ration
4irst# load the bondin& $odule'
E $odprobe bondin&
(estart networ5in& service in order to brin& up bond1 interface'
E service networ5 restart
Kerify everythin& is wor5in&'
E less /proc/net/bondin&/bond1Cutput'
8ondin& Dode' load balancin& ;round!robin@
DII *tatus' up
DII Qollin& Interval ;$s@' 1
Up %elay ;$s@' 1
%own %elay ;$s@' 1
*lave Interface' eth1
DII *tatus' up
Lin5 4ailure Bount' 1
Qer$anent .) addr' 11'1c'>H'cJ'be'=H
*lave Interface' eth:
DII *tatus' up
Lin5 4ailure Bount' 1
Qer$anent .) addr' 11'1c'>H'cJ'be'J(
N+, Q N 9
Q: - ;xp"ain this entr$ .shared 8O5#8HI#8#).5??#5??#5??#)6s$nc/rw7
allows all syste$s with :H>.:JG.:.F IQ addresses read!write access to the /shared/ directory'
Linux Interview Questions
Q: - What wi"" happened i! a space is 'iven inbetween a""owedLhosts and 6options7
If a space is included# the options are applied to any and all IQ addresses# which can be +uite dan&erous if write per$ission is &ranted.
Q: - What is the ro"e o! Js$ncJ option !or N+, server
If sync is specified# the server waits until the re+uest is written to dis5 before respondin& to the client. he sync option is reco$$ended because it follows the N4* protocol.
Q: - How to retrieve a "ist o! c"ients connected to the N+, server ?
o retrieve a list of clients connected to the N4* server# use the show$ount co$$and
fro$ a shell pro$pt. o also show the directories the clients are connected to# use the
show$ount !a co$$and.
Q: - Name o! =on!i'ration !i"e !or N+, ,erver ?
/etc/exports
Q: - What is meanin' o! JnoLrootLs&ashJ option ?
reat re$ote root user as local root. %o not $ap re+uests fro$ root to the anony!
$ous user and &roup I%.
Q: - What is N+, ?
N4* stands for Networ5 4ile *yste$. N4* was ori&inally developed by *un Dicrosyste$s in the :HG1's. N4* allows re$ote hosts to $ount file syste$s over a networ5 and interact
with those file syste$s as thou&h they are $ounted locally. his enables syste$ ad$inistrators to consolidate resources onto centrali"ed servers on the networ5.
Q: - Which N+, versions are avai"ab"e ?
N4* Kersion >
N4* Kersion 0
N4* Kersion I
Q: - What is di!!erent between N+, Eersion 5 N ( ?
nfs > default G5b transfer rate#it did not chec5 the authentication at the ti$e connection.client wants to access unauthori"ed file it shows error $essa&es li5e Pwrite errorP#Pread errorP
nfs 0 0>5b transfer rate. It chec5 at the ti$e connection! ABL *upport
Q: - =an we 'rant access b$ Username and password !or n!s share?
No# access is &ranted only for IQ address.
Q: - What is the ro"e o! Ja""Ls&ashJ option?
Linux Interview Questions
reat all client users as anony$ous users. Dap all user and &roup I%s to the anony$ous user and &roup I%.
Q: - What is the ro"e o! JrootLs&ashJ option?
All re+uests fro$ the user root are translated or $apped as if they ca$e fro$ the user anony$ous ;default@.
Q: - ;xp"ain option Ja""Ls&ashJ?
he UI% and UI% of exported files are $apped to the user anony$ous. It is &ood for public directories.
Q: - ;xp"ain Jexport!sJ command?
he exportfs co$$and is used to $aintain the current table of exported file syste$s for N4*.
Q: - ;xp"ain command J.sr.sbin.export!s -!J?
It will flush everythin& out of the 5ernels export table. Any clients that are active will &et new entries added by $ountd when they $a5e their next re+uest.
Q: - Which option is sed with export!s command to disp"a$ the crrent export "ist/ a"so disp"a$s the "ist o! export options?
exportfs !v
Q: - Which option is sed with export!s command to re-export a"" directories?
exportfs !r
Q: - How $o wi"" export director$ 6.data7 to host 8O5#8HI#8#?8/ a""owin' as$nchronos writes withot addin' the entr$ in .etc.exports !i"e?
E exportfs !o async :H>.:JG.:.=:'/data
Q: - Is rpc#montd daemon spports T=4LW>944;>,?
6es# he rpc.$ountd dae$on is protected by the tcpZwrappers. 6ou have to &ive the clients access to rpc.$ountd if they should be allowed to use N4* *erver.
Q: - ;xp"ain Jn!sstatJ command?
he nfsstat co$$and displays the statistics about N4* client and N4* server activity.
Q: - What do $o nderstand b$ Jn!sstat -o a"" -5(:J command?
It will *how all infor$ation about all versions of N4*.
Q: - What do $o nderstand b$ Jn!sstat --n!s --server -(J command?
It will show statistics for N4* version 0 server.
Q: - =an N+, share monted on Window X4 and Psti!$ $or answer?
No# )indow XQ operatin& syste$ doesn7t support nfs protocol.
Q: - 8O5#8HI#8#?8:.data is exported b$ N+, ,erver and i want to add this N+, share to c"ient .etc.!stab !i"e# How $o wi"" add this entr$ in .etc.!stab !i"e?
E device $ount!point fs!type options du$p fsc5order
:H>.:JG.:.=:'/data /$nt nfs rw 1 1
Linux Interview Questions
Q: - ;xp"ain J,o!t Fontin'J option at N+, ="ient?
if a file re+uest fails# the N4* client will report an error to the process on the client $achine re+uestin& the file access. if it cannot be satisfied ;for exa$ple# the server is down@# then it
+uits. his is called soft $ountin&.
Q: - ;xp"ain JHard Fontin'J option at N+, ="ient?
If a file re+uest fails# the N4* client will report an error to the process on the client $achine re+uestin& the file access. if it cannot be satisfied# then it will not +uit until the re+uest is
satisfied. his is called .ard $ountin&.
Q: - What is JportmapJ?
he port$apper 5eeps a list of what services are runnin& on what ports. his list is used by a connectin& $achine to see what ports it wants to tal5 to access certain services.
Q: - How $o wi"" chec% JportmapJ service is rnnin' or not?
rpcinfo !p
Q: - I am nab"e to mont a N+, share# How wi"" $o trace ot the reason?
4irstly# chec5 that you have per$issions to $ount nfs share or not. Bhec5 /etc/exports file.
*econdly you can &et (QB error' Qro&ra$ Not (e&istered ;or another P(QBP error@
4or this chec5 your N4* server and port$ap service runnin& or not by Prpcinfo !pP
Q: - =an I modi!$ export permissions withot needin' to remont c"ients in order to have them ta%e e!!ect?
6es. he safest thin& to do is edit /etc/exports and run Pexportfs !rP.
+T4 ,;>E;> Q N 9
Q: - How to den$ speci!ic sers access to the +T4 server ?
o deny specific users access to the 4Q server# add their userna$es to the /etc/vsftpd/
ftpusers file. 8y default# syste$ users such as root and nobody are included in this list.
Q: - =an we create "o's !or !tp athenticated sessions ?
6es# If the xferlo&Zenable directive in vsftpd.conf is set to 6/*# file transfers usin& the 4Q protocol are lo&&ed to /var/lo&/xferlo&. Infor$ation such as a ti$e sta$p# IQ address of the
client# the file bein& transferred# and the userna$e of the person who authenticated the connection is included in the lo& entry.
Q: - What is meanin' o! maxLc"ients parameter ?
Daxi$u$ nu$ber of clients that can connect at one ti$e.
If set to 1# the nu$ber of clients is unli$ited.
Q: - Mn which port E,+T4 server wor%s ?
4Q uses two ports# >1 and >:. 8y default# the 4Q server listens for re+uests on port >:.
Linux Interview Questions
After a connection is established# the client sends co$$ands to the server on port >:.
.owever# port >1 is used when the server sends data bac5 to the client.
Q: - How to restart E,+T4 server ?
service vsftpd restart
Q: - How to a""ow 9non$mos +T4 ?
Anony$ous 4Q is enabled by default by settin& the anony$ousZenable directive in
/etc/vsftpd/vsftpd.conf to 6/*.
Q: - What is +T4 ?
4Q stands for 4ile ransfer Qrotocol. An 4Q server allows clients to connect to it either
anony$ously or with a userna$e and password co$bination. After successful authentication# files can be transferred bac5 and forth between the server and client. he files are neither
encrypted nor co$pressed.
Q: - +or >edhat -inx or +edora which pac%a'e is re&ired !or +T4 service ?
(ed .at /nterprise Linux = or 4/%C(A includes the vsftpd 4Q service.
vsftpd!>.1.=!:>.el= ;4or (edhat@
Q: - Important =on!i'ration !i"e !or vs!tp server ?
he 4Q server uses the /etc/vsftpd/vsftpd.conf confi&uration file. Usin& this file# you
can set options for displayin& a custo$ banner $essa&e after users lo& in# settin& the
default file per$issions for uploaded files# and settin& the port on which to listen for
inco$in& connections.
Q: - What is +T4 ?
4Q client connects to the 4Q server by establishin& an 4Q control connection to port >: of the server. 6our co$$ands such as 'ls' and '&et' are sent over this connection. )henever
the client re+uests data over the control connection# the server initiates data transfer connections bac5 to the client. he source port of these data transfer connections is always port >1
on the server# and the destination port is a hi&h port ;&reater than :1>I@ on the client..
Q: - What is 4assive mode?
Qassive $ode# li5e active $ode# is initiated by the 4Q client application. )hen re+uestin& data fro$ the server# the 4Q client indicates it wants to access the data in passive $ode
and the server provides the IQ address and a rando$# unprivile&ed port ;&reater than :1>I@ on the server. he client then connects to that port on the server to download the re+uested
infor$ation.
Linux Interview Questions
Q: - ;xp"ain directive JsessionLspportA?
)hen enabled# vsftpd atte$pts to $aintain lo&in sessions for each user throu&h Qlu&&able Authentication Dodules ;QAD@.
Q: - Is there an$ wa$ to monitor c"ients connected to vs!tpd?
6es. )e actually have two sli&htly different $ethods to $onitor vsftpd clients. 4irst# $a5e sure you have enabled the confi& option# PsetproctitleZenable<6/*P li5e in our exa$ple
above and restart your vsftpd server. hen run the co$$and Pwatch ps !Bvsftpd !o user# pid# sti$e# c$dP to watch the processes includin& ip# userna$e and actions li5e idle or data
retrieval.
Q: - I want to cop$ m"tip"e !i"es with ot promptin' !or an$ in!o/ how can I do that one?
ftp !i ftpserver
Q: - -oca" sers cannot "o' in# How to reso"ve this isse?
Bhec5 PlocalZenable<6/*P in your /etc/vsftpd/vsftpd. conf to allow local users to lo& in.
Q: - How to chan'e vs!tpd de!a"t port?
*et PlistenZportP option in Pvsftpd.confP
Q: - How to restrict some I4's not se m$ +T4 server?
Use BQZ)(AQQ/(*
Q: - 1oes vs!tpd spport I4vH?
6es
1N, N 0IN1 Q N 9
Q: - which are the important con!i'ration !i"es !or 1N, server ?
8IN% uses /etc/na$ed.conf as its $ain confi&uration file# the /etc/rndc.conf file as the
confi&uration file for na$e server control utility rndc# and the /var/na$ed/ directory for "one files and the li5e.
Q: - What is 0IN1 ?
8IN% stands for 8er5eley Internet Na$e %o$ain which is the $ost co$$only used %o$ain Na$e *yste$ ;%N*@ server on the Internet.
Q: - Mn which version o! bind have wor%ed ?
8IN% H
Linux Interview Questions
Q: - What is the ro"e o! 1N, ?
A %N* server# or na$e server# is used to resolve an IQ address to a hostna$e or vice versa.
Q: - Mn which port 1N, server wor%s ?
%N* servers use port =0 by default. Inco$in& and out&oin& pac5ets should be allowed on
port =0. Also allow connections on port H>: if you confi&ure a li&htwei&ht resolver server.
he %N* control utility# rndc# connects to the %N* server with BQ port H=0 by default. If
you are runnin& rndc on the na$e server# connections on this BQ port fro$ localhost
should be allowed. If you are runnin& rndc on additional syste$s# allow connections to
port H=0 ;or whatever port you have chosen to confi&ure@ fro$ these additional syste$s.
Q: - What is rond robin 1N,?
(ound robin %N* is usually used for balancin& the load of &eo&raphically distributed )eb servers. 4or exa$ple# a co$pany has one do$ain na$e and three identical ho$e pa&es
residin& on three servers with three different IQ addresses. )hen one user accesses the ho$e pa&e it will be sent to the first IQ address. he second user who accesses the ho$e pa&e
will be sent to the next IQ address# and the third user will be sent to the third IQ address. In each case# once the IQ address is &iven out# it &oes to the end of the list. he fourth user#
therefore# will be sent to the first IQ address# and so forth.
Q: - What is Name ,erver?
A na$e server 5eeps infor$ation for the translation of do$ain na$es to IQ addresses and IQ addresses to do$ain na$es. he na$e server is a pro&ra$ that perfor$s the translation at
the re+uest of a resolver or another na$e server.
Q: - What is 4rimar$ name server or primar$ master server?
Qri$ary na$e server/pri$ary $aster is the $ain data source for the "one. It is the authoritative server for the "one. his server ac+uires data about its "one fro$ databases saved on a
local dis5. he pri$ary server $ust be published as an authoritative na$e server for the do$ain in the *CA resource record# while the pri$ary $aster server does not need to be
published.
Q: - What is ,econdar$ name server.s"ave name server?
*econdary na$e server/slave na$e server ac+uires data about the "one by copyin& the data fro$ the pri$ary na$e server ;respectively fro$ the $aster server@ at re&ular ti$e
intervals. It $a5es no sense to edit these databases on the secondary na$e servers# althou&h they are saved on the local server dis5 because they will be rewritten durin& further
copyin&.
Q: - what is >oot name server?
(oot na$e server is an authoritative na$e server for the root do$ain ;for the dot@. /ach root na$e server is a pri$ary server# which differentiates it fro$ other na$e servers.
Q: - what is ,tea"th name server?
Linux Interview Questions
*tealth na$e server is a secret server. his type of na$e server is not published anywhere. It is only 5nown to the servers that have its IQ address statically listed in their confi&uration.
It is an authoritative server. It ac+uires the data for the "one with the help of a "one transfer. It can be the $ain server for the "one. *tealth servers can be used as a local bac5up if the
local servers are unavailable.
Q: - What do $o mean b$ J>esorce >ecordsJ?
Infor$ation on do$ain na$es and their IQ addresses# as well as all the other infor$ation distributed via %N* is stored in the $e$ory of na$e servers as (esource (ecords ;((@.
Q: - ;xp"ain JTT-J?
i$e to live. A 0>!bit nu$ber indicatin& the ti$e the particular (( can be 5ept valid in a server cache. )hen this ti$e expires# the record has to be considered invalid. he value 1
5eeps nonauthoritative servers fro$ savin& the (( to their cache $e$ory.
Q: - Te"" me ? T$pes o! 1N, records?
A# N*# BNAD/# *CA# Q(# DX.
Q:- exp"ain J,M9 >ecordJ?
he *tart of Authority ;*CA@ record deter$ines the na$e server that is an authoritative source of infor$ation for the particular do$ain. here is always only one *CA record in the
file# and it is placed at the be&innin& of the file of authoritative resource records.
Q: - what is J9 >ecordJ
A ;Address@ records assi&n IQ addresses to do$ain na$es of co$puters. he IQ address cannot have a dot at the end.
Q: - ;xp"ain J=N9F; >ecordJ?
*ynony$s to do$ain na$es can be created usin& BNAD/ records. his is often referred to as 'creatin& aliases for co$puter na$es'.
Q: - What are JHIN+M and TXT >ecordsJ?
.IN4C and X records are for infor$ation only. An .IN4C record has two ite$s in its data part. he first ite$ is infor$ation about hardware# and the second one is infor$ation
about software. A X record contains a &eneral data strin& in its data part.
/xa$ple '
test.co$ IN *CA ...
...
$ail IN A :H>.:.:.>
IN .IN4C DyZ*erver UNIX
IN X $y server
Q: - what are JFX >ecordsJ?
Linux Interview Questions
DX records specify the $ailin& server of the do$ain. An DX record shows to which co$puter a $ail of a particular do$ain should be sent. he DX record also includes a priority
nu$ber# which can be used to deter$ine several co$puters where the $ail for the do$ain can be sent. he first atte$pt is to deliver the $ail to the co$puter with the hi&hest priority
;lowest value@. If this atte$pt fails# the $ail &oes to the next co$puter ;with a hi&her priority value@# and so on.
test.co$ IN *CA ...
...
$ail IN A :H>.:.:.>
IN .IN4C Alpha*erver UNIX
IN X $y server
IN DX 01 $ail>.nextstepIit.co$
IN DX >1 $ail0.nextstepIit.co$
IN DX :1 $ail>.nextstepIit.co$
Q: - ;xp"ain J4T> >ecordsJ?
A Qointer (ecord ;Q(@ is used to translate an IQ address into a do$ain na$e.
Q: - What is 1$namic 1N,?
%yna$ic %N* a $ethod of 5eepin& a do$ain na$e lin5ed to a chan&in& IQ address as not all co$puters use static IQ addresses. ypically# when a user connects to the Internet# the
user's I*Q assi&ns an unused IQ address fro$ a pool of IQ addresses# and this address is used only for the duration of that specific connection. his $ethod of dyna$ically assi&nin&
addresses extends the usable pool of available IQ addresses. A dyna$ic %N* service provider uses a special pro&ra$ that runs on the user's co$puter# contactin& the %N* service each
ti$e the IQ address provided by the I*Q chan&es and subse+uently updatin& the %N* database to reflect the chan&e in IQ address.
Q: - What is the ro"e o! Jnamed-chec%con! Uti"it$J?
he na$ed!chec5conf utility chec5s the syntax of the na$ed.conf confi&uration file.
*yntax' na$ed!chec5conf 9!t directoryA 9filena$eA
Q: - what is the ro"e o! Jnamed-chec%*one Uti"it$J?
he na$ed!chec5"one utility chec5s the syntax and consistency of the "one file.
*yntax' na$ed!chec5"one 9!d&vA 9!c classA "one 9filena$eA
,9F09 ,;>E;> Q N 9
Q: - Which ,;-inx secrit$ context sed !or ,9F09 ?
sa$baZshareZt
Linux Interview Questions
Q: - Mn which ports ,9F09 server wor%s ?
! U%Q port :0L for netbios!ns# the N/8IC* Na$e *ervice
! U%Q port :0G for netbios!d&$# the N/8IC* %ata&ra$ *ervice
! BQ port :0H for netbios!ssn# the N/8IC* session service
! BQ port II= for $icrosoft!ds# the Dicrosoft %o$ain *ervice
Q: - What are the ,ecrit$ or 9thentication Fode !or ,9F09 server?
A%*
%CDAIN
*/(K/(
U*/(
*.A(/
Q: - How to Fana""$ =reate Fachine Trst 9cconts ?
/usr/sbin/useradd !& $achines !d /var/lib/nobody !c P$achine nic5na$eP !s /bin/false $achineZna$e-
passwd !l $achineZna$e-
Q: - What are the ,9F09 server T$pes ?
! Qri$ary %o$ain Bontroller ;Q%B@
! 8ac5up %o$ain Bontroller ;8%B@
! A%* %o$ain Bontroller
Q: - Which protoco" ,9F09 server ses ?
*D8# which stands for *erver Dessa&e 8loc5# is a protocol for sharin& files# printers# serial ports# and co$$unications abstractions such as na$ed pipes and $ail slots between
co$puters.
Q: - How 1oes a Wor%station !ind its 1omain =ontro""er?
here are two different $echanis$s to locate a do$ain controller' one
$ethod is used when Net8IC* over BQ/IQ is enabled and the other when
it has been disabled in the BQ/IQ networ5 confi&uration. )here Net8IC* over BQ/IQ is disabled# all na$e resolution involves the use of %N*# broadcast $essa&in& over U%Q# as
well as Active %irectory co$$unication technolo&ies.
Q: - =an ,amba 0e a 0ac%p 1omain =ontro""er to an NT: 41=?
No. he native NI *AD replication protocols have not yet been fully i$ple$ented.
Q: - How 1o I >ep"icate the smbpasswd +i"e?
(eplication of the s$bpasswd file is sensitive. It has to be done whenever
chan&es to the *AD are $ade. /very user's password chan&e is done in
the s$bpasswd file and has to be replicated to the 8%B. *o replicatin& the
s$bpasswd file very often is necessary.As the s$bpasswd file contains plaintext password e+uivalents# it $ust not be sent unencrypted over the wire. he best way to set up
Linux Interview Questions
s$bpasswd replication fro$ the Q%B to the 8%B is to use the utility rsync. rsync can use ssh as a transport. ssh itself can be set up to accept only rsync transfer without re+uirin& the
user to type a password.As said a few ti$es before# use of this $ethod is bro5en and awed. Dachine trust accounts will &o out of sync# resultin& in a bro5en do$ain. his $ethod is
not reco$$ended. ry usin& L%AQ instead.
Q: - =an ,amba !""$ rep"ace m$ Windows NT server that is not a 4rimar$ 1omain =ontro""er 641=7?
*a$ba can co$pletely serve files and printers to )indows# Must as a )indows N server would.
Q5 =an ,amba rep"aces m$ Windows NT 41=?
Not co$pletely. *a$ba do$ain control capabilities for a )indows Hx client are
solid and co$plete# and so these clients would probably never 5now the difference. he do$ain control support for )indows N/>111 clients is still bein& developed. Burrently#
enou&h has been i$ple$ented to allow a )indows N client to Moin a *a$ba!controlled do$ain# but there is $ore to do$ain control than that. he $ost conspicuous absence is the
lac5 of support for )indows N trust relationships and the *AD replication protocol used between N Q%Bs and 8ac5up %o$ain Bontrollers ;8%Bs@.
Q( What T=4 and U14 ports re&ired !or Net0IM, over T=4.I4 se?
he N8 na$e service uses port :0L/udp# the N8 session service uses port
:0H/tcp# and the N8 data&ra$ service uses port :0G/udp.
Q: - How ,F0 protoco" wor%s?
here will be three sta&es in creatin& an *D8 connection between a client and a specific share on a server.
he first sta&e in connectin& to an *D8 share is to ne&otiate the *D8 protocol dialect to use. In the re+uest pac5et# the client sends a text listin& of all the *D8 dialects that it
understands. he server selects the $ost advanced protocol that it 5nows and responds to the client# specifyin& the protocol nu$ber fro$ the list. At this point# the client and server
have a&reed that *D8 co$$ands can be used for the re$ainder of the conversation.
he second sta&e is to create a session connection between the client and server. o do this# the client issues a session setup re+uest# which includes a serna$e and so$e proof of
validity# such as a password. he server atte$pts to validate re+uestin& user. If successful# the server then returns a session UI% to client. his UI% is uni+ue for each session and has
no relation to the server internal representation of users.
he third sta&e before access to files on a re$ote share is allowed is for the client to $a5e a successful tree connection to the shared resource. he client sends to the server a tree
connect re+uest# which includes the UI% previously issued by the server. At this sta&e the server verifies that the authenticated user is authori"ed to access the re+uested resource. If
the user has sufficient privile&es to access the share# the client is issued a tree connection I% ;I%@. he I% is used in all re+uests to access files contained in the resource to which
the I% refers.
In this way *D8 protocol wor5s.
Q: - How man sections samba con!i'ration !i"e 6smb#con!7 contains?
s$b.conf file contains three sections.
:. 9&lobalA Bontains settin&s that deter$ine *a$ba overall behavior.
>. 9ho$esA A default share for providin& a ho$e directory for all users.
0. 9printersA A default share for exportin& all printers on the host via BI4*.
Q: - I! a netbios name is not de!ined in smb#con!/ than what wi"" be netbios name?
If a netbios na$e is not defined# *a$ba will use the IQ hostna$e of the server by default.
Q: - I want to se User "eve" secrit$ !or m$ samba server than what i have to add in smb#con! !i"e?
security < user
Q: - How $o wi"" veri!$ that $or smb#con! !i"e doesn@t have an$ mista%es and misspe""in's?
Linux Interview Questions
Ptestpar$ P tool that verifies the syntax of a confi&uration file;s$b.conf@.
testpar$ !s s$b.conf
Q: - What is the se o! Jsmbc"ientJ command?
Ps$bclientP is used to display the list of shares on your server. his verifies that s$bd is runnin& and functionin& correctly. he !L option instructs s$bclient to enu$erate the shares
on the server rather than actually connectin& to one. he !N switch instructs s$bclient to use an anony$ous lo&in rather than the lo&in na$e of the current user.

s$bclient !L localhost !N
Antother use of Ps$bclientP co$$and to connect the sa$ba share.
s$bclient //Oserver2/Oshare2 !U Ouserna$e2
Q: - ;xp"ain JsmbstatsJ command?
he s$bstatus utility displays infor$ation about connected users and currently loc5ed files.
Q: - Is it possib"e !or ,amba to share !i"e s$stems that have been monted sin' N+,?
6es. .owever# this can be proble$atic if the N4* server that provides the file syste$ fails# causin& the *a$ba server to han&. It is always safer to use *a$ba to share a local file
syste$.
Q: - How man$ sim"taneos connections can a ,amba server spport?
In theory# there is no li$it. In practice# the li$it is deter$ined by the server7s hardware# specifically the total a$ount of available (AD and the BQU power. It $i&ht also depend on
the a$ount of activity fro$ the s$bd processes.
Q: - =an ,amba be a member o! more than one wor%'rop at the same time?
No# *a$ba can be a $e$ber of only one wor5&roup.
Q: - What is ,W9T?
*)A is UUI 8ased ad$inistration tool for sa$ba server.
Q: - I am tr$in' to se ,W9T/ bt I %eep 'ettin' the messa'e There was no response# The server co"d be down or not respondin'# What is the prob"em?
he $ost li5ely cause is that *)A is not listenin& to connections# or you have used the wron& U(L in tryin& to connect to *)A. *)A usually lives behind port H1:# so the U(L
you should use is http'//I%ZA%%(/**ZC4Z*/(K/('H1:/
Q: - =an i set empt$ password !or samba ser?
yes# If you want to set the value to an e$pty password# you $ust chan&e
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
to
NCQA**)C(%XXXXXXXXXXXXXXXXXXXXX'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
in your s$bpasswd file.
Note' ! if you have edited the s$bpasswd file by hand# $a5e sure that the LAN Dana&er and N password fields contain exactly 0> characters# no $ore and no fewer. If these fields
do not have exactly 0> characters# *a$ba will not be able to correctly read the entry.
or 6ou can $odify by Ps$bpasswdP co$$and.
s$bpasswd !n U*/(ZNAD/
Linux Interview Questions
Also you have to set the null passwords para$eter to yes in the 9&lobalA section of s$b.conf'
null passwords < yes
Q: - 1oes ,amba spport 49F?
6es
Q: - What is ro"e o! JNT-FJ?
he challen&e/response authentication protocol available to )indows clients and servers for validatin& connection re+uests.
Q: - ;xp"ain J!orce 'ropJ parameter sed in smb#con!?
It will define the &roup id to be used for all file access in the place of the user7s pri$ary &roup.
Q: - ;xp"ain J!orce serJ parameter sed in smb#con!?
It will define the user id to be used for all file access.
Q: - ;xp"ain Jwrite "istJ parameter sed in smb#con!?
A list of users and/or &roups that should be &iven write access even if the read only para$eter has been enabled.
Q: - F$ c"ients are 'ettin' the error messa'e that the 1is% is +"" when tr$in' to print to m$ ,amba server/ bt there is p"ent$ o! space# What is the prob"em?
If s$bd is unable to write the spooled file to the directory defined by the path para$eter for a printer if the write per$ission were denied# for exa$ple it would respond to the client
with the $essa&e# %is5 is 4ull. *a$ba will also return this error $essa&e if the a$ount of free dis5 space in the spool directory has fallen below the value specified by the $in print
space para$eter.
Q: - When I c"ic% on m$ ,amba server in the networ% nei'hborhood/ I am contina""$ prompted !or a password to the I4=Q share no matter what I enter#
he )indows client is atte$ptin& to use encrypted passwords. .owever# the *a$ba server is confi&ured to support only clear!text passwords. 6ou should either enable encrypted
passwords on the server or enable clear!text passwords on the )indows client.
Q: - Wh$ is secrit$ R domain better than secrit$ R server?
here are three reasons why security < do$ain is better. he first is because this $ethod enables the *a$ba server to participate in do$ain trust relationships. his is i$possible with
server!level security. he second reason is that# under server!level security# each s$bd process $ust 5eep an open connection with the authentication server. his can drain a )indows
N Q%B +uic5ly. Under do$ain!level security# this connection is $aintained only lon& enou&h to perfor$ the validation# thus conservin& valuable resources. he final reason is that#
as a do$ain $e$ber# the *a$ba server has access to $uch $ore infor$ation about user accounts# which can be used to auto$ate the creation and deletion of user accounts upon
de$and.
Q: - what is nmbd daemon?
his dae$on handles all na$e re&istration and resolution re+uests. It is the pri$ary vehicle involved in networ5 browsin&. It handles all U%Q!based protocols. he n$bd dae$on
should be the first co$$and started as part of the *a$ba startup process.
Q: - What is smdb daemon?
his dae$on handles all BQ/IQ!based connection services for file! and print!based operations. It also $ana&es local authentication. It should be started i$$ediately followin& the
startup of n$bd.
Q: - What is winbindd daemon?
Linux Interview Questions
his dae$on should be started when *a$ba is a $e$ber of a )indows NI or A%* do$ain. It is also needed when *a$ba has trust relationships with another do$ain. he winbindd
dae$on will chec5 the s$b.conf file for the presence of the id$ap uid and id$ap &id para$eters. If they are found# winbindd will use the values specified for UI% and UI%
allocation. If these para$eters are not specified# winbindd will start but it will not be able to allocate UI%s or UI%s.
Q: - ;xp"ain the parameter Jwins spport R GesJ sed in smb#con!?
If the *a$ba server was confi&ured to provide )IN* support ;Pwins support < 6esP@# then the )IN* server is able to provide na$e resolution for all of the hosts that are not listed in
the /etc/hosts file or within the %N*. Da5in& this adMust$ent in the Na$e *ervice *witch confi&uration file ;/etc/nsswitch.conf@ allows the Linux syste$ to +uery the )IN* server for
local na$e resolution. his saves $anual adMust$ents to host files.
Q: - How to atomate ,F0 share montin' drin' s$stem startp?
Add s$b share entry in /etc/fstab file.
//IQZA%%(/**ZC4Z*/(K/(/*hared /shared s$bfs noauto#defaults 1 1
Q: - how to start and stop samba server?
/etc/init.d/s$b restart
,;N1F9I- ,;>E;> Q N 9
Q: - How to start sendmai" server ?
service send$ail restart
Q: - Mn which ports sendmai" and senmai" with ,,- wor%s ?
8y default# *end$ail uses BQ and U%Q port >= for non!encrypted transfers. If the
*end$ail server is confi&ured to use **L for encryptin& e$ail sent and received# it uses
port IJ=.
Q: - ;xp"ain se o! Jtrsted-sersJ !i"e ?
List of users that can send e$ail as other users without a warnin& includin&
syste$ users such as apache for the Apache .Q *erver.
Q: - ;xp"ain the se o! J"oca"-host-namesJ !i"e ?
If the e$ail server should be 5nown by different hostna$es# list the host!
na$es in this file# one line per hostna$e. Any e$ail sent to addresses at these
hostna$es is treated as local $ail. he 4/AU(/;^useZcwZfile_`a@ option $ust
be enabled in the send$ail.$c file for this file to be referenced.
Q: - exp"ain the se o! .etc.a"iases !i"e ?
/etc/aliases# can be used to redirect e$ail fro$ one user to another. 8y default# it includes redirects for syste$ accounts to the root user. It can then be used to redirect all e$ail for the
root user to the user account for the syste$ ad$inistrator.
Linux Interview Questions
Q: - =an we se ,,- ;ncr$ption with ,endmai" ?
6es# *end$ail can be confi&ured to encrypt e$ail sent and received usin& **L ;secure soc5ets layer@.
Q: - What is ,endmai" ?
*end$ail is an DA# $eanin& it accepts e$ail $essa&es sent to it usin& the *DQ proto!
col and transports the$ to another DA e$ail server until the $essa&es reach their destinations. It also accepts e$ail for the local networ5 and delivers the$ to local $ail spools# one
for each user.
Q: - What is the ro"e o! FU9 ?
An DUA ;Dail User A&ent@ with access to the $ailbox file# directly or throu&h a networ5 file syste$# can read $essa&es fro$ the dis5 and display the$ for the user. his is &enerally
a console or web$ail application runnin& on the server.
Q: - Which are the important con!i'ration !i"es !or ,endmai" server ?
he /etc/$ail/ directory contains all the *end$ail confi&uration files# with send$ail.cf
and sub$it.cf bein& the $ain confi&uration files. he send$ail.cf file includes options
for the $ail trans$ission a&ent and accepts *DQ connections for sendin& e$ail. he
sub$it.cf file confi&ures the $ail sub$ission pro&ra$.
Q: - How to con!i're sendmai" to accept mai" !or "oca" de"iver$ that is addressed to other hosts?
Breate a /etc/$ail/local!host!na$es file. Qut into that file the hostna$es and do$ain na$es for which send$ail should accept $ail for local delivery. /nter the na$es with one
hostna$e or do$ain na$e per line. And also $a5e sure that *end$ail confi&uration file should contain PuseZcwZfileP option.
dnl Load class -<w with other na$es for the local host
4/AU(/;^useZcwZfile'@
Q: - When an or'ani*ation stores a"iases on an -194 server/ how $o wi"" con!i're sendmai" to read a"iases !rom the -194 server?
Use Psend$ail !bt !d1P co$$and to chec5 the send$ail co$piler options. If send$ail was not co$piled with L%AQ support# reco$pile and reinstall send$ail.
Add an ALIA*Z4IL/ define# containin& the strin& ldap to the send$ail confi&uration.
E *et the L%AQ cluster value
define;^confL%AQZBLU*/('# ^wrotetheboo5.co$'@
E ell send$ail that aliases are available via L%AQ
define;^ALIA*Z4IL/'# ^ldap''@
Q: - How to !orward emai"s o! a "oca" ser to externa" address?
Add an alias to the aliases file for each user whose $ail $ust be forwarded to another syste$. he recipient field of the alias entry $ust be a full e$ail address that includes the host
part. After addin& the desired aliases# rebuild the aliases database file with the newaliases co$$and.
Q: - Go have been as%ed to create a sendmai" con!i'ration that sends a"" "oca" mai" to a mai" hb/ whi"e direct"$ de"iverin' mai" addressed to externa" s$stems#
Breate a send$ail confi&uration containin& the DAILZ.U8 define to identify the $ail relay host for local $ail. Use the LCBALZU*/( co$$and to exe$pt the root user's $ail fro$
relayin&.
Linux Interview Questions
dnl %efine a relay server for local $ail
define;^DAILZ.U8'# ^s$tp.test.co$'@
dnl Users whose $ail is not passed to the $ail hub
LCBALZU*/(;root@
(ebuild and reinstall send$ail.cf# and then restart send$ail.
Q: - How to con!i're m"tip"e mai" &ees?
$5dir /var/spool/$+ueue/+ueue.:
$5dir /var/spool/$+ueue/+ueue.>
$5dir /var/spool/$+ueue/+ueue.0
ch$od L11 /var/spool/$+ueue/+ueue.:
ch$od L11 /var/spool/$+ueue/+ueue.>
ch$od L11 /var/spool/$+ueue/+ueue.0
Add the QU/U/Z%I( define to the send$ail confi&uration to use the new +ueue directories.
dnl %eclare the +ueue directory path
define;^QU/U/Z%I('# ^/var/spool/$+ueue/+ueue.F'@
Q: - How to disab"e certain ,FT4 commands?
Add the confQ(IKAB6Z4LAU* define to the send$ail confi&uration to set Qrivacy Cptions that disable unwanted# optional *DQ co$$ands. .ere we will disables the /XQN#
K(46# K/(8# and /(N co$$ands.
dnl %isable /XQN# K(46# K/(8 and /(N
define;^confQ(IKAB6Z4LAU*'# ^noexpn#novrfy#noverb#noetrn'@
(ebuild and reinstall send$ail.cf# and then restart send$ail.
Q: - In which ,endmai" con!i'ration !i"e we have to ma%e chan'es?
we will $a5e the chan&es only in the send$ail.$c file# and the chan&es will be $oved into the send$ail.cf file for us.
Q: - When ,endmai" dispatches $or emai"/ it p"aces the servers hostname behind $or sername/ which becomes the J!rom addressJ in the emai" 6ie#
serSmai"#test#com7#0t we want to se the domain name and not the hostname?
define;^conf%CDAINZNAD/'# ^test.co$'@dnl
4/AU(/;^relayZentireZdo$ain'@dnl
Q: - What does .etc.mai".access !i"e contains?
he access database ;P/etc/$ail/accessP@ is a list of IQ addresses and do$ainna$es of allowable connections.
4/AU(/;^accessZdb'#^hash !ODQ42 !o /etc/$ail/access.db'@dnl
and cat /etc/$ail/access
localhost.localdo$ain (/LA6
localhost (/LA6
:>L.1.1.: (/LA6
:H>.:JG.1 (/LA6
test.co$ (/LA6
Q: - How to restrict sendmai" to sendin' a bi' !i"e?
Linux Interview Questions
define;^confDAXZD/**AU/Z*I3/'#^=>I>GG11'@dnl
or If you are usin& a Q.Q based web$ail application li5e *+uirrelDail# you can adMust the $ax file si"e in php.ini file.
vi php.ini
postZ$axZsi"e < =1D
uploadZ$axZfilesi"e < =1D
$e$oryZli$it < JID
Q: - How to set 5? recipients !or each emai"?
define;^confDAXZ(BQ*ZQ/(ZD/**AU/'#^=1'@dnl
Q: - Which antivirs $o have inte'rated with sendmai" ?
Blai$AK
Q: - What is ="amav-Fi"ter?
Bla$av!Dilter is a tool to inte&rate send$ail and cla$AK antivirus.
Q: - Which con!i'ration !i"es are re&ired to inte'rate sendmai" and ="aim9E antivirs?
$ilter.conf and cla$av!$ilter
Q: - How to test sendmai" inte'ration with ="aim9E?
&rep Dilter /var/lo&/$aillo&
6ou have to &et followin& type of $essa&es.
send$ail' Dilter add' header' X!Kirus!*canned' Bla$AK version 1.GG.># cla$av!$ilter version 1.GG.> on $ail.test.co$
send$ail' Dilter add' header' X!Kirus!*tatus' Blean
Q: - Which too" $o have sed to b"oc% spammin'?
*pa$Assassin
Q: - What does J.etc.mai".J director$ contains?
he /etc/$ail/ directory contain all the *end$ail confi&uration files# with send$ail.cf and sub$it.cf bein& the $ain confi&uration files.
Q: - ;xp"ain the se o! .etc.mai".re"a$-domains !i"e?
he /etc/$ail/relay!do$ains file is used to deter$ine do$ains fro$ which it will relay $ail. he contents of the relay!do$ains file should be li$ited to those do$ains that can be
trusted not to ori&inate spa$.
Q: - What is the name o! spamassassin con!i'ration !i"e?
/etc/$ail/spa$assassin/local.cf
Q: - How to chec% mai" Qee o! sendmai"?
/usr/lib/send$ail !bp
or
$ail+
Linux Interview Questions
Q: - How to se m: macro processor to 'enerate a new sendmai"#c!?
$I /etc/$ail/send$ail.$c 2 /etc/$ail/send$ail.cf
QF9I- ,;>E;> Q N 9
Q: - Which Crops and Users are re&ired to start QF9I- ,erver ?
Uroups '! nofiles
+$ail
Users '! +$aild
alias
+$aill
+$ailp
+$ail+
+$ailr
+$ails
Q: - What is the ro"e o! J&mai"-sendJ process ?
+$ail!send ! deliver $ail $essa&es fro$ the +ueue
Q: - How to chec%/ &mai" server is p or down ?
)e can use +$ailctl co$$and to chec5 the status of +$ail server.
E +$ailctl stat
/service/+$ail!send' up ;pid 01010@ :GL seconds
/service/+$ail!send/lo&' up ;pid 0101I@ :GL seconds
/service/+$ail!s$tpd' up ;pid 0101=@ :GL seconds
/service/+$ail!s$tpd/lo&' up ;pid 0101G@ :GL seconds
$essa&es in +ueue' 1
$essa&es in +ueue but not yet preprocessed' 1
Q: - Which &mai" process se Jconcrrec$"oca"J contro" !i"e ?
+$ail!send
Q: - What is mai"dir ?
Daildir is a $ailbox for$at created by %an 8ernstein to address the shortco$in&s of the $box for$at. A $aildir $ailbox is a directory containin& three subdirectories# new# cur# and
t$p. /ach $essa&e in a $aildir $ailbox is in a separate file in one of the subdirectories# dependin& upon its status' new is for unread $essa&es# cur is for $essa&es that have been
seen# and t$p is for $essa&es in the process of bein& delivered.
Linux Interview Questions
Q: - What is procmai" ?
proc$ail is a popular Dessa&e %elivery A&ent ;D%A@. he function of an D%A is to accept a $essa&e fro$ the DA for a specific user or $ailbox# and deliver the $essa&e
accordin& to the user's desires. proc$ail can be used to PfilterP $essa&es by the content of various header fields or the body of the $essa&e.
Q: - What is QF9I- ?
+$ail is a $ail transfer a&ent that runs on Unix/Linux. It was written# startin& %ece$ber :HH=# by %aniel b. 8ernstein as a $ore secure replace$ent for the popular *end$ail pro&ra$.
+$ail's source code is released to the public do$ain# $a5in& +$ail free software.
Q: - What is =orier-imap ?
A server that provides IDAQ access to Daildir $ailboxes. his IDAQ server does NC handle traditional $ailbox files ;/var/spool/$ail# and derivatives@# it was written for the
specific purpose of providin& IDAQ access to Daildirs.
Q: - What is the "ocation o! &mai" contro" !i"es ?
/var/+$ail/control
Q: - Te"" me the name o! !ive Important Qmai" daemons?
+$ail!+ueue
+$ail!send
+$ail!clean
+$ail!lspawn
+$ail!rspawn
+$ail!local
+$ail!re$ote
Q: - ;xp"ain the wor%in' o! &mai"?
4or $ail arrivin& fro$ re$ote syste$s# tcpserver runs as a dae$on listenin& for inco$in& connections on the *DQ port. /ach ti$e a connection arrives# it runs qmail-smtpd# which
receives a $essa&e via *DQ and calls qmail-queue to +ueue the $essa&e. (e&ardless of where the $essa&e ori&inates# qmail-queue writes the $essa&e to a te$porary file in the
queue/todo directory# puttin& a new (eceived' line at the top# and also saves the envelope sender and recipient addresses to files. hen it notifies qmail-send by writin& a byte to a
Ptri&&erP soc5et file. qmail-send ta5es the $essa&e out of +ueue/todo# and analy"es each recipient address to see if it's local# re$ote# or virtual. 4or local addresses# it notifies qmail-
lspawn to run qmail-local to do the local deliveries. 4or each re$ote address# qmail-send notifies qmail-rspawn to run qmail-remote to do the re$ote deliveries. 4or virtual addresses#
qmail-send rewrites each virtual address as a $odified local address# usin& the infor$ation fro$ the virtualdo$ains files.
Q: - What is Ducspi-tcp?
A pac5a&e for servers that respond to inco$in& BQ connections# as an alternative to the old inetd dae$on. It used to be optional# but its tcpserver is now the only supported way to
run +$ail's *DQ dae$on.
Q: - What is Dcheckpassword?
Linux Interview Questions
If you're usin& +$ail's built!in QCQ0 server# you want %an's checkpassword pro&ra$# which validates user lo&ins as well. /ven if you're installin& an alternative chec5password# it's
nice to have %an's chec5password installed for testin&.
Q: - Which Fai"box +ormat is sed b$ Qmai"?
Q$ail supports two $ailbox for$ats' the traditional $box and %an's newer Daildir.
Q: - ;xp"ain &mai" contro" !i"e DmeA?
he na$e of this host# e.&.# $ail.test.co$. his provides the default to use for $any other confi&uration files.
Q: - ;xp"ain abot &mai" contro" !i"e Dlocals?
%o$ain na$es to be delivered locally# one per line. Dail to any do$ain listed in locals is delivered by treatin& the $ailbox part as a local address. his usually contains the na$e of
the host and the na$e of the do$ain used for user $ailboxes# such as test.co$ and $ail.test.co$.
Q: - ;xp"ain abot &mai" contro" !i"e Drcpthosts?
%o$ains for which this host should accept $ail via *DQ. his &enerally contains all of the do$ains in locals# as well as any virtual do$ains and any do$ains for which this host is a
bac5up $ail server. If rcpthosts does not exist# +$ail accepts and delivers $ail for any do$ain# a severe $isconfi&uration 5nown as an Popen relay#P which will be hiMac5ed by
spa$$ers. 8e sure your rcpthosts file exists before startin& +$ail. If you haven't defined any virtual do$ains# Must copy locals to rcpthosts.
Q: - ;xp"ain abot &mai" contro" !i"e Dbadmailfrom?
This qmail control file is used by qmail-smtpd. /nvelope addresses not allowed to send $ail. If the envelope fro$ address on an inco$in& $essa&e $atches an entry in bad$ailfro$#
the *DQ dae$on will reMect every recipient address. /ntries $ay be either e$ail addresses# or @domain to reMect every address in a do$ain. his is a pri$itive for$ of spa$
filterin&.
Q: - What is the se o! Dbouncefrom qmail control file?
his +$ail control file is used by qmail-send daemon. This file contains the $ailbox of the return address to put in bounce $essa&es.
Q: - What is se o! DconcurrencylocalA &mai" contro" !i"e?
his +$ail control file is used by +$ail!send dae$on. his file contains the $axi$u$ nu$ber of si$ultaneous local deliveries. he default value is :1.
Q: - What is se o! DconcurrencyremotelA &mai" contro" !i"e?
his +$ail control file is used by +$ail!send dae$on. his file contains the $axi$u$ nu$ber of si$ultaneous re$ote deliveries. he default value is >1.
Q: - What is the se o! Dqueuelifetime &mai" contro" !i"e?
his +$ail control file is used by +$ail!send dae$on. In this file we define how lon& to 5eep tryin& to deliver a $essa&e. he default value is J1IG11 seconds ;a wee5@.
Q: - What is the se o! Dtimeoutconnect &mai" contro" !i"e?
his +$ail control file is used by +$ail!re$ote dae$on. In this file we define how lon& to wait for a re$ote server to accept the initial connection to send $ail. he default value is J1
seconds.
Q: - What is the se o! Dvirtualdomains qmail control file?
he list of virtual users and do$ains for which this syste$ receives $ail. he default value in this file is none.
Linux Interview Questions
Q: - How to rebi"d the ,FT4 access database?
+$ailctl cdb
or
tcprules /etc/tcp.s$tp.cdb /etc/tcp.s$tp.t$p O /etc/tcp.s$tp
ch$od JII /etc/tcp.s$tpF
Q: - Which mai"in' "ist $o have con!i'red with &mai"?
/3$l$
Q: - Have $o insta""ed atoresponder N what is the se o! atoresponder?
6es# this is a si$ple pro&ra$ to auto$atically respond to e$ails.
Q: - what is vpopmai"?
vpop$ail is a free UQL software pac5a&e# to provide an easy way to $ana&e virtual e!$ail do$ains and non /etc/passwd e!$ail accounts on your +$ail server.
Q: - Wh$ vpopmai"?
vpop$ail provides a &ood set of $ana&e$ent tools and a reasonably well desi&ned structure which saves you i$ple$entin& your own. vpop$ail has also been around for a lon& ti$e
and enMoys support fro$ a lot of other software pac5a&es related to $ail which $a5es inte&ration fairly si$ple.
Q: - Te"" me the "ocation o! vpopmai" binaries?
/ho$e/vpop$ail/bin
Q: - What is the se o! vadddomain command?
Kadddo$ain co$$and is used to adds a new do$ain to the +$ail server
Q: - What is Dvch%pwA?
vch5pw is the authentication $echanis$ used by +$ail to chec5 passwords re+uired for downloadin& $ail# and in the case of *DQZAU.# sendin& $ail.
Q: - can vpopmai" inte'rated with F$,Q- database?
6es
Q: - Which web based inter!ace $o have sed to mana'e vpopmai"?
K+ad$in
Q: - What is mai"drop?
Daildrop is a $ail filterin& a&ent which can be used to filter $essa&es as they arrive on the server.
Q: - What is Qmai"admin?
Linux Interview Questions
Q$ailad$in is &oin& to provide us with a nice web based interface for ad$inisterin& $ail accounts once they are setup throu&h Kpop$ail ;or K+ad$in@. 4ro$ Q$ailad$in we can
create $ailboxes# aliases# forwards# $ail robots# $ailin& lists.
Q: - Which antivirs $o have sed with Qmai"?
Bla$AK antivirus
Q: - Where ="am 9E &arantines the e-mai"s?
Bla$ AK +uarantines the e!$ails in /var/spool/+$ailscan/+uarantine
Q: - 0$ which ser we rn ="am9E?
+scand user
Q: - =an I have ,pamassassin ta' sspected spam with a cstom sbTect "ine?
6es. /dit the /var/+$ail/bin/+$ail!scanner!+ueue.pl file and find the followin& line'
$y -spa$cZsubMect<^'*QAD'^N
Now type a custo$ spa$ subMect. his subMect line will be added to any $ails that *pa$assassin ta&s as suspected spa$. .ere's an exa$ple'
$y -spa$cZsubMect<^his is *pa$ Dail^N
Q: - When compi"in' &mai"/ I 'et the !o""owin' error:
+$ail!re$ote.c'0J' openssl/ssl.h' No such file or directory
what' s wron& thereT
openssl and libssl!dev pac5a&es are re+uired for +$ail co$pilin&.
Bhec5 these pac5a&es are installed or not
Q: - How can I disab"e &mai" !rom condctin' reverse 1N, "oo%ps on ,FT4 connections?
his can be done by addin& a P!.P fla& to the tcpserver call within the +$ail!s$tpd supervise script.
/usr/local/bin/tcpserver !v !( !. !l P-LCBALP !x /etc/tcp.s$tp.cdb !c P-DAX*DQ%P c
Q: - I am rnnin' &mai"-scanner with ,pamassassin and ="am9E# When I rn the &mai"-scanner test script or when I view m$ "o's/ I see the !o""owin' error: &mai"-inTect:
!ata": && temporar$ prob"em 0ad error# &mai"-inTect died
his can be fixed by raisin& the Psoftli$itP settin& within the /var/+$ail/supervise/+$ail!s$tpd file.
Q: - I'm 'ettin' the !o""owin' error concernin' Epopmai": con!i're: error: No vpopmai" etc."ibLdeps !i"e# Up'rade to vpopmai"-:#O#I or above#### What's wron'?
his error is usually caused when installin& Kpop$ail over a previous Kpop$ail installation. ry co$pletely re$ovin& the /ho$e/vpop$ail directory and then install a fresh copy of
Kpop$ail. hat should clear it up.
Q: - When I test &mai"-scanner/ I 'et an error that states: Jcan't do sidJ# What's wron'?
6our server is not set up to allow for setuid execution of scripts. he easiest way to fix this is to install the Pperl!suidperlP pac5a&e. If you're runnin& (edhat# you can download the
latest (QD of perl!suidperl.
4M,T+X F9I- ,;>E;> QN9
Linux Interview Questions
Q' ! )hat is the location of postfix $ailserver Queue T
8y default# the Qostfix $ail +ueues are located in the /var/spool/postfix directory. /ach
$essa&e +ueue is created as a separate subdirectory within this directory. /ach $essa&e is stored as a separate file in the subdirectory# usin& a uni+ue identifier for the filena$e.
Q' ! )hat is LDQ T
he Local Dail ransport Qrotocol ;LDQ@ is a different $ail transport protocol
described in (4B >100. LDQ utili"es a set protocol si$ilar to *DQ for deliverin&
$essa&es to the local host. Qostfix can be confi&ured to deliver $essa&es to local users
usin& LDQ if desired.
Q' ! )hat is canonical able T
he cleanup pro&ra$ uses the canonical table to rewrite $essa&e addresses contained in
the $essa&e header.he $ail ad$inistrator can use one canonical loo5up table for both
received $essa&es and sent $essa&es or separate tables for each. he canonical table is often used in conMunction with the alias file to provide address header rewritin& of out&oin&
$ail $essa&es.
Q' ! )ho is the creater of Qostfix T
)ietse Kene$a wrote Qostfix as a co$plete DA pac5a&e
Q' ! )hat is the difference between postfix and send$ail T
he $ain difference between Qostfix and *end$ail is Qostfix_`as $odularity. bust as the Unix syste$ bro5e up e!$ail functionality between $odules# Qostfix extends that practice to
the DA pro&ra$. Qostfix uses several different pro&ra$s to i$ple$ent the DA functionality.his allows each $odular pro&ra$ to be s$aller and +uic5er than one lar&e
$onolithic pro&ra$ would be.
Qostfix is $ore secure than send$ail.Qostfix re+uires a separate userid to be added to the $ail server. /ach $odule runs under this userid. If an intruder co$pro!$ises a Qostfix
$odule# he $ost li5ely will still not be able to brea5 out of the $odule
and &ain control of the $ail server.
Instead of one lar&e co$piled confi&uration file# Qostfix uses $ultiple files that use plaintext para$eter and value na$es to define functionality. Dost of the para$eters used in Qostfix
default to co$$on!sense values that allow the $ail ad$inistrator to confi&ure a co$plete $ail server with a $ini$al a$ount of effort.
Q' ! what is +$&r T
Cnce the valid $essa&e is rewritten and placed in the inco$in& $essa&e +ueue# the +$&r pro&ra$ ensures that the $essa&e is delivered to the proper destinations. he +$&r pro&ra$
then exa$ines $essa&e headers and passes the$ to the appropriate delivery pro&ra$ dependin& on the destination addresses. Burrently# the +$&r pro&ra$ can forward $essa&es to the
local# s$tp# and pipe pro&ra$s.
Linux Interview Questions
Q' ! ell $e about latest Kersion of Qostfix on which u have wor5ed T
postfix >.J
Q' ! )hat are the i$portant files for postfix server T
/etc/postfix/$ain.cf
/etc/postfix/access
/etc/postfix/aliases
Q' ! )here postfix $ail server lo&s created T
/var/lo&/$aillo&
Q: - ;xp"ain the wor%in' o! "oca" mai" sbmission !or post!ix?
)hen a local e$ail $essa&e enters the postfix syste$. Local $essa&es are deposited into the $aildrop directory of the Qostfix +ueue by the postdrop co$$and# usually throu&h the
send$ail co$patibility pro&ra$. he pic5up dae$on reads the $essa&e fro$ the +ueue and feeds it to the cleanup dae$on. he cleanup dae$on processes all inbound $ail and
notifies the +ueue $ana&er after it has placed the cleaned!up $essa&e into the inco$in& +ueue. he +ueue $ana&er then invo5es the appropriate delivery a&ent to send the $essa&e to
its next hop or ulti$ate destination.
Q: - What are the bene!its o! sin' ,FT4 9UTH?
! Usin& *DQ AU. we can $a5e it possible for clients# collea&ues# and ourselves to relay $essa&es fro$ everywhere in the world usin& only one ;our@ *DQ server.
- 8ein& a $obile user# we don't have to deal with the hassle to find a *DQ server that per$its us to relay.
! )e can $a5e use of scripts and dae$ons that run on our server and provide services that we need e.&. server!side virus scannin&.
Q: - b$ sin' postcon! command/ how $o wi"" set !""$ &a"i!ied hostname 6mai":#test#com7?
E postconf !e $yhostna$e<$ail.exa$ple.co$
he !e option tells postconf to edit the confi&uration with the para$eters and values specified.
Q: - Which command chec%s !or con!i'ration prob"ems?
E postfix chec5
Q: - How $o wi"" see the &ee o! post!ix server?
Epost+ueue !p
Q: - How can I c"ear post!ix mai" server &ee?
E postsuper !d ALL
Q: - How $o wi"" re"oad the post!ix &ee?
Linux Interview Questions
E postsuper !r ALL
Q: - =an post!ix server con!i'red with F$,Q- database?
6es
Q: - which command is sed to !ind ot that post!ix is comp"ied with m$s&" or not?
E postconf !$
nis
re&exp
environ
$ys+l
btree
unix
hash
Q: - What steps re&ired to 'et 4ost!ix to connect to the F$,Q- database?
! define the Dy*QL aliasZ$aps entry in the $ain.cf confi&uration file
aliasZ$aps < hash'/etc/postfix/aliases# $ys+l'/etc/postfix/$ys+l!aliases.cf
! he confi&uration file $ys+l!aliases.cf defines the para$eters necessary for postfix to connect to the Dy*QL database.
Q: - ;xp"ain smtpdLrecipientL"imit parameter? 9nd what is the de!a"t va"e !or this parameter?
he s$tpdZrecipientZli$it para$eter can li$it the nu$ber of recipients allowed in a sin&le inco$in& $essa&e.
he default value for this para$eter is :111.
Q: - ;xp"ain smtpdLtimeot 4arameter?
he s$tpdZti$eout para$eter li$its the a$ount of ti$e Qostfix waits for an *DQ client re+uest after sendin& a response. his allows the Qostfix ad$inistrator to +uic5ly disconnect
*DQ servers that Rca$p outS on the *DQ connection# utili"in& syste$ resources for the *DQ connection without actually sendin& a $essa&e.
s$tpdZti$eout < value
8y default# Qostfix will assu$e the value is in seconds.
Q: - ;xp"ain &eeLrnLde"a$ 4arameter?
he +ueueZrunZdelay para$eter sets the ti$e interval ;in seconds@ that Qostfix scans the deferred $essa&e +ueue for $essa&es to be delivered. he default value for this is :#111
seconds.
Q: - ;xp"ain maxima"L&eeL"i!etime 4arameter?
he $axi$alZ+ueueZlifeti$e para$eter sets the a$ount of ti$e ;in days@ that a $essa&e re$ains in the deferred $essa&e +ueue before bein& returned as undeliverable. he default
value is = days. Cnce this value is reached# Qostfix returns the $essa&e to the sender.
Q: - ;xp"ain minima"Lbac%o!!Ltime 4arameter?
he $ini$alZbac5offZti$e para$eter sets one value that has two uses' the $ini$u$ a$ount of ti$e used to hold a $essa&e in the deferred $essa&e +ueue and the $ini$u$ a$ount
of ti$e for which a host can be $ar5ed unreachable. he default value for this para$eter is :#111 seconds.
Linux Interview Questions
Q: - ;xp"ain maxima"Lbac%o!!Ltime 4arameter?
he $axi$alZbac5offZti$e value sets an upper li$it to the a$ount of ti$e a $essa&e is left in the deferred $essa&e +ueue without a delivery atte$pt. he default value for this
para$eter is I#111 seconds.
Q: - ;xp"ain de!a"tLdestinationLconcrrenc$L"imit 4arameter?
he defaultZdestinationZconcurrencyZli$it para$eter defines the $axi$u$ nu$ber of concurrent *DQ sessions that can be established with any re$ote host. his para$eter is
related to the *DQ $axprocess para$eter in the $aster.cf confi&uration file. he $axi$u$ nu$ber of concurrent *DQ sessions cannot exceed the $axprocess value set for the
$axi$u$ nu$ber of *DQ client processes. hus# if the default $axprocess value of =1 is used# settin& the defaultZdestinationZconcurrencyZli$it &reater than =1 has no effect.
Q: - ;xp"ain initia"LdestinationLconcrrenc$ 4arameter?
he initial nu$ber of concurrent *DQ sessions Qostfix will establish with a re$ote host is defined by the initialZdestinationZconcurrency para$eter. he default value for this
para$eter is >.
949=H; ,;>E;> QN9
Q' ! )hat is location of lo& files for Apache server T
/var/lo&/httpd
Q' ! )hat are the types of virtual hosts T
na$e!based and IQ!based.
Na$e!based virtual host $eans that $ultiple na$es are runnin& on each IQ address.
IQ!based virtual host $eans that a different IQ address exists for each website served. Dost confi&urations are na$ed!based because it only re+uires one IQ address.
Q' ! .ow to restart Apache web server T
service httpd restart
Q' ! .ow to chec5 the version of Apache server T
rp$ !+a Y&rep httpd
Q' ! )hat is $eanin& of PListenP in httpd.conf file T
Qort nu$ber on which to listen for nonsecure ;http@ transfers.
Q' ! )hat is %ocu$ent(oot T
it is a location of files which are accessible by clients. 8y default# the Apache .Q server in (ed.at /nterprise Linux is confi&ured to serve files fro$ the /var/www/ht$l/ directory.
Q' ! Cn which port Apache server wor5s T
Linux Interview Questions
http ! port G1
https ! port II0
Q' ! ell $e na$e of $ain confi&uration file of Apache server T
httpd.conf
Q' ! Cn which version of apache you have wor5ed T
httpd!>.>.0
Q: - What do $o mean b$ a va"id ,erverName directive?
he %N* syste$ is used to associate IQ addresses with do$ain na$es. he value of *erverNa$e is returned when the server &enerates a U(L. If you are usin& a certain do$ain na$e#
you $ust $a5e sure that it is included in your %N* syste$ and will be available to clients visitin& your site.
Q: - What is the main di!!erence between U-ocationV and U1irector$V sections?
%irectory sections refer to file syste$ obMectsN Location sections refer to ele$ents in the address bar of the )eb pa&e
What is the di!!erence between a restart and a 'race!" restart o! a web server?
%urin& a nor$al restart# the server is stopped and then started# causin& so$e re+uests to be lost. A &raceful restart allows Apache children to continue to serve their current re+uests
until they can be replaced with children runnin& the new confi&uration.
Q: - What is the se o! modLper" mod"e?
mod_perl scriptin& $odule to allow better Qerl script perfor$ance and easy inte&ration with the )eb server.
Q: - I! $o have added D"o'"eve" 1eb'A in httpd#con! !i"e/ than what wi"" happen?
It will &ive you $ore infor$ation in the error lo& in order to debu& a proble$.
Q: - =an $o record the F9= 6hardware7 address o! c"ients that access $or server#
No
Q: - =an $o record a"" the coo%ies sent to $or server b$ c"ients in Web ,erver "o's?
6es# add followin& lines in httpd.conf file.
Busto$Lo& lo&s/coo5iesZin.lo& P]dUNIQU/ZI%ee ]dBoo5ieeiP Busto$Lo& lo&s/coo5ies>Zin.lo& P]dUNIQU/ZI%ee ]dBoo5ie>eiP
Linux Interview Questions
Q: - =an we do atomatica""$ ro"" over the 9pache "o's at speci!ic times withot havin' to sht down and restart the server?
6es
Use ustom!o" and the rotatelo"s pro&ra$s
Add followin& line in httpd.conf file. Busto$Lo& PY /path/to/rotatelo&s /path/to/lo"s/accessZlo&.]6!]$!]d GJI11P co$bined
Q: - What we can do to !ind ot how peop"e are reachin' $or site?
Add the followin& effector to your activity lo& for$at. ]d(eferere
Q: - I! $o have on"$ one I4 address/ bt $o want to host two web sites on $or server# What wi"" $o do?
In this case I will use Na$e 8ased Kirtual hostin&.
*erverNa$e :1.:::.>10.>=
Na$eKirtual.ost F'G1
OKirtual.ost F'G12
*erverNa$e web:.test.co$
%ocu$ent(oot /var/www/ht$l/web:
O/Kirtual.ost2
OKirtual.ost F'G12
*erverNa$e web>.test>.co$
%ocu$ent(oot /var/www/ht$l/web>
O/Kirtual.ost2
Q: - =an I serve content ot o! a director$ other than the DocumentRoot director$?
6es# by usin& RAliasS we can do this.
Q: - I! $o have to more than one U>- map to the same director$ bt $o don't have m"tip"e lias directives# What $o wi"" do?
In this case I will use RAliasDatchS directives.
he AliasDatch directive allows you to use re&ular expressions to $atch arbitrary patterns in U(Ls and $ap anythin& $atchin& the pattern to the desired U(L.
Q: - How $o wi"" pt a "imit on p"oads on $or web server?
his can be achieved by Li$it(e+uest8ody directive.
O%irectory P/var/www/ht$l/dataZuploadsP2
Li$it(e+uest8ody :11111
O/%irectory2
.ere I have put li$it of :11111 8ytes
Linux Interview Questions
Q: - I want to stop peop"e sin' m$ site b$ 4rox$ server# Is it possib"e?
O%irectory proxy'http'//www.test.co$/$yfiles2
Crder Allow#%eny
%eny fro$ all
*atisfy All
O/%irectory2
Q: - What is modLevasive mod"e?
$odZevasive is a third!party $odule that perfor$s one si$ple tas5# and perfor$s it very well. It detects when your site is receivin& a %enial of *ervice ;%o*@ attac5# and it prevents
that attac5 fro$ doin& as $uch da$a&e. $odZevasive detects when a sin&le client is $a5in& $ultiple re+uests in a short period of ti$e# and denies further re+uests fro$ that client.
he period for which the ban is in place can be very short# because it Must &ets renewed the next ti$e a re+uest is detected fro$ that sa$e host.
Q: - How t to enab"e 4H4 scripts on $or server?
If you have mod_php installed# use #dd$andler to $ap .php and .phtml files to the Q.Q handler. Add.andler application/x!httpd!php .pht$l .php
Q: - Which too" $o have sed !or 9pache benchmar%in'?
ab ;Apache bench@
ab !n :111 !c :1 http'//www.test.co$/test.ht$l
Q: - =an we cache !i"es which are viewed !re&ent"$?
6es we can do it by usin& mod_file_cache module.
Bache4ile /www/htdocs/index.ht$l
-194 ,;>E;> QN9
Q: - Is there Craphica" editors !or -194 ?
6es# 4ollowin& are so$e UUI based tools for L%AQ
! UQ
! bava L%AQ 8rowser//ditor
! *ofterra L%AQ 8rowser
Linux Interview Questions
Q: - What can i do i! m$ app"ication doesn't spea% to -194 ?
Uateway that translate one directory access protocol into another.
Q: - How can i Toin in!ormation contained in di!!erent directories ?
%istributed# Dultivendor directories &lued to&ether by referrals and references.
Q: - What is J-1I+J ?
he L%AQ Interchan&e 4or$at ;L%I4@ is a standard text file for$at for storin& L%AQ confi&uration infor$ation and directory contents. L%I4 files are often used to i$port new data
into your directory or $a5e chan&es to existin& data.
Q: - Name the obTect c"ass t$pes ?
! *tructural CbMect class
! Auxiliary CbMect class
! Abstract obMect classes
Q: - What is the name o! main con!i'ration !i"e name !or -194 server ?
slapd.conf
Q: - What is -194 ?
L%AQ stands for Li&htwei&ht %irectory Access Qrotocol. In plain and si$ple ter$s# its a database whereby it has all the details of all of or&ani"ations# individuals# and other resources
such as files and devices in a networ5# whether on the Internet or on corporate intranetand whether or not you 5now the do$ain na$e# IQ address# or &eo&raphic whereabouts. An
L%AQ directory can be distributed a$on& $any servers on a networ5# then replicated and synchroni"ed re&ularly. An L%AQ server is also 5nown as a %irectory *yste$ A&ent ;%*A@.
Its a not a relational database. Cutloo5 and other e$ail pro&ra$s uses L%AQ to search for a recipient in an or&ani"ation.
Q: - Whats the re"ation ship between -194 and PN1I?
bN%I has classes provided by *UN that will help ur appln interact with and L%AQ server. bN%I appln wor5 si$ilarly to b%8B applns once and be free to use 'drivers' fro$ different
vendors. *UN provides the PdriverP that will help interact with the L%AQ server. *un also provides PdriversP for other na$in& services ;li5e BC(8A@.
Q: - Wh$ -194 is ca""ed "i'ht wei'ht?
L%AQ ;Li&htwei&ht %irectory Access Qrotocol@ is a protocol for co$$unications between L%AQ servers and L%AQ clients.
L%AQ servers store PdirectoriesP which are access by L%AQ clients.
L%AQ is called li&htwei&ht because it is a s$aller and easier protocol which was derived fro$ the X.=11 %AQ
;%irectory Access Qrotocol@ defined in the C*I networ5 protocol stac5.
Linux Interview Questions
Q: - what is ,-941?
*LAQ% stands for *tand!Alone L%AQ.Blients connect to the server over the L%AQ protocol# usually usin& a networ5!based connection ;thou&h *LAQ% provides a UNIX soc5et
listener@.
Q: - Which daemons are re&ired !or -194 server?
slapd and slurpd
Q: - Te"" me the name o! three -194 ="ient ti"ities or 9pp"ications
ldapsearch
ldapadd
ldap$odify
Q: - 1e!ine ,chemas?
*che$as provide definitions of the different obMect classes and attribute types that CpenL%AQ should support. Usin& these# CpenL%AQ can deter$ine what entries it is allowed to
store# whether any &iven entry is valid# and how entries should opti$ally be stored.
Q: - ;xp"ain mod"epath directive?
he $odulepath directive provides the full path to the directory where the $odules ;the co$piled libraries@ are stored.
Q: - ;xp"ain mod"e"oad directive?
he $oduleload directive instructs CpenL%AQ to load a particular $odule.
Q: - What is H10?
.%8 is the new &eneration stora&e $echanis$ for CpenL%AQ. Li5e its predecessor# the 8%8 bac5end# .%8 uses the Cracle 8er5eley%8 database for stora&e# but .%8 stores entries
hierarchically# a perfect fit for L%AQ's tree structure. he old 8%8 bac5end is still supported# and you can use it by specifyin& bdb instead of hdb in the database directive.
Q: - Which ti"it$ is sed to ;ncr$pt the password?
ldappasswd
Q: - How $o wi"" veri!$ -194 con!i'ration !i"e?
Use PslaptestP utility.
slaptest !v !f /etc/ldap/slapd.conf
Linux Interview Questions
Q: - Which con!i'ration !i"e is re&ired !or -194 c"ients?
ldap.conf
Q: - ;xp"ain J,IZ;-IFITJ directive?
his directive indicates the upper li$its on the nu$ber of records returned.
Q: - ;xp"ain JTIF;-IFITJ directive?
his directive will &ive the infor$ation about the a$ount of ti$e the client will wait for the server to respond.
Q: - Te"" me the name o! "o'ica" operators which are sed in "dap !i"ters#
AN% ;f@# C( ;Y@# and NC ;g@
Q: - What 1oes s"apadd 1o?
he slapadd utility reads the slapd.conf file# loads the appropriate bac5end databases# and then reads L%I4 data.
Q: - Which web based too" $o have sed !or -194?
phpL%AQad$in
,QUI1 ,;>E;> QN9
Q: - Mn Which port 4rox$ server wor% ? =an we chan'e prox$ server port ?
8y default proxy server runs on 0:>G port. yes we can chan&e proxy server port.
vi /etc/s+uid/s+uid.conf
httpZport 0:>G
Q: - How to b"oc% ,ome domains b$ ,&id server ?
Da5e a file
Linux Interview Questions
vi /etc/s+uid/badZdo$ains
.xxx.co$
.abcd.co$
.sexy.co$
Now $a5e followin& chan&es in *+uid.conf file
acl 8A%Z%CDAIN* dstdo$Zre&ex !i P/etc/s+uid/badZdo$ainsP
httpZaccess deny 8A%Z%CDAIN*
Q: - How to c"ear =ache in ,&id prox$?
4irstly stop s+uid server.
service s+uid stop
r$ !rf /var/lib/s+uid/cache/F
s+uid !"
Q: - How to restart s&id server ?
service s+uid restart
Q: - What is the name o! main con!i'ration !i"e !or ,&id server ?
/etc/s+uid/s+uid.conf
Q: - How to restrict web access b$ Time ?
acl D6ZID/ ti$e D ) . 4 H'11!:L'11
httpZaccess allow D6ZID/
Q: - What is ,&id ?
*QUI% is a webcache and proxy server for Linux and UNIX.
Users confi&ure their web browsers to use the *+uid proxy server instead of &oin& to the web directly. he *+uid server then chec5s its web cache for the web infor$ation re+uested
by the user. It will return any $atchin& infor$ation that finds in its cache# and if not# it will &o to the web to find it on behalf of the user. Cnce it finds the infor$ation# it will populate
its cache with it and also forward it to the user's web browser.
Q: - What is "ocation o! =ache directories !or ,QUI1 ?
/var/spool/s+uid
Linux Interview Questions
Q: - What this command Js&id -*J wi"" do ?
his co$$and will create cache directories.
Q: - ;xp"ain JmaximmLobTectLsi*eJ directive?
It defines $axi$u$ si"e for obMects to be stored in the dis5.he value are specified in 5ilobytes# and the default is ID8.
Q: - ;xp"ain JcacheLdirJ directive?
his is used to define cache directory# its path# type and si"e.
cacheZdir ype %irectory!Na$e Dbytes Level: Level>
Q: - What is !s?
ufs is a s+uid stora&e for$at.
Q: - What is Cre$"istin' ?
Cre$"istin' ;or 'ra$"istin'@ is a $ethod of defendin& e!$ail users a&ainst spa$. A $ail transfer a&ent ;DA@ usin& &reylistin& will Pte$porarily reMectP any e$ail fro$ a sender it
does not reco&ni"e. If the $ail is le&iti$ate the ori&inatin& server will# after a delay# try a&ain and# if sufficient ti$e has elapsed# the e$ail will be accepted. If the $ail is fro$ a spa$
sender# sendin& to $any thousands of e$ail addresses# it will probably not be retried.
Q: - =an we have two apache servers havin' di!! versions?
6es# you can have two different apache servers on one server# but they can't listen to the sa$e port at the sa$e ti$e.Nor$ally apache listens to port G1
which is the default .Q port. he second apache version should listen to another port with the Listen option in httpd.conf# for exa$ple to port G:.
4or testin& a new apache version before $ovin& your sites fro$ one version to another# this $i&ht be a &ood option.6ou Must type www.exa$ple.co$'G:
in the browser window and you will be connected to the second apache instance
Q: - What is ,per 0"oc% in -inx.Unix ?
/ach file syste$ is different and they have type li5e ext># ext0 etc.4urther eachfile syste$ has si"e li5e = U8# :1 U8 and status such as $ount status. In
short each file syste$ has a superbloc5# which contains infor$ationabout file syste$ such as'
+i"e s$stem t$pe
,i*e
,tats
In!ormation abot other metadata strctres
Linux Interview Questions
If this infor$ation lost# you are in trouble ;data loss@ so Linux $aintains $ultiple redundant copies of thesuperbloc5 in every file
syste$. his is very i$portant in $any e$er&ency situation# for exa$ple you can usebac5up copies to restore da$a&ed pri$ary
super bloc5.
4ollowin& co$$and displays pri$ary and bac5up superbloc5 location on .dev.sda(:
2 dmpe5!s .dev.hda( W 'rep -i sperb"oc%
Q: - What is the "oad avera'e o! the server and What is an acceptab"e ,erver -oad 9vera'e ?
he load avera&e is the su$ of the run +ueue len&th and the nu$ber of Mobs currently runnin& on the BQUs. he three load!avera&e values in the first
line of top output are the :!$inute# =!$inute and :=!$inute avera&e. ;hese values also are displayed by other co$$ands# such as upti$e# not only
top.@
here are a few factors involved to deter$ine the server avera&e load. If your server ;s@ use dual processors# the acceptable *erver Load Avera&e is >.11.
his load is considered Popti$alP.
Q: - What are the advanta'es o! GUF?
! Auto$atic resolution of software dependencies.
! Dultiple software locations at one ti$e.
! Ability to specify particular software versions or architectures.
Q: - ;xp"ain this entr$ .shared 8O5#8HI#8#).5??#5??#5??#)6s$nc/rw7
allows all syste$s with :H>.:JG.:.F IQ addresses read!write access to the /shared/ directory'
Q: - What wi"" happened i! a space is 'iven inbetween a""owedLhosts and 6options7
If a space is included# the options are applied to any and all IQ addresses# which can be +uite dan&erous if write per$ission is &ranted.
Q: - What is the ro"e o! Js$ncJ option !or N+, server
If sync is specified# the server waits until the re+uest is written to dis5 before respondin& to the client.
he sync option is reco$$ended because it follows the N4* protocol.
Linux Interview Questions
,H;-- ,=>I4TINC
Q: - What is ,he""'s >esponsibi"ities ?
he shell is responsible for the execution of all pro&ra$s that you re+uest fro$ your ter$inal. /ach ti$e you type in a line to the shell# the shell analy"es the line and then deter$ines
what to do.he line that is typed to the shell is 5nown $ore for$ally as the co$$and line. he shell scans this co$$and line and deter$ines the na$e of the pro&ra$ to be executed
and what ar&u$ents to pass to the pro&ra$.

Das könnte Ihnen auch gefallen