System Admin Q & A – XXIII

Ques 1: – What are different type of variables in Linux ?

Ans: – There are two types of variables :

System Defined Variable: These are the variables which are created and maintained by Operating System(Linux) itself. Generally these variables are defined in CAPITAL LETTERS. We can see these variables by using the command “set”

User Defined Variable : These variables are defined by users. A shell script allows us to set and use our own variables within the script. Setting variables allows you to temporarily store data and use it throughout the script, making the shell script more like a real computer program. Some Examples are listed below :

var4=“still more testing”

The Linux shell automatically determines the data type used for the variable value.

Ques 2: – What does chroot SFTP means ?

Ans: – SFTP stands for SSH File Transfer protocol or Secure File Transfer Protocol. SFTP provides file access, file transfer, and file management functionalities over any reliable data stream. When we configure SFTP in chroot environment , then only allowed users will be limited to their home directory , or we can say allowed users will be in jail like environment where they can’t even change their directory.

Ques 3: – How to check syntax of named.conf is correct or not ?

Ans: – named-checkconf is the command, which checks the syntax of named.conf file.

# named-checkconf /etc/named.conf

If bind is running in chroot environment use below command

# named-checkconf -t /var/named/chroot /etc/named.conf

Ques 4: – What are the different types of DNS records or Resource records ?

Ans: – Below are the list of resource records or DNS records :

SOA – start of authority, for a given zone
NS – name server
A – name-to-address mapping
PTR – address-to-name mapping
CNAME – canonical name (for aliases)
MX – mail exchanger (host to receive mail for this name)
TXT – textual info
RP – contact person for this zone
WKS – well known services
HINFO – host information

Ques 5: – How To limit the data transfer rate, number of clients & connections per IP for local users in VSFTPD ?

Ans: – Edit the ftp server’s config file (/etc/vsftpd/vsftpd.conf) and set the below directives :

local_max_rate=1000000 # Maximum data transfer rate in bytes per second
max_clients=50 # Maximum number of clients that may be connected
max_per_ip=2 # Maximum connections per IP

Ques 6: – How to change the default directory for ftp / Anonymous user in vsftpd ?

Ans: -Edit the file ‘/etc/vsftpd/vsftpd.conf’ and change the below directive :

After making above change either restart or reload vsftpd service

Ques 7: – What are the important daemons in postfix ?

Ans: – Below are the lists of impportant daemons in postfix mail server :

master :The master daemon is the brain of the Postfix mail system. It spawns all other daemons.
smtpd: The smtpd daemon (server) handles incoming connections.
smtp :The smtp client handles outgoing connections.
qmgr :The qmgr-Daemon is the heart of the Postfix mail system. It processes and controls all messages in the mail queues.
local : The local program is Postfix’ own local delivery agent. It stores messages in mailboxes.

Ques 8: – What is the use of Domain Keys(DKIM) in mail servers ?

Ans: – DomainKeys 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).

Ques 9: – What is use of sshpass command in linux ?

Ans: – sshpass is a command which allows us to automatically supply password to the command prompt so that automated scripts can be run as desired by users. sshpass supplies password to ssh prompt using a dedicated tty , fooling ssh to believe that a interactive user is supplying password.

Ques 10: – What is the use of blowfish options in scp command ?

Ans: -Using blowfish options in scp command , we can increase the speed, by default scp uses the Triple-DES cipher to encrypt the data being copied.
Example : scp -c blowfish /home/itstuff.txt root@:/opt/

Ques 11: – What is Initrd ?

Ans: – Initrd stands for initial ram disk , which contains the temporary root filesystem and neccessary modules which helps in mounting the real root filesystem in read mode only.

Ques 12: – What is an Open mail relay ?

Ans: – An open mail relay is an SMTP server configured in such a way that it allows anyone on the Internet to send e-mail through it, not just mail destined to or originating from known users.This used to be the default configuration in many mail servers; indeed, it was the way the Internet was initially set up, but open mail relays have become unpopular because of their exploitation by spammers and worms.