/etc directory contains most of the basic Linux system-configuration files.
adjtime - Holds to data to adjust the hardware clock.
aliases - Can contain distribution lists used by the Linux mail service.
bashrc - Sets system-wide defaults used for bash shell users.
cdrecord.conf - Contains defaults used for recording CDs.
crontab - Sets cron environment and times for running automated tasks.
csh.cshrc (Or cshrc) - Sets system-wide defaults for csh ( C shell ) users.
exports - Contains a list of local directories that are available to be shared by remote computers using the Network File System.
fedora-release - Contain a string identifying the current Fedora core release.
fstab - Identifies the devices for common storage media and locations where are mounted in the Linux system. This is used by the mount command to choose which file system to mount.
group - Identifies group names and groups IDs that are defined on the systems. Group permissions in Fedora are defined by the second of three sets of rwx (read, write, execute) bits associated with each file and directory.
gshadow - Contains shadow passwords for groups.
host.conf - Sets the locations in which domain names are searched for on TCP/IP networks. By defaults, the local hosts list is searched, then any nameserver entries in resolv.conf.
hosts - Contains IP addresses and host names that you can reach from your computer.
hosts.allow - List host computers that are allowed to use certain TCP/IP services from the local computer.
hosts.deny - List host computers that are not allowed to use certain TCP/IP services from the local computer.
inittab - Contains information that defines boots, shuts down, or goes into different states in between. This is the most basic configuration file for starting Linux.
issue - Contains the lines that are displayed when a terminal is ready to let you log into Fedora from a local terminal, or the console in text mode.
issue.net - Contains login lines that are displayed to users who try to log in to the Linux system from a computer on the network using the telnet service.
lilo.conf - Sets Linux boot loader (lilo) parameters to boot the computer.
man.config - Used by the man command to determine the default path to the location of man pages.
modules.conf - Contains aliases and options related to loadable kernel modules used by your computer.
mtab - Contains a list of file system that are currently mounted.
mtools.conf - Contains settings used by DOS tools in Linux.
named.conf - Contains DNS settings if you are running your own DNS server.
ntp.conf - Includes information needed to run the network time protocol (NTP).
passwd - Stores account information for all valid users for the system.
printcap - Contains definitions for the printers configured for your computer.
profile - Sets system-wide environment and start-up programs for all users.
protocols - Sets protocols numbers and names for a variety of internet services.
redhat-release - Contains a string identifying the current Red Hat release.
resolve.conf - Identifies the locations of DNS name servers computers that are used by TCP/IP to translate Internet host domain names and numbers.
rcp - Defines remote procedure call names and numbers.
shadow - Contains encrypted passwords for users who are defined in the passwd file.
shells - Lists the shell command line interpreters that are available on the system as well as their locations.
sudoers - Sets commands that can be run by users, who may not otherwise have permission to run the command, using the sudo command.
syslog.conf - Defines what logging messages are gathered by the sys logged daemon and what file they are stored in.
mtools are mostly DOS commands that have the letter m in front of them and that run in Linux. Using these commands, you can easily work with DOS files and file system.
Command
Function
mattrib
Which is used to change an MS-DOS file attribute.
mbadblock
Which tests a floppy disk and marks any bad blocks contained on the floppy in its FAT.
mcd
To change the directory.
mcheck
Which is used to verify a file.
mcopy
To copy a file.
mdel
To delete a file.
mdeltree
Which delete an MS-DOS directory along with the files and subdirectories it contains.
mdir
Which lists a directory's contains.
mformat
Which is used to format a DOS floppy disk.
minfo
This command is used to print information about a DOS device, such as a floppy disk.
mkmanifest
This command is used to create a shell script that restores Linux file names that were truncated by DOS command.
mlabel
The DOS label command, which is used to make a DOS volume label.
mmd
Which is used to create a DOS directory.
mmount
This command is used to mount a DOS disk in Linux.
mmove
Which is used to move a file to another directory or rename it.
mrd
Which is used to remove a DOS directory.
mren
Which is used to rename a DOS directory.
mshowfat
This command is used to show the FAT entry for a file in a DOS file system.
mtoolstest
This command is used to test the mtools configuration files.
mtype
Which is used to display the contents of a DOS file.
mzip
This command is used to performs operations with zip disks including eject, write protect and query.
mdu
The Linux du command, which is used to show the amount of disk space used by a DOS directory.
II. USING DOSEMU:
dosemu does not come with Fedora Core distributions. Download the dosemu RPM file from "dosemu.sourceforge.net".
If it were running DOS then you can use dosemu.
The following commands can be used to start dosemu with in Linux.
dosemu
Starts the DOS emulator in its shell.
xdosemu
Starts the DOS emulator in its an X term window.
dosdebug
Starts a debug programs to view information and error messages about a running DOS program.
Note: Basic information about your DOS environment is set in the "/etc/dosemu/dosemu.conf" file.
If you want other users on your Linux system to use DOS, however, edit the "/etc/dosemu.users" file.
#vi /etc/dosemu.users
root c-all
all c-all
RUNNING MICROSOFT WINDOWS APPLICATIONS WITH WINE
The WINE project ( www.winehq.com ) has been making great strides in getting applications that were create for Microsoft Windows to run in Linux and other OS.
To get WINE for your Fedora system, you can go to the following places.
When you install the wine package in Fedora Core, the package creates /etc/wine/wine.conf and /etc/wine/system.reg files that, like the windows registry, identity the locations of components an application would need in a Microsoft Windows operating system.
The location of the basic Microsoft Windows operating system directories for wine is the $HOME/.wine/c directory for each users, which looks like the c: drive to wine. The /usr/share/wine-c directory contains the system-wide version of this directory that each user can point to.
MICROSOFT WINDOWS DRIVE LETTERS IN WINE
Microsoft Description
Windows Drive Letter Or Name
Driver letters Linux Directory
In wine Linux Device Name (if application)
floppy
A:
/mnt/floppy
/dev/fd0
Hard disk #1
C:
$HOME/.wine/c
/usr/share/wine-c
CD-ROM
D:
/mnt/cdrom
/dev/cdrom
SETTING UP MICROSOFT WINDOWS APPLICATION, WINE
In the example, I want to be able to run the Microsoft paint program (mspaint.exe) from windows in Linux using wine. Here is an example of how to go about it,
I.Make a directory on which to mount your windows partition. For example,
#mkdir /mnt/win
#mount -t vfat /dev/hda1 /mnt/win
#service wine start
To make that partition permanently available to you from Linux, add the following line to /etc/fstab file
/dev/hda1 /mnt/win vfat defaults 0 0
II.Copy the mspaint.exe program from /mnt/win/Program Fies/Accessories/mspaint.exe to /bin directory.
First, download and install the kernel source code. The rpm name is kernel-source.rpm.
[root@localhost root]# rpm -ivh kernel-source.rpm
ðIt will ask you all the necessary rpm which are must need for kernel-source.rpm.
[root@localhost root]# rpm -ivh ncurses
ðBy this program it is easy to change the configuration.
[root@localhost root]# cd /usr/src/linux-2.4
ðNow we go to linux-2.4 directory and give some following commands.
[root@localhost linux-2.4]# make Xconfig
[root@localhost linux-2.4]# make menuconfig
[root@localhost linux-2.4]# make mrproper
ðMake mrproper command are used to check all the necessary rpm are installed or not and can it possible to kernel compilation?
ðMake xconfig to use an X Window system base configuration program to configure the kernel.
ðMake menuconfig is used as text mode to configure the kernel.
After make new kernel configuration, give the command,
[root@localhost linux-2.4]# make dep
[root@localhost linux-2.4]# make bzImage
[root@localhost linux-2.4]# make modules
[root@localhost linux-2.4]# make modules_install
ðAfter giving this above command, it will take more times and display all the working information. After completion of above commands, the module files will be stored in /lib/module directory.
Now, to know the Red hat version we can execute the command as
ðNow, it will copy the module file to "/boot" directory.
Now, we will make a new setting in the GRUB boot loader.
[root@localhost root]# vi /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:You have a /boot partition.This means that
#all kernel and initrd paths are relative to /boot/, eg.
#root (hd0,9)
#kernel /vmlinuz-version ro root=/dev/hda11
#initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=6
splashimage=(hd0,9)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,9)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img
title Red Hat Linux (2.4.20-8)
root (hd0,9)
kernel /vmlinuz-2.4.8 ro root=LABEL=/
initrd /initrd1
Using sudo is for assigning administrator privilege. One way to give full or limited root privileges to any ono-root user is to set up the sudo facility.
As the root user, edit the /etc/sudoers file by running the visudo command,
[root@localhost root]# visudo
ðThis is that command will lock the /etc/sudoers file and do some basic sanity checking of the file to ensure it was edited correctly.
Uncomment the following line to allow users in the group named wheel to have full root privileges on the computer.
%wheel ALL=(ALL) ALL
ðThe previous line causes the user to be prompted for a password to be allow to use administrative commands. Without using a password, uncomment the following line as,
%wheel ALL=(ALL) NOPASSWD:ALL
Save the changes to the /etc/sudoers file (in vi type zz). Now add a user jake in the group wheel. The following is an example of a session by the user jake after he has been assigned sudo privileges.
[root@localhost jake]# sudo umount /mnt/win
We trust you have recived the usal lecture from the local system administrator. It usually boils down to these two things:
#1) Respect the privacy of others.
#2) Think before you type.
Password: ******
ðThe user jake runs the sudo command so he can unmount the /mnt/win file system. He is given a warning and asked to provide his password (this is jake's password, not root's password).
[root@localhost jake]# mount /mnt/win
mount: only root can mount /dev/hda1 on /mnt/win
ðWithout using sudo, user jake can not mount. So he must use sudo command before mount, such as,
[root@localhost jake]# sudo mount /mnt/win
[root@localhost jake]#
ðNotice that jake was not prompted for a password for the second sudo. That's because after entering his password successfully he can enter as many sudo commands as he wants for the next five minutes without having to enter it again. We can change the timeout value from five minutes to however long we want by setting the passwd_timeout value in the /etc/sudoers file.
However, the /etc/sudoers file gives us an incredible amount of flexibility in permitting individual applications or groups of applications.
The boot loader security means to set password in the GRUB or LILO and single user mode password etc.
TCP - Wrappers
There are two files in /etc directory, one is "hosts.allow" and another is "hosts.deny". The hosts.allow file is always overloaded by hosts.deny file. The file's text format are given below with examples,
[root@localhost root]# vi /etc/hosts.allow
in.telnet : 192.168.10.3 192.168.10.20
vsftpd : .com yahoo.com
sshd : <>
pop3d : <>
portmap: <>
... .... ... ... ... ... ...
... .... ... ... ... ... ...
....... .... ... ... ... …
[root@localhost root]# vi /etc/hosts.deny
in.telnet : 192.168.10.3 192.168.10.20
vsftpd : .com yahoo.com
sshd : <>
pop3d : <>
portmap: <>
... .... ... ... ... ... ...
... .... ... ... ... ... ...
....... .... ... ... ... …
SSH - Secure SHeel
Note: See network page and ssh.
Security for telnet and pop3
You can add two lines in the telnet or ipop3 file to give access permission.
[root@localhost root]# vi /etc/xinetd.d/telnet
Or
[root@localhost root]# vi /etc/xinetd.d/ipop3
only_from = <> ... ... ... # Only who can access telnet or pop3.
no_access = <> ... ... ... # Who can 't access telnet or ipop3.
TRIPWIRE
The necessary rpm is,
[root@localhost root]# rpm -ivh tripwire.rpm
Now, enter the as,
[root@localhost root]# sh /etc/tripwire/twinstall.sh
ðIt will ask you, two type’s permission.
1. Site keyfile password.
2. Local keyfile password.
It will ask you password for many times.
[root@localhost root]# vi /etc/tripwire/twpol.text
ðIt will store all the current information of the system, file structure etc in this file.
[root@localhost root]# tripwire --init
ðIt will create a directory called "tripwire". In this directory, there are some files and a directory. The file name is as like domain name and the directory name is "report".
[root@localhost root]# cd /var/lib/tripwire
[root@localhost tripwire]# ls
report sys3.iiht.com.twd
[root@localhost tripwire]# vi sys3.iiht.com.twd
ðshowing all the current information of the computer.