System Admin Q & A – III

Ques 1: – What is the role of /etc/resolv.conf file ?

Ans: – In this file we sets the DNS servers (using their IP addresses) and the search domain. The values of the DNS servers are often added when the network is activated because the data can be provided by DHCP or a similar service.

Ques 2: – What is the difference between hardware RAID and Software RAID ?

Ans: – The hardware-based RAID is independent from the host. A Hardware RAID device connects to the SCSI controller and presents the RAID arrays as a single SCSI drive. An external RAID system moves all RAID handling “intelligence” into a controller located in the external disk subsystem. The whole subsystem is connected to the host via a normal SCSI controller and appears to the host as a single disk.

Software RAID is implemented under OS Kernel level. The Linux kernel contains an MD driver that allows the RAID solution to be completely hardware independent. The performance of a software-based array depends on the server CPU performance and load.

Ques 3: – What is the use of script command in Linux ?

Ans: – scriptcommand makes a copy (type script) of a terminal session. The most common use of script is to document terminal session. By starting script you can save all the information, displayed on your terminal during a login session, to a file. You can then print the file or view it with an editor. In a way script is a specialized tee for the shell.

When you run script a new shell is forked. This new shell makes a complete copy of everything displayed on your terminal. It reads standard input and output for your terminal tty and stores the data in a file. The default filename is typescript.

To exit from a script session you simply press Ctrl-D or type exit.
Format of the script command.

script [ -a ] [ typescript_file ]
Options
-a Append the output of script to file. Normally script begins writing to a new file; if the file exists it is overwritten unless you specify the -a option.

Ques 4: – Why should we use RAID ?

Ans: – System Administrators and others who manage large amounts of data would benefit from using RAID technology.
Following are the reasons to use RAID- Enhances speed
– Increases storage capacity using a single virtual disk
– Minimizes disk failur

Ques 5: – Can we create logs for ftp authenticated sessions?

Ans: – Yes, If the xferlog_enable directive in vsftpd.conf is set to YES, file transfers using the FTP protocol are logged to /var/log/xferlog. Information such as a time stamp, IP address of the client, the file being transferred, and the username of the person who authenticated the connection is included in the log entry.

Ques 6: – what is Stealth name server?

Ans: – Stealth name server is a secret server. This type of name server is not published anywhere. It is only known to the servers that have its IP address statically listed in their configuration. It is an authoritative server. It acquires the data for the zone with the help of a zone transfer. It can be the main server for the zone. Stealth servers can be used as a local backup if the local servers are unavailable.

Ques 7: – what is nmbd daemon?

Ans: – This daemon handles all name registration and resolution requests. It is the primary vehicle involved in network browsing. It handles all UDP-based protocols. The nmbd daemon should be the first command started as part of the Samba startup process.

Ques 8: – What is LMTP ?

Ans: – The Local Mail Transport Protocol (LMTP) is a different mail transport protocol described in RFC 2033. LMTP utilizes a set protocol similar to SMTP for delivering messages to the local host. Postfix can be configured to deliver messages to local users using LMTP if desired

Ques 9: – How you will put a limit on uploads on your web server?

Ans: – This can be achieved by LimitRequestBody directive.

LimitRequestBody 100000

Here I have put limit of 100000 Bytes

Ques 10: – How to Enable ACLs for /home partition?

Ans: -Add following entry in /etc/fstab

LABEL=/home /home ext3 acl 1 2

Now remount /home partition with acl option.

mount -t ext3 -o acl /dev/sda3 /home

System Admin Q & A – II

Ques 1: – What is Greylisting ?

Ans: – Greylisting (or graylisting) is a method of defending e-mail users against spam. A mail transfer agent (MTA) using greylisting will “temporarily reject” any email from a sender it does not recognize. If the mail is legitimate the originating server will, after a delay, try again and, if sufficient time has elapsed, the email will be accepted. If the mail is from a spam sender,sending to many thousands of email addresses, it will probably not be retried.

Ques 2: – Can we have two apache servers having diff versions?

Ans: – Yes, you can have two different apache servers on one server, but they can’t listen to the same port at the same time.Normally apache listens to port 80 which is the default HTTP port. The second apache version should listen to another port with the Listen option in httpd.conf, for example to port 81.

For testing a new apache version before moving your sites from one version to another, this might be a good option.You just type www.example.com:81 in the browser window and you will be connected to the second apache instance.

Ques 3: – What is the load average of the server and What is an acceptable Server Load Average ?

Ans: – The load average is the sum of the run queue length and the number of jobs currently running on the CPUs. The three load-average values in the first line of top output are the 1-minute, 5-minute and 15-minute average. (These values also are displayed by other commands, such as uptime, not only top.)

There are a few factors involved to determine the server average load. If your server (s) use dual processors, the acceptable Server Load Average is 2.00. This load is considered “optimal”.

Ques 4: – What is Super Block in Linux/Unix ?

Ans: – Each file system is different and they have type like ext2, ext3 etc.Further eachfile system has size like 5 GB, 10 GB and status such as mount status. In short each file system has a superblock, which contains informationabout file system such as:

File system type
Size
Status
Information about other metadata structures
If this information lost, you are in trouble (data loss) so Linux maintains multiple redundant copies of thesuperblock in every file system. This is very important in many emergency situation, for example you can usebackup copies to restore damaged primary super block.

