Operating System Basics: What Is Your Favorite OS and Why?

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 36

1

OPERATING SYSTEM BASICS

What is your favorite OS and why?


Any good UNIX candidate believes in 'the right tool for the job'. Anyone who says that 'Linux is the
answer to everything' is fooling themselves. All the different Unix OS's have their advantages, and the key
to having them explain theirs. They don't have to agree with you! That’s the key. But they should at least
make sense. But don't hold it against them if the answer is 'because I know that OS the best'. It's a
common one.

Why paging is used?


The act of moving pages of memory from RAM to virtual memory on a hard drive. Linux users term this
as SWAP.

Explain the concept of virtual memory.


Physmem, Swap, and paging.
Virtual memory is hardware technique where the system appears to have more memory that it actually
does. Paging + RAM = Virtual Memory

What is fragmentation?
Fragmentation occurs when a piece of data in memory is broken up into many pieces that are not close
together
OR
Fragmentation occurs when the operating system cannot or will not allocate enough contiguous space to
store a complete file as a unit, but instead puts parts of it in gaps between other files
Scattered Data

What is multi tasking?


Multi tasking: The concept of multitasking is quite similar to multiprogramming but difference is that the
switching between jobs occurs so frequently that the users can interact with each program while it is
running.

What is the difference between a ‘thread’ and a ‘process’?


Process: A process is a collection of virtual memory space, code, data, and system resources.
Thread: A thread is code that is to be serially executed within a process. At least one thread exists within
each process. If multiple threads can exist within a process, then they share the same memory and file
resources.

What is Semaphore?
Locking Mechanism used inside resource mangers and resourse dispensers.

What the difference between Cache and Buffer

Cache:
First time accessing the data gets cache in the RAM, once the data is moved from disk into the cache,
future use can be made by accessing the cached copy rather than refetching or recomputing the original
data, so that the average access time is lower
Buffer:
Memory used to temporarily store output or input data, which is not yet written to disk.
2

LINUX BASICS
What are the main flavors of UNIX?
System V (five) from AT&T Berkeley Software Distribution
HP-UNIX FreeBSD
IBM-AIX NetBSD
SCO-UNIX
SOLARIS

Who introduced UNIX?


Ken Thompson

What two organizations first developed UNIX?


Bell Labs
Berkeley Software Distribution

In what high level programming language is UNIX written?


“C” Programming Language

What the difference between SYSV and BSD


SysV BSD
1. Run control scripts are under /etc/init.d /etc/rc.d
2. Organises scripts for starting and stopping services it has a single script for each run level.
Into a directory for each run level

IS Linux comes under SYSV or BSD


Linux has features of both

What are FSF, GNU and GPL? Give a brief on each?


FSF: Free Software Foundation
The Free Software Foundation (FSF) is a non-profit organization founded by Richard Stallman to support
the free software movement (free as in freedom), and in particular the GNU project
GNU: recursive acronym for "GNU's Not Unix". GNU is major project of FSF. Bash shell and basic
Linux commands like cp, mv have been developed under GNU project.
GNU (pronounced /gnu/) is a free software operating system consisting of a kernel, libraries, system
utilities, compilers, and end-user applications.
GPL: General Public License
The GNU General Public License (GNU GPL or simply GPL) is a widely-used free software license,
originally written by Richard Stallman for the GNU project.
General Public license which is governing document for all free softwares that it protects. It also follows
the Copy left methodology or copy left notion instead of copy write. It says that you can redistribute,
modify or make changes to existing software protected by the GPL providing that you won’t make it
proprietary. So if you'll make any changes to any software protected by GPL, you need to redistribute the
changes back to the project or back to the community so others may benefit , modify or study,
redistribute. In other words, GPL provides a framework for keeping software free, so that it doesn’t
becomes proprietary.
3
Who is the founder of FSF?
Richard Stallman

Who developed Linux kernel?


Linus Torvalds

What the version of kernel in different release of Red Hat Linux?


Red hat Linux Version Name Date Kernel Version
7.3 Valhalla 2.4.18-3
8 Psyche 2.4.8-14
9 Shrike 2.4.20-8

Fedora Core Version Name Date Kernel Version


1 Yarrow November 5, 2003
2 Tettnang May 18, 2004
3 Heidelberg November 8, 2004
4 Stentz June 13, 2005
5 Bordeaux March 20, 2006

RedHat Enterprise Linux 2.1


Enterprise Server (Pensacola) March 26, 2002
Advanced Server (Panama) May 2003
RedHat Enterprise Linux 3 (Taroon) October 22, 2003
Enterprise Server
Advanced Server 2.4.21-32.ELsmp
RedHat Enterprise Linux 4 (Nahant) Feb 15 2005
Enterprise Server
Advanced Server

How would u explain 2.4.18-14?

How many variants of RHEL have been distributed by RedHat?


RHEL AS (advanced server) – for larger computer systems
RHEL ES (edge server or entry-level server) – for medium systems
RHEL WS (workstation) – for personal power-user desktops
Red Hat Desktop – for client-oriented single-user use

Name some of the other Linux distributor?


SUSE
Debian
Slackware
Gentoo
CentOS

What is Fedora?
Fedora is a set of projects, sponsored by Red Hat and guided by the Fedora Foundation. These projects are
developed by a large community of people who strive to provide and maintain the very best in free, open
source software and standards
4
Whats the differences between every release of Fedora Core

Whats the difference between RedHat Enterprise Linux and Fedora Core Projects
RHEL Fedora
1. RHEL is intended for commercial use Fedora Core is intended for personal, hobbyist, and
developer use
2. RHEL 3 is based on still redhat 9 src code Fedora Core 3 is much advance having latest kernel
2.6 And newer developer tools.
3. RHEL 4 is based on FC3. Fedora Core 4 is having latest gcc and tools.
4. RedHat Support No Support
5. Cost Based Free

What is a kernel?
The kernel is the core piece of most operating systems. It is a piece of software responsible for the
communication between hardware and software components.

Is Linux Kernel a modular or monolithic?


Linux is a module-loading monolithic kernel
Modern monolithic kernels such as Linux, FreeBSD and Solaris can load executable modules at runtime,
allowing easy extension of the kernel's capabilities as required, while helping to keep the amount of code
running in kernelspace to a minimum.

Explain iostat, vmstat and netstat.


iostat - Reports on terminal, disk and tape I/O activity.
vmstat - Reports on virtual memory statistics for processes, disk, tape and CPU activity.
mpstat - Report processors related statistics.
netstat - Reports on the contents of network data structures.

Explain File System Hierarchy and brief into for each?


Name some top-level (under /) directories? (etc,bin,usr,var,tmp)
/proc:
procfs is short for process filesystem: a pseudo-filesystem which is used to access kernel information
about processes. Because /proc is not a real file system, It was designed in order to replace the ptrace
system call used for process tracing

What is the difference between binaries in /bin, and /usr/bin?


/bin - would contains the binaries frequently used by the normal user (as well as system administrator)
/usr/bin - would contains the binaries rarely used by the normal user (as well as system administrator)

What is SWAP?
Its an extension of RAM.

How you’ll check the swap usage summary?


cat /proc/swaps
swapon –s
5
How many number of swap files you will create? What is the maximum total size for
SWAP?
Red Hat Enterprise Linux 2.1 supports up to 32 swap partitions; each can be a maximum size of 2GB.
Maximum total swap size is 64GB.
RHEL 3 supports swap size till 1TB

Why SWAP size can’t be more than 2GB ih RHEL 2.1


mkswap supports only 2GB, You have to have fixed mkswap to make swap larger than 2GB

How do you create a swapfile?


Let’s say im running out of SWAP space, what u’ll do in this case.
I would create a swap file for temporary purpose 65Mb swap size
# dd if=/dev/zero of=/data/swapfile.1 bs=1024 count=65536
# mkswap /data/swapfile.1
# swapon –a /data/swapfile.1

And if incase I would need this swap file at boot time permanently
# dd if=/dev/zero of=/data/swapfile.1 bs=1024 count=65536
# mkswap /data/swapfile.1
Add an entry in /etc/fstab file
/data/swapfile.1 none swap pri=5,defaults 0 0
# swapon –a

How to list only the directories inside a directory


ls –l | grep "^d"

What are default permissions for others in a file?


Read Only

How much disk space should you allocate for the /proc filesystem?
We don’t have to. It does not consume any storage space, and it consumes only a limited amount of
memory.

What are Linux Run levels and how do they work


0 halt
1 single user mode
2 multi user mode (No network)
3 multi user mode (with network)
5 X windows
6 Reboot

Init 6
|
inittab
|
/etc/rc.d/rc
|
/etc/rc.d/rc6.d/
6
What is difference between grep & find?
GREP: get regular expression
From grep you can’t search files. Used to search for a string from a file

FIND:
From find you can search by filenames. Used to search for a string from a file

Which command is used to get UID/GID of a user?


Id –u “username”
Id –g “usrname”

What is difference between find and locate?


Locate or slocate (secure locate) uses database to index and quickly search for files on your system.

Find: Search for files in a directory hierarchy

Where’s the locate database stored?


/var/lib/slocate/slocate.db

What are the fields in the passwd file? What do they mean, what do they do?
7 fields
user:x:uid:gid:gecos:home:shell

1st field: user:


2nd field: x: specifies the encoded password is stored in /etc/shadow

5th field
GECOS: GECOS (General Electric Comprehensive Operating System)
Specifies general information about the user that is not needed by the system, such as an office or phone
number.

What are the fields of the shadow file


Stores information about password aging.
9 fields
username:passwd:last:may:must:warn:expire:disable:reserved

username
The User Name
passwd
The Encoded password
last
Days since Jan 1, 1970 that password was last changed
min
The minimum period in days that must expire before the password can be changed
must
Days after which password must be changed
warn
Days before password is to expire that user is warned
Expire
Days after password expires that account is disabled
7
disable
Days since Jan 1, 1970 that account is disabled
reserved
A reserved field

The previous example might then be:


username:Npge08pfz4wuk:9479:0:10000::::

How does enabling shadow passwd's change the functionality of user authentication?

Why is there a /etc/shadow (or similar, differently-named) file? What is in it, and how
Is it different from /etc/passwd?
When a system has shadow passwords enabled, the password field in /etc/passwd is replaced by an "x"
and the user's real encrypted password is stored in /etc/shadow.

How would you enable shadow password?


# pwconv

How would you disable shadow password?


# pwunconv

What are the fields of the fstab file?


6 fields
Fstab is a configuration file that contains information of all the partitions and storage devices and where
should be mounted and how
Device name Mount Point FS type Mount Options Dump FSCK
LABEL=/usr /usr ext3 defaults 1 2

Dump is a backup utility. If its 0, it will not backup the file system
Fsck is a file system check utility. Numbers are define to tell in which order the file system should be
checked.

How you gonna check on which redhat linux version you are working on?
# Cat /etc/redhat-release

How do you find the version of Linux running?


Cat /proc/version
OR
uname -r

How do you findout whether a command is an aliases, bash function, built-in like cd and
type, or executable program?
# Type -all yourcmd

CRON/ANACRON
Whats the difference between CRON and AnaCRON
CRON:
8
cron assumes your system is running. Continuously. (And that crond is running).
AnaCRON:
Anacron uses a config file and a time stamp to determine the last time a task was done. If the tasks is
overdue to be done, anacron makes sure it gets done.anacron does not run continuously. It is a “one shot”
command. It is usually invoked on bootup
Anacron looks at boot-time if something was missed while the computer was off.
Used to control the execution of daily, weekly, and monthly jobs

Define the fields of /etc/crontab