Following command displays primary and backup superblock location on /dev/sda3:

# dumpe2fs /dev/hda3 | grep -i superblock

Ques 5: – What is the difference between TCP & UDP ?

Ans: – TCP

TCP -Transmission control protocol
TCP is a connection oriented protocol.
Three way handshake happens between client and server.
TCP is a reliable data transfer
Slow transmission of data compare to UDP.
TCP is used to send file like database,where reliability play the first role

UDP –

UDP -User Datagram protocol
UDP is connectionless protocol
There is no three way handshake between client and server
Data transfer is not reliable
Faster than TCP
It used to send data like video,audio

Ques 6: – What is the purpose of nsswitch.conf ?

– nsswitch.conf is the name service switch configuration file, generally located in the /etc directory. Its purpose is to tell the system in what order it should consult various name services to resolve information about users, name resolution, and netgroups. This information can be provided by files on the filesystem (e.g. /etc/hosts containing IP address/host name pairs or /etc/passwd containing user data) or by a network name service such as DNS for host names or NIS or LDAP for account data.

Ques 7: – What command is used to remove the password assigned to a group ?

#gpasswd -r

The gpasswd command is used to change the password assigned to a group. Use the -r option to remove the password from the group.

Ques 8: – What command would you type to use the cpio to create a backup called backup.cpio of all the users’ home directories ?

 # find /home | cpio -o > backup.cpio

The find command is used to create a list of the files and directories contained in home. This list is then piped to the cpio utility as a list of files to include and the output is saved to a file called backup.cpio

Ques 9: – What is Domain Key ?

This can be achieved by Limit Request Body directive.

Direct Domain Keys is an e-mail authentication system designed to verify the DNS domain of an e-mail sender and the message integrity. The DomainKeys specification has adopted aspects of Identified Internet Mail to create an enhanced protocol called DomainKeys Identified Mail (DKIM).

System Admin Q & A – I

Ques 1: – What is the difference between LILO and GRUB ?

1) LILO has no interactive command interface, whereas GRUB does.

2) LILO does not support booting from a network, whereas GRUB does.

3) LILO stores information regarding the location of the operating systems it can to load physically on the MBR.

If you change your LILO config file, you have to rewrite the LILO stage one boot loader to the MBR. Compared with GRUB, this is a much more risky option since a misconfigured MBR could leave the system unbootable. With GRUB, if the configuration file is configured incorrectly, it will simply default to the GRUB command-line interface.

Ques 2: – What is LVM Snapshot ?

An LVM snapshot is an exact copy of an LVM partition that has all the data from the LVM volume from the time the snapshot was created. The big advantage of LVM snapshots is that they can be used to greatly reduce the amount of time that your services/databases are down during backups because a snapshot is usually created in fractions of a second. After the snapshot has been created, you can back up the snapshot while your services and databases are in normal operation.

Ques 3: – What is the meaning of Hard & soft mount option in NFS server ?

Hard mount

– If the NFS file system is hard mounted, the NFS daemons will try repeatedly to contact the server. The NFS daemon retries will not time out, will affect system performance, and you cannot interrupt them

Soft mount

– If the NFS file system is soft mounted, NFS will try repeatedly to contact the server until either:

A connection is established
The NFS retry threshold is met
The nfstimeout value is reached

Ques 4: – How to verify the signature of an rpm ?

rpm -K test-1.0-1.i386.rpm

Ques 5: – What is an inode ?

An inode is a data structure on a traditional Unix-style file system such as UFS. An inode stores basic information about a regular file, directory, or other file system object.

When a file system is created, data structures that contain information about files are created. Each file has an inode and is identified by an inode number (often “i-number” or even shorter, “ino”) in the file system where it resides. Inodes store information on files such as user and group ownership, access mode (read, write, execute permissions)

and type of file. There is a fixed number of inodes, which indicates the maximum number of files each filesystem can hold.

Ques 6: – State some of the products of Sybase?

udev is the device manager for the Linux 2.6 kernel series. Primarily, it manages device nodes in /dev. It is the successor of devfs and hotplug, which means that it handles the /dev directory and all user space actions when adding/removing devices, including firmware load.

Ques 7: – What is the difference between ext2 and ext3 file systems?

The ext3 file system is an enhanced version of the ext2 file system.

The most important difference between Ext2 and Ext3 is that Ext3 supports journaling.
After an unexpected power failure or system crash (also called an unclean system shutdown), each mounted ext2 file system on the machine must be checked for consistency by the e2fsck program. This is a time-consuming process and during this time, any data on the volumes is unreachable. The journaling provided by the ext3 file system means that this sort of file system check is no longer necessary after an unclean system shutdown. The only time a consistency check occurs using ext3 is in certain rare hardware failure cases, such as hard drive failures. The time to recover an ext3 file system after an unclean system shutdown does not depend on the size of the file system or the number of files; rather, it depends on the size of the journal used to maintain consistency. The default journal size takes about a second to recover, depending on the speed of the hardware.

For testing a new apache version before moving your sites from one version to another, this might be a good option.You just type www.example.com:81 in the browser window and you will be connected to the second apache instance.