Min h d m dw command
Where:
●min minute (059)
●h hour (023)
●d day of the month (131)
●m month (112)
●dw day of the week (07

How would edit the contents of a crontab?


# crontab –e

How would you list the contents of a crontab?


# crontab –l

Schedule a task to be run everyday 6pm daily


/etc/crontab
* 6 * * * /scriprts/rundaily.sh

When I add a new task to my crontab, I get an e-mail evertime it has been executed. Can
this be avoided in some way?
Yes, append '> /dev/null' to your crontab entry.
Example:
30 04 * * * mydailyscript.sh > /dev/null

What's the difference between a hard link and a soft link?


Hard Link:
hard link is created by the following command
# ln fileA fileB
fileA and fileB have the same inode. How do you know this? Issue the stat command "stat fileA" and
"stat fileB".
Soft Link:
soft link is created by the following command
# ln -s fileA fileC
Here fileC has a different inode than fileA. However, this "different inode" points to the same data as
fileA.

How do you find all the programs, and there location, using sockets or pipes on your
computer?
lsof
9

How do you create directory and subdirectories when the parent directory may exist, in one
command? In other words, create the following directory structure.
/home/user/one/two the command should work whether /home/user exists or not.
mkdir -p /home/user/one/two The -p or "parents" makes the parent directory as needed.

If someone talks about ext2 and ext3 filesystems, what are they most likely running?
Debian or Redhat?
RedHat

How do you create a directory that's sharable to a group that by default will have each file
created as sharable to a group?
Mkdir <dir>
Chmod 770 <dir>

What options to (GNU) tar (1) would you use to decompress and extract everything from an
archive named files.tar.gz into the current directory?
# Tar –zxvf file.tar.gz

If you mistype a password, how do you clear it out to retype the password again?
Ctrl-C.

What are the types of file systems?


Ext2
Ext3
Reiserfs
Jfs
Xfs
iso9660 - CDROM

What is default block size in Linux?

If fsck is running, what is the one thing you shouldn't do?


Not to start any programs
Do not try to fsck on a currently mounted filesystem

What command would you use to check available disk space on all currently-mounted
disks?
Partitions?
# df –h

How would you add a user to your system? What files get modified?"
# useradd <username>
It modifies two files:
/etc/passwd
/etc/shadow

Does EXT3 need to be defragged? If no, why?


10
No.
There is no need to defragment an ext partition (2 or 3) because of the way it arranges the data,

How do you extract a single file from a tarred file?


# tar –zxvf <file.tar.gz> <filename>

Is there a way to change the date- and timestamp on a file?


Yes, this can be done with the 'touch' command using the -t flag.
Example:
Touch -t 200209131600 myfile.txt
This will set the date- and timestamp to the 13th of Sept 2002, 16:00.

How do I remove those enoying ^M chars from textfiles that has been generated on a
Microsoft platform?
Use the 'tr' command to remove them like this:
# cat <thefile.txt> | tr -d '\r'
This will output the new file without the ^M charters to your standard output. Just redirect them using the
'>' char to get the result in to a file like this:
# cat <thefile.txt> | tr -d '\r' > newfile.txt

tr – translate
-d delete
\r return

How do you give a user access to an application or program that needs to run as root
without giving them the root password?
I would use sudo or setuid

What are the steps involving the recompilation of the linux kernel
1. untar the tar file into /usr/src/kernel
2. VI Makefile (change the ver.)
3. make menuconfig or ./config or
4. make deps
5. make bzImage
6. cp /kernel/arc/i386/boot/bsImage to /boot/bzImage
7. cp /kernel/system.map to /boot/system.map
8. make
9. make check
10. make install

How do I find out who is logged into the system?


who

What directory is typically used as scratchspace?


/tmp

How do I stop a UNIX system?


halt,init,shutdown
11
Whats the difference between halt and shutdown
Both are same
What does fsck do?
fixes filesystem errors

What kind of permission would "chmod 755" yeild on a file?


U = rwx, g/o rx

What is an "s" in a file's permission mean?


setuid

What does a "b" as the first letter of a file's permissions mean?


Block special

How do I make a new disk available for files?


mkpart/newpart, mkfs, mount

If I'm logged in as root, what command lets me "become" another user id?
su

What's the difference between "su" and "su -"?


su - run's the user's login files

What command will tell me how busy the system is?


(Load average) top,sar,iostat,vmstat
How to recover a system whose root password has lost?

What is a daemon?

How to put a job in background & bring it to foreground?

How do I see what print jobs are pending?


lpstat, lpc stat, etc..

What’s the startup file for the C shell (or Bourne)?


.login/.cshrc or .profile

What is /etc/inittab?
Startup sequence file

What is the first process to start on a UNIX system, after the kernel?
init

What is the changed time on an inode/file mean?


Last time the inode was modified

What's an indirect block?


Pointer to a list of blocks
12

What is an X Server?
graphical display device,7optional

What are two X Clients?


xterm, xclock, netscape, CDE, etc...

'How about truss/ktrace/strace? What are they good for?

What is LILO?
LILO stands for Linux boot loader. It will load the MBR, master boot record, into the memory, and tell
the system which partition and hard drive to boot from.

What is the main advantage of creating links to a file instead of copies of the file?
A: The main advantage is not really that it saves disk space (though it does that too) but, rather, that a
change of permissions on the file is applied to all the link access points. The link will show permissions of
lrwxrwxrwx but that is for the link itself and not the access to the file to which the link points. Thus if you
want to change the permissions for a command, such as su, you only have to do it on the original. With
copies you have to find all of the copies and change permission on each of the copies.

What is the most graceful way to get to run level single user mode?
A: The most graceful way is to use the command init s.
If you want to shut everything down before going to single user mode then do init 0 first and from the ok
prompt do a boot -s.

What does the following command line produce? Explain each aspect of this line.
$ (date ; ps -ef | awk ‘{print $1}’ | sort | uniq | wc -l ) >> Activity.log
A: First let’s dissect the line: The date gives the date and time as the first command of the line, this is
followed by the a list of all running processes in long form with UIDs listed first, this is the ps -ef. These
are fed into the awk which filters out all but the UIDs; these UIDs are piped into sort for no discernible
reason and then onto uniq (now we see the reason for the sort - uniq only works on sorted data - if the list
is A, B, A, then A, B, A will be the output of uniq, but if it’s A, A, B then A, B is the output) which
produces only one copy of each UID.
These UIDs are fed into wc -l which counts the lines - in this case the number of distinct UIDs running
processes on the system. Finally the results of these two commands, the date and the wc -l, are appended
to the file "Activity.log". Now to answer the question as to what this command line produces. This writes
the date and time into the file Activity.log together with the number of distinct users who have processes
running on the system at that time. If the file already exists, then these items are appended to the file,
otherwise the file is created.

Question 5: What is CVS? List some useful CVS commands. (Asked by Silicon Magic Corp.
people)

CVS is Concurrent Version System. It is the front end to the RCS revision control system which extends
the notion of revision control from a collection of files in a single directory to a hierarchical collection of
directories consisting of revision controlled files. These directories and files can be combined together to
form a software release.
There are some useful commands that are being used very often. They are
cvs checkout
13
cvs update
cvs add
cvs remove
cvs commit

What is PAM?

What is Jouranaling.

The act of moving pages of memory from RAM to virtual memory on a hard drive. Excessive paging is
caused by a lack of actual system memory. In this case the system has to use the hard drive as memory
frequently, and performance is degraded.

What are the main differences between Apache 1.x and 2.x?
What does the “route” command do?
What are the read/write/execute bits on a directory mean?

What is SED?
SED (which stands for Stream EDitor) is a simple but powerful computer program used to apply various
pre-specified textual transformations to a sequential stream of text data.
It reads input files line by line, edits each line according to rules specified in its simple language (the sed
script), and then outputs the line.

What is AWK?
AWK is a complete pattern scanning and processing language, it is most commonly used as a UNIX
command-line filter to reformat the output of other commands.
For example, to print only the second and sixth fields of the date command (the month and year) with a
space separating them, at the UNIX prompt, you would enter:
Date | awk ‘{print $2” ” $6}’

What is a dynamically linked file?


Soft link (created with ln -s). Source and destination files will have the different inode. If dest removed
source will be available. If source removed dest also will available but no where to go.

What is a statically linked file?


Hard link (created with ln). Source and dest will have the same inode. Making two different copies causes
more disk space due to redundancy.

What's your biggest fuck up, and how did you fix it?
Now tell me how you would a) mirror the rootdisk, b) grow an existing filesystem, or c)
modify the partition table for a disk on that OS.
Do you consider the open source movement to be a threat to the commercial software
industry?

Do I need to reboot the machine after increasing the maximum number of open files at
/etc/security/limits.conf

No
14

/etc/security/limits.conf
* - nofile 2048

Verify this with the following command:


ulimit -n
ulimit -a

Look for line:


open files (-n) 2048

System Monitoring

How do I change the priority of a process?


Nice, renice, priocntl (SysV.4)

Like when you use 'uptime' (or 'w'), what do the three numbers after 'load average'
represent?

What is a zombie process and how do you find them?


When a process creates a child process “fork () command" and that child process terminates, information
about the child process (CPU time, memory, etc.) exists for the parent to fetch. The parent can use the
"wait" or "waitpid” to fetch this signal. The child process becomes a zombie as soon as it finishes; but,
the SIGCHLD hasn't been caught.

ps -aux, will show all processes. Look for "Z" in that stat and defunct under the command.

Note: wait may still produce zombies. This can happen of child A terminates, and its signal has been
caught. While this signal is being process child B terminates. Since these signals won't queue, child B
could stay in the zombie state. It's safer to use the waitpid call.

Describe the various metrics and procedures you would use to evaluate the performance
and system utilization of a linux machine

What are some shells you'd find on a Unix box?


Answer should include at least: Bourne shell (sh), C-Shell (csh) and Korn shell (ksh). Might also mention
Tom's C shell (tcsh), Bourne-again shell (bash), or z-shell (zsh).

What are some other common unix scripting "languages?"


Looking for sed, awk, perl, tcl/tk, etc

What are the standard editors on a Unix system?


ed and vi. Others are emacs and pico

What common unix utility do you use to compile complex C programs?


Make.
15

How would you find the most recently changed file in a directory?
ls –ltr

How would you find all the processes being run by user "joe?"
System 5: ps -fe | grep joe
Berkeley: ps -auxww | grep joe

There are two unix machines named A and B that are on the same subnet. Describe to me, in as much
detail as possible, what happens when I type "telnet B" from a terminal on machine A.

Linux Boot Process

How would you grab the middle 300 lines of a 1000 line file, grab the second field of every
line in that range, and sort the result alphabetically using only piped commands from the
toolbox?

Backup and Restore

What is a level 0 backup?


Q1: level 0 backup is normal or full backup. A normal backup disregards
The archive bit in all files and backs up all files and folders selected, regardless of when they were
modified. A normal backup is the most complete type of backup, and the only type of backup that can be
used to back up the registry and other critical system files. A normal backup takes the longest amount of
time to back up and recover. A normal backup clears the archive bit on all files after backing up.

Q2. An incremental backup is the quickest method for performing backups of data. An
incremental backup only backs up files that have been created or modified (their archive bit
is set to 1) since the last normal or incremental backup. An incremental backup also clears
the archive bit (sets the archive bit back to 0) of all files that it backs up.

Q3. Reinstall the os.


start -> run -> type “ntbackup” -> ok -> next -> select restore -> next -> select backup files -> next ->
finish

Basic Networking

What's a socket? What's a port? How do you reserve them? how are they related? How do
you find out what's going on with them on a system?
Normally, a server runs on a specific computer and has a socket that is bound to a specific port number.
The server just waits, listening to the socket for a client to make a connection request.
Socket: IP + Port

Port: is a virtual data connection. Programs binds on the port to exchange the data.

What would you use to view the contents of TCP packets on the network
16
# tcpdump

How would you check TCP packets coming from Remote IP?
# tcpdump –i <interface> src <IP>

How do I set my SSH server to accept only protocol 2 connections?


Change the Protocol Parameter to “2”
/etc/ssh/sshd_config
Protocol 2
service sshd restart

Q. How do you setup multiple IP address on one NIC (Network Interface Card)...assume
ethernet.

What should be found in the /etc/hosts file?


How would you check the route table on a workstation/server?
Trouble Shooting

4. Where would you look for startup and error messages on a UNIX server?
/var/adm/messages (/usr/adm/syslog on HP-UX boxes). They can also run the command dmesg.

TROUBLESHOOTING

How would you restore GRUB boot loader (MBR)


1. Boot from RHEL CD 1.
Boot: linux rescue
2. chroot /mnt/sysimage
3. grub-install /dev/hda3

Type "grub" which makes a GRUB prompt appears.


1. Type "find /boot/grub/stage1". You'll get a response like "(hd0)" or in my case "(hd0, 2)". Use whatever
your computer spits out for the following lines.
1. Boot from RHEL CD 1.
Boot: linux rescue
2. Grub> root (hd0, 2)
3. Grub> setup (hd0, 2)
4. Grub> quit

KERNEL COMPILATION

When would you want to reconfigure the kernel and how would you do it?
If incase your hardware doesn’t supports, Enabling SMP

RAID

RAID
17
===
Fs it advisable to put a swap portion in RAID1 (mirroring?) pros & cons?

What is RAID?
Redundant Array of Independant Disks, striping, mirroring, etc..

What is striping?
A technique for spreading data over multiple disk drives. Disk striping can speed up operations that
retrieve data from disk storage. The computer system breaks a body of data into units and spreads these
units across the available disks. Systems that implement disk striping generally allow the user to select the
data unit size or stripe width.
Disk striping is available in two types. Single user striping uses relatively large data units, and improves
performance on a single-user workstation by allowing parallel transfers from different disks. Multi-user
striping uses smaller data units and improves performance in a multi-user environment by allowing
simultaneous (or overlapping) read operations on multiple disk drives.

What are the different RAID levels?

What is RAID 0? RAID’s are of 2 types H/W and S/W RAID.


RAID 0 is basically a type of S/W RAID that ships with Windows Server...
It is a highly performance striped volume without parity.
The data is distributed into different parts and the placed over different volumes and hence improving the
response time. You can use this with disks Betw. 2 to 32. You can not mirror a striped volume rather u can
make fault toulerent by backing it up.

What is RAID 0+1? Why is it better than 0?

What is RAID-5?

What is striping?
RAID levels; pros & cons of different levels; what is RAID 1+0

Mail Server

6. If you send an e-mail to someone and it comes back "Message Undeliverable", what could be
wrong?
7. You can receive e-mail, but can't send any. What is wrong?

- Name at least two types of server process that can be an open mail relay but are not SMTP server
processes.
- Explain in what ways each of the IMAP, POP3, and SMTP protocols are used.
- Give at least two differences between IMAP and POP3.
- Explain at least one way that SMTP is used that does not involve a mail user agent.
(Bonus points for creative answers.)
- What is an open mail relay?
- How would you test an SMTP server to see if it is an open mail relay?
- Name at least two types of server process that can be an open mail relay but are not
18
SMTP server processes.
- What are the basic commands to send a message to an SMTP server?
(Hint: Begin with HELO.)
What is /etc/aliases? mail aliases for systems

Is there an easy way to find out which mailservers that handles incoming e-mail for a domain?
Answer
Yes, this can be done with the 'host' command. Have a look at the manpage for more information on how
to use it.

Example:

# host mreriksson.net
mreriksson.net has address 62.20.106.119
mreriksson.net mail is handled (pri=10) by mail.mreriksson.net
#

Is there some interactive way to view active processes in the system based on their size or cpu-usage?
Answer
Many unix/linux systems comes with a command called 'top' that does this. See the manpage for top for
detailed information on how to display processes based on cpu- or memory-usage.

Web Server
How to install and configure an Apache Web server.
How do I know what modules I have available in my installation of apache?

Answer
Execute: 'httpd -l', this will show you a list of all available modules.

--------------------------------------------------------------------------------

Question 2
What user should the stand-alone server is run as?

Answer
It should be run as root to be able to attach to port 80. Apache will then spawn it's children with the owner
you specify in the httpd.conf file. (Which should be a user without any additional access)

--------------------------------------------------------------------------------

Question 3
When would I use the inetd daemon to execute Apache?

Answer
Since running Apache from inetd will slow down new client connections quite alot, it's best suited for
servers which doesn't handle alot of requests, and would are low on memory.
19
Note: To run Apache from inetd can also make life a bit easier when working with apaches configuration
files, since they will be re-read as soon as a new client connects.

--------------------------------------------------------------------------------

Question 4
Can I prevent a user to override my global settings with the .htaccess file?

Answer
Yes, you can do this with the 'AllowOverride' option in the config file.

Example:
<Directory />
AllowOverride None
</Directory>

This will prevent users from using the .htaccess file in all directories.

--------------------------------------------------------------------------------

Question 5
Is the UserDir module safe to use?

Answer
The UserDir module is said to be safe if the html pages arn't stored in the users homedirectory. Instead
you should set up an additional directory for each user outside it's homedirectory, and use the following
configuration:
<IfModule mod_userdir.c>
UserDir /home/httpd/*/
</IfModule>

And for each user have a directory, which they own, under /home/httpd/, with the same name as the user.
This will enable users to have an URL like http://host.fo/~user

--------------------------------------------------------------------------------

Question 6
How should I configure Apache to make it serve WAP pages?

Answer
You should add these lines to your Apache configuration:

AddType text/vnd.wap.wml .wml .wml


AddType Application/vnd.wap.wmlc .wmlc
AddType text/vnd.wap.vmlscript .wmls
AddType Application/vnd.wap.wmlscriptc .vmlsc
AddType image/vnd.wap.wbmp .wbmp
20

The you should locate the 'DirectoryIndex' directive in the file, and add the 'index.wml' tag to it, should
look something like this afterwards:

<IfModule mod_dir.c>
DirectoryIndex index.html index.wml
</IfModule>

This tells Apache to look for a file named index.wml if no file is specified in the requested URL.
(Example: http://host.fo/wap/)

Note: There might be more arguments here if you, for example, have installed support for PHP or Perl.

--------------------------------------------------------------------------------

Question 7
How do I use Apaches user authentication (htaccess)?

Answer
First of all, you need to configure your Apache server to allow usage of the .htaccess file for
authentication control. This is done by adding the keyword 'AuthConfig' to the 'AllowOverride' option in
the current <Directory> block. Based on the default configuration, you might end up with something like
this:

<Directory />
Options FollowSymLinks
AllowOverride AuthConfig
</Directory>

This enables the usage of .htaccess in all directories in your file system. (For security reasons, you might
want to limit this to a certin directory instead of the file system root)

To limit the access to a directory and all its sub-directories, you should create a file called '.htaccess'
within it. This file should contain the following options:

AuthName ZoneName
AuthType Basic
AuthUserFile /usr/local/etc/apache/htusers
Require valid-user

AuthName configures the name of this authenticated zone. By defining the same name in several zones,
they can be included in the same authentication session, and thereby only require the user to login once to
access all zones on the site.

AuthType defines the type of authentication that should be used; the 'Basic' type is the most widespread
one and will provide the best compatibility.
21
AuthUserFile referes to the htpassword file to fetch login information from. This file can be generated by
using the htpasswd(1) command provided with the Apache package, or via the online tool availible at
http://mreriksson.net/online/htgenerator/ .

The Require option tells Apache which usernames to accept for this zone. Using the 'valid-user' keyword
will allow all users defined in the AuthUserFile to login. The 'user' keyword allows a whitespace
separated list of usernames that are allowed from the given userfile. Example: Require user user1 user2
user3

--------------------------------------------------------------------------------

Question 8
Is there a way to allow virtual hosts to have their own cgi-bin directory?

Answer
Yes, this can be specified using the ScriptAlias-option in the <VirtualHost> block that you want to enable
this for.

Example:

<VirtualHost *>
ServerAdmin [email protected]
DocumentRoot /home/httpd/www.foo.bar/public_html/
ServerName foo.bar
ServerAlias www.foo.bar
ScriptAlias /cgi-bin/ /home/httpd/www.foo.bar/cgi-bin/
ErrorLog /home/httpd/www.foo.bar/logs/error_log
CustomLog /home/httpd/www.foo.bar/logs/access_log common
</VirtualHost>

Note:
It's important that you end the path to the cgi-bin directory with a slash (/), or Apache will fail to find your
cgi's.

--------------------------------------------------------------------------------

Question 9
When using ScriptAlias to allow site-specific cgi-bin-directories, is there a way to require the user to log
in before the cgi's can be accessed?

Answer
Yes, this can be done in the normal way with the htaccess-system. Just place an .htaccess-file that
configures the authentication-requirements in the cgi-bin directory.

DNS Server
22
- What is found in a DNS zone file? (Assume BIND running on a POSIX operating system.)
- What is the purpose of an MX record?
- What data is transferred in a DNS zone transfer?
- In what circumstances would you permit systems outside of your local/corporate network?
To perform DNS zone transfers? In what circumstances would you not?
2. What files are used to configure DNS on a UNIX BOX?
/etc/resolv.conf and /etc/nsswitch.conf
-
Know the options available in /etc/named.conf.

DNS
-------------

# what is DNS
DNS stores the database of domain name and its corresponding IPs.
It is used for translating domain name to IP and vice versa

# What port no does DNS uses?


53

# What are the types of DNS?


Caching Name Server named.ca (root servers)
Authoritive Name Server

# How many Root Name Servers worldwide


13

# what is the configuration file?


/etc/named.conf
defining Zones
/etc/resolv.conf
defining Name Server
/etc/nsswitch.conf

# Where would you define the Zone Records?


/etc/named.conf

# What are the types of Resource Records?


NS
A
PTR
CNAME
MX Mail Exchanger

Q. What is use of CNAME


CNAME is used for giving an alias for Domain name

Q. How to check any RR record for domainname ?


# dig domainname
# nslookup domainname
23

# dig MX domainname
# nslookup -query=NS linobox.com

Q. What is found in a DNS zone file


Resource Records

Q. What is the purpose of an MX record?


To define the Mail Server
Q How one can configure round robin in DNS server in linux
www.dgshiping.com IN A 1.2.3.1
www.dgshiping.com IN A 1.2.3.2
www.dgshiping.com IN A 1.2.3.3

Q How to set MX Priority in DNS Server


Eg Priority can be given for any three Server
MX 10 mailhost
MX 100 mailhost.matrix.co.in.
MX 200 www.matrix.com.

Q on what ver. The BIND was running?


9.2 ver.

NFS Server

What is NFS?
NFS is Network File System
It is basically used for sharing files & directories on a network.

What is its job?


allow machines to mount a disk partition on a remote machine

Why is it necessary to start portmap service before nfs service?


Portmap serves RPC calls which is necessary for NFS

What is RPC?
Library routines for remote procedure calls
These routines allow C programs to make procedure calls on other machines across the network.

On which port NFS runs?


2049

Which service is required for NFS?


# service portmap start
# service nfs start
24
Which daemons are required for NFS?
Rquotad
Mountd
Nfsd
Nlockmgr

Name the configuration file for NFS?


/etc/exports

How would you share /home/exports to a specific machine (192.168.20.10) with read/write permission?
# vi /etc/exports
/home/exports 192.168.20.10(rw)

# What is the default permission for NFS mount point?


Read only with root_squash option

what do you mean by “no_root_squash”


no_root_squash - Allows root users on client computers to have root access on the server. Mount requests
for root are not be mounted to the anonomous user. This option is needed for diskless clients
no_root_squash will make sure root users on the clients have actual root permissions on the nfsd as well

What is root squash?


Root users mounted as nobody user and privileges given for ‘others’ (other users) on mounted directory
will be assigned for root user.

How to mount NFS file system remotely?


# mount –t nfs 192.168.20.100:/home/exports /nfsmount

Remote NFS file system should be auto mounted on startup?


# VI /etc/fstab
192.168.20.100:/gome/exports /nfsmount nfs defaults 0 0

# What command would you use to see running services


rpcinfo –p

Who developed it?


Sun

NFS is a RPC protocol that runs atop UDP and IP. Explain
RPC is simply a system call that is processed by a remote server. When a prg makes an I/O call, for an
NFS file, the call is intercepted by the NFS file system and sent over the NW to the remote server for
Processing.

The NFS startup script is ______________


/etc/rc.d/init.d/nfs

What is the name of the NFS binary?


/usr/sbin/rpc.nfsd
25
The NFS config file is __________________
/etc/exports

Which daemon/s should be started to enable an NFS server?


portmap, nfs actually portmap*, rpc.nfsd

The NFS daemon starts up some helper daemons alongwith? What are they?

A: rpc.rquotad,rpc.lockd, rpc.mountd

9. These helper damons, like all daemons, needs ports to bind to [monitor] and
run on. Are these ports given in /etc/services?

A: No

10. Then how do these daemons get ports?

A: portmapper daemon is used to dynamically assign port nos to these RPC


Services which can be seen by "rpcinfo -p". In /etc/rpc

11. What port does NFS use?

A: 2049

12. And how do you know that?

A: /etc/services

13. What port does portmapper use?

A: 111

14. RPC services have their own config file. What is it?

A: /etc/rpc

15. Display a list of NFS shares from a client if the server is shiva

A: showmount -e shiva

16. How does one check the status of a NFS server?

A: showmount -e localhost

17. Which file is configured on a NFS server to facilitate sharing across a NW?

A: /etc/exports

18. How does one refresh NFS shares?


26
A: exportfs -ra

19. What does this refresh mean?

A: Telling the NFS daemon to re-process /etc/exports and rebuild the NFS
mount table config file, which is...., cannot say, since it a question.
See later.

20. Which NFS file shows the export permissions of all exported directories ?

A: /var/lib/nfs/rmtab

21. Which NFS file shows the info about currently exported dirs, which 'mountd'
reads when processing client mount requests and is rebuilt every time
'exportfs' is run?

A: /var/lib/nfs/xtab

22. How would you check who [remote hosts ] were using your NFS server and
Which files were in use?

A: nfsstat -a

23. I wish to temporarily export a dir /jokes on shiva to brahma with r/w
perms. How?

A: exportfs brahma:/jokes -o rw

24. Temporarily? What's that?

A: It isn't configured in /etc/exports and on a 'service nfs restart'


would no longer exist!

25. How would you do the same permanently ?

A: Configure /etc/exports : /jokes brahma(rw)

26. Then how would you unexport this temporary dir, if I did not wish to do a
'service nfs restart'?

A: exportfs -u brahma:/jokes

27. Can I unexport all exported dirs w/o shutting down/restarting the NFS
daemons? How?

A: Yes.

28. How?

A: exportfs -ua
27

29. How would you know there are no shares now which are exported?

A: showmount -e

30. Explain the following /etc/exports file on NFS server ganesh:

/ shiva brahma

A: Exports the entire / filesystem on ganesh to remote hosts shiva and


brahma in r/o mode

31. How would a user foo on a remote client brahma mount this on her local
empty dir /win ?

A: Cannot. Only root can do remote NFS mounts. This is how:

Mount ganesh: / /win

32. Can a user foo delete any files in the NFS share win?

A: No

33. What about the local root?

A: No

34. Why not?

A: Local root is squashed by the NFS server by default

35. squashed ?

A: Local root is converted to another user.

36. So what user is this local root squashed to?

A: nfsnobody.

37. And is this a VLU ?

A: Yes!

38. And what is this nfsnobody's user/group id?

A: 65534/65534

39. Did you create this user?

A: No way! It's what's called a system a/c. Created on install by RH


28

40. Now examine this /etc/exports file on ganesh:

/ shiva(rw) brahma(rw,no_root_squash)

Can local root on both hosts now delete files in /?

A: No. Only local root on brahma can!

41. Why can't user foo on shiva delete files on ganesh. It does have NFS'
share's rw perms on it. So ?

A: ls -ld / on ganesh show this : drwx-r-xr-x

Although NFS does allow it, dir perms of the OS do not for
[no "w" for 'others'].
'Root', meanwhile, has also been squashed!

42. Explain the following /etc/exports file:

/ shiva(rw)

A: Exports the entire filesystem to machine shiva with r/w access.

43. Explain the following /etc/exports file [Note the space]:

/ shiva (rw)

A: Exports the entire filesystem to machine shiva with r/o access and to the
entire world with write access. Precisely what you did not want, in reverse!

44. Explain the following /etc/exports file:

/ 192.168.0.

A: Exports the entire FS to all m/cs on segment 192.168.0 with r/o access.

45. Explain the following /etc/exports file :

/projects proj*.local.domain(rw)

A: This is an example of wildcard hostnames.

46. Explain the following /etc/exports file:

/usr @trusted (rw)

A: This is an example of wildcard netgroups [NIS]. Do u believe in NIS?


29
47. Explain the following /etc/exports file:

/home/foo pc001(rw,all_squash,anonuid=100,anongid=100)

A: These options explicitly set the uid and gid of the anonymous account
which would normally have been nfsnobody [65534/65534]. So why bother?

Primarily useful for PC [M$] / NFS clients, where you might want all
requests to appear to be from one user.

Here, all requests are mapped to uid 100 (which is supposedly that of
user foo).

48. Explain the following /etc/exports file:

/pub (ro,insecure,all_squash)

A: Exports the public FTP directory to every host in the world, executing
all requests under the nfsnobody account.

The insecure option in this entry also allows clients with NFS
implementations that do not use a reserved port for NFS.

49. Remote NFS client brahma mounts /jokes on local dir /funny using the
following :

[root@brahma root] # mount ganesh:/jokes /funny

Now, for some reason, the NFS server on ganesh goes down.
What will happen on brahma?

A: Client will hang indefinitely.

50. Would you be able to interrupt with the keyboard?

A: No

51. What would you do?

A: Use intr

52. How would you use a timeout?

A: Use soft

53. You suddenly get smart overnite. How would you do all this before mounting
a NFS share?

A: mount ganesh:/jokes /funny -o soft,intr


30
54. How would you further speed up NFS Client accesses?

A: mount ganesh:/jokes /funny -o soft,intr,rsize=8192,wsize=8192

55. How would you automate a NFS Client with all the above considerations in
mind?

A: In /etc/fstab append the following line :

ganesh:/jokes /funny nfs soft,intr,rsize=8192,wsize=8192 0 0

and make sure the netfs daemon starts at boottime. And of course
portmap

56. What is the default for the read and write buffer ?

A: 4096

57. How many columns does /etc/fstab have?

A: 6

58. What are they?

A:
* Block sp. device [devdrv], or remote FS to be mounted.
One can use LABEL too which points to a hardware partition.
* Mt point for the FS
* Type of FS
* Mount options associated with the FS
* Dump details
* fsck

59. The fifth field of /etc/fstab contains mount options associated with the
FS viz. ext3.
What does defaults mean?

A: rw,suid,dev,exec,auto,nouser,async

60. Explain them

61. How would you remount all the FS's in /etc/fstab w/o rebooting?

A: mount -a

62. By default, can a user mount a cdrom?

A: Yes

63. How would you disallow this?


31

A: The fifth field of /etc/fstab for cdrom contains noauto,owner.


Change to owner to noowner!

64. What is a synonym for owner?

A: user [nouser]

65. foo mounts a cdrom and logs out? Can bar log in and use his own cdrom?

A: No. He will have to unmount foo's cdrom first, for which he has no
permission.

66. So how would you help bar!

A: No problem. Change owner to users!

67. You just said that owner and user and synonymous! Can I use 'owners' above ?

A: No ! Will not work!

68. The fifth field of /etc/fstab for cdrom contains noauto,owner.


Is it a good idea to change the noauto to auto?

A: No. If you forget to have a CD in the drive on boottime, system could


hang!

69. Are there any GUI tools to configure a NFS server?

A: Yes. redhat-config-nfs.

70. I tried it but it is not working? Help me.

A: The file /etc/exports must be missing. It must, at the very least,


be touched!

Q Which of the following packages must be installed to host an NFS server? a. knfsd
b. knfsd-clients
c. netfs ====
d. portmap =====

Q. Which daemon/s should be started to enable an NFS server?


A Portmap , nfsd

Q. What port does NFS use?


A. 2049

Q. Display a list of NFS shares from a client if the server is


shiva.bom.labs.net
Ans : showmount –e shiva.bom.labs.net
32

Q. How does one check the status of a NFS server?


A. showmount –e shiva.bom.labs.net

Q. Which file is configured on the NFS server to facilitate sharing across


a Network?
A. /etc/exports

Q. How does one refresh NFS shares?


A. exportfs -r

Q. How many columns does /etc/fstab have?


A. 6 feilds

Q. Which of the following lines would work in /etc/exports?


A. /root 192.168.0.0/255.255.255.0 (ro) ========
B. /home/mike 192.168.0.0/24
C. WORKGROUP
D. mount -t nfs nfsserver: /home/shared

More questions: 572

You have just added a new NFS share to the appropriate file. What must you do?
To activate the share?
A. reboot
B. exportfs -a =======================
C. ndc restart
D. server nfs start
E. mount -A

Q. How can I see what directories are being shared via NFS on a remote host
Called fileserver?
A. ping fileserver
B. mount -a -t NFS fileserver
C. show mount -e fileserver =======================
D. stalk --query fileserver
E. None of the above

Q. What is Portmap?

It servers RPC calls


Converts RPC program numbers intp DARPA protocol numbers

Q. What is RPC?

Remote Procedure Calls


33
It is a set of C programs which make procedure calls on the server
(remote machine)

Samba Server

Proxy using Squid

Firewall (IPTABLES)

What is DMZ
What is Bastion Host
What do you know about Firewalls?

Printing

What is the lp command?


How can you find out the status of your print job?
What command would you enter to cancel a print job
How do I install a new printer?
lpadmin, /etc/printcap
How do I setup a printer? lpadmin, printcap, YMWV

Shell Programming

Write a script to convert all DOS style backslashes to UNIX style slashes in a list of files.

How do I test for the presence of a file in Bourne Shell? test -f


___ In a shell script, how do I print the scripts arguments? $@ $* or $1..$2..
___ How do you make a shell-script executable?chmod ___ script
___ What is the difference between ' ` and "? Protect, Process and Group
___ How do I connect processes, so stdout of one becomes stdin of another? pipes
___ How do I redirect stderr under a Bourne Shell? 2>
___ How do I determine the home directory of a user in a shell script? $HOME, ~, /etc/passwd
___ What is a regular expression? pattern matching language
___ Explain shell job control. fg,bg,&,^Z
___ Whats the differences between a Bourne and C-Shell? startup file, script syntax, etc..
___ How are new processes created? fork/exec

You have 20 servers that need to be updated named server01,server02...server20. Write a bash script to
update all the computers, assuming they all use ssh, with the account bozo.
Ans:
34

#!/bin/bash
user="bozo";
updatecmd="ls -l"; # put in rpm command here
errorfile="updatelog";
for i in `seq -w 20`
do
ssh "${user}@server$i" $updatecmd || echo "Error on server $i >> $errorfile";
done

The command seq -w 20 pads with the necessary zeros (01,02,03...09).


The || executes only the left side on success. However, if the ssh fails, the right side is executed and an
error message to piped to the file.

How do you pass and use a command variable to an awk script?

How can you easily print quotes in an awk script? U sing a sed script print only the
data between "<start>.....</start>" in a file.

How do you create a C like for loop in Bash?

How do you find the length of an array in bash?

You have 20 servers that need to be updated named


Ans:
Yours is woefully unportable. For starters, you can't rely on bash.
Second, you can't rely on GNU-specific tools like seq.

> for i in `seq -w 20`

If you're using bash, why add an extra shell invocation here?

for i in {01..20} should get the same effect in recent versions of bash2.

Write a regular expression (or sed script) to replace all occurrences of the letter ‘f’, followed by any
number of characters, followed by the letter ‘a’, followed by one or more numeric characters, followed by
the letter ‘n’, and replace what’s found with the string “UNIX”.
Write a script to list all the differences between two directories.
Write a program in any language you choose, to reverse a file.

PERL
What does the @ in a variable indicate? its an array
___ What's the current version of Perl? 4 or 5 prefer 5. 5.005 is MRV
___ What is a Hash? a key-data pair type of array variable

ADVANCE LINUX QUESTIONS

8. How do you create a file that even root can't remove?


Ans:
35
You't can't really; but, the "chattr +i file" command can make a file immutable. This file can't be removed
until "chatt -i file" is performed. True, even root can't remove a file with the immutable attribute set.
But, root can unset this attribute, then, delete the file.

What is an inode?
Pointer to block of disk, referenced in a directory
The inode contains information about the file size, file location, ownership, etc. Plus, it contains a pointer
to the first few blocks of data in the file.

What is a superblock and what kind of data is in it?


Any file system broken enough to need the alternate superblock is too broken to use... after all, that is why
you have backups.

Any Unix today that requires one to play with the file system at the superblock level is also too broken to
use in any kind of production environment. It is simply not "production quality," let alone "state of the
art."

All that kind of stuff went away with the development of fsck some 20+ years ago.

While playing with superblocks and file system structure may be fine on a hobby system, a commercial
system cannot afford the downtime, the introduced lack of reliability associated with playing with the file
system on the bit level or the time while someone plays -- that time is better spent on recovery which you
are willing to "bet the company on."

FIND
Using the find command how do you find directory names that "do not contain" a
particular file?

Using the find command, how do you find all files with the immunitable attribute set?

Write a command to find all of the files which have been accessed within the last 30 days.
find / -type f -atime -30 > December.files
This command will find all the files under root, which is ‘/’, with file type is file. ‘-atime -30′ will give all
the files accessed less than 30 days ago. And the output will put into a file call December.files.

NET
What is the difference between IP Masq and Proxy?

SSH

How would I configure sshd to not ask for a password when connecting with a given user from a
certain host?
The best solution for this is to create a DSA key which can be used to authorize you when you log into the
computer. This is done in two steps, 1) Create the key, 2) Transfer the public part of the key to the server.

Step one:
36
On the machine which you want to connect from, execute the following command:
ssh-keygen -b 768 -d -f ~/.ssh/id_dsa -P ""

This will create two files under .ssh/ in your homedirectory. They will be called 'id_dsa' and 'id_dsa.pub'
which contains the public (id_dsa.pub) and the private (id_dsa) parts of your key.

Step two:
The public part of your key will now need to be transfered to the server which you want to connect to
without entering a password. This can be done using the 'scp' command provided with most ssh clients:
scp ~/.ssh/id_dsa.pub [email protected]:~/.ssh/authorized_keys2

In reality, you should just find a way to transfer your '.ssh/id_dsa.pub' file to the remote machine, rename
it to 'authorized_keys2' and place it under '.ssh/' in your homedirectory. Also, if you want to add more
keys to the same account on a server, you'll just append the data in your new id_dsa.pub file to the
.ssh/authorized_keys2 file on the server.

Note: This solution is based on the ssh v2.0 protocol since it's more secure than v1.x in general. Therefor,
if your ssh client supports v1.x and the server is configured to try that version first, you'll probably have to
tell the client to use v2.0, or you will get a password question anyway. (With OpenSSH, this is done using
the '-2' flag)

1) How to create alternative super user in linux


2) How to add swap space
3) How to add hard disk. & create file system
4) How to find password less users in linux / solaris
In solaris #logins –p
5) how to change shell for user
6) how to check free disk space
7) how to find kernel information
8) how many partition u create on single diak
9) what is maximum partition size supported by linux
10) what is RAID ---
11) Mnimum nos. of HDD reqired for RAID 0,1,5 & 0+1
12) what is OS hardening
13) what is awk
14) what is sticky bit
15) is use of setuid & setgid
16) what u will do if any partition is full
17)

Maximum Number of Partitions


Please note that under Linux maximum 63 IDE partitions can be created and 15 SCSI partitions can be
created per disk.

You might also like