Wednesday 28 December 2011

NETWORK CONFIGURATION

                                           NETWORK CONFIGURATION
Networking scripts refer to logical interface names:
Ethernet
Dial-up
Loopback
:
:
:
eth0, eth1 …
ppp0, ppp1 …
lo
Driver selection:
 All drivers for network interface cards are built as modules
 /etc/modprobe.conf maps logical names to specific module name
Ex: alias eth0 r8179
 Network interface modules are loaded at boot time if networking has been enabled
    The appropriate module is loaded based on a alias line in /etc/modprobe.conf
 To view the module aliases
          grep ‘alias eth’ /etc/modprobe.conf
          ifconfig eth0 -View interface configuration
          netconfig - text based network configuration tool, only write config files,
          system-config-network - graphical tool to configure ipaddr

Use ifup and ifdown to activate the changes
    ifup eth0 -Enable eth0 interface
    ifdown eth0 -Disable eth0 interface
    mii-tool - This utility checks or sets the status of a network interface’s Media Independent
    Interface (MII) unit. Most fast ethernet adapters use an MII to auto negotiate link speed and
duplex setting
   ethtool - Display or change ethernet card settings
   kudzu - detects and configures new and/or changed hardware on a system
  Kudzu detects and configures new and/or changed hardware on a system.
  When started, kudzu detects the current hardware, and checks it against a database stored in
      /etc/sysconfig/hwconf, if one exists.
  It then determines if any hardware has been added or removed from the system.
     If so, it gives the users the opportunity to configure any added hardware, and unconfigure any
     removed hardware. It then updates the database in /etc/sysconfig/hwconf.
They do not activate device or changes
ethtool eth0

DEVICE CONFIGURATION IS STORED IN TEXT FILES
/etc/sysconfig/network-scripts/ifcfg-ethX

NETWORK CONFIGURATION IS STORED IN
/etc/sysconfig/network

CONFIGURING SECOND IPADDR OF THE SYSTEM:
netconfig --device eth1

BINDING MULTIPLE IP ADDRESSES:
For a small number of IP's, create ifcfg file for a virtual interface
ifcfg-ethX:XXX
For a large number of IP's create an ifcfg range file
ifcfg-ethX-rangeX
vim /etc/sysconfig/network-scripts/ifcfg-eth0-range0

IPADDR_START=192.168.1.1
IPADDR_END=192.168.1.255
CLONENUM_START=0
At the maximum of 256 IP address may be configured in a single NIC
Ex: Many websites running on a same server, this is used to identify different websites

DHCP/BOOTP:
dhclient - manages to configure ip address through dhcp/bootp

DEFAULT ROUTE:
Default gateway of the system

STATIC ROUTES:
It can be configured in two ways
ip route add 192.168.22.0/24 via 10.53.0.100
service network restart
ip route
Mount permanently using the following
vim /etc/sysconfig/network-scripts/route-ethX

IP/CIDR via GATEWAY
Ex: 192.168.22.0/24 via 10.53.0.100
Adds a static route to the 192.168.22.* network through 10.53.0.100 router
service network restart
If we have more than one interfaces use the following.
vim /etc/sysconfig/networking/devices/ethX.route
ADDRESS0=192.168.3.0
NETMASK0=255.255.255.0
GATEWAY0=192.168.0.100
For the second static route uses ADDRESS1/NETMASK1/GATEWAY1, and so on.

DISPLAY STATIC ROUTES WITH:
route
route -n
netstat
connections, and multicast memberships
netstat -r
ip route
- show / manipulate the IP routing table
-
Print
network connections, routing tables, interface statistics, masquerade,

CHANGING HOSTNAME:
Hostname is set initially by /etc/rc.sysinit at the boot time
If we want to change the Hostname:
Then change the hostname in the following file
hostname=stationX.example.com (temporary entry)
vim /etc/sysconfig/network
service network restart
Changes will be activated at the logout

LOCAL DATABASE OF HOSTNAME TO IP ADDRESS MAPPINGS (OR) LOCAL RESOLVER
vim /etc/hosts
192.168.0.X
stationX.example.com
stationX

DNS RESOLVER:
vim /etc/resolv.conf
search example.com cracker.org
nameserver 192.168.0.254
nameserver 192.168.1.254

DNS UTILITIES:
nslookup
nslookup
dig
dig -x
 By default looks at both the nameserver and search lines in /etc/resolv.conf
host
host -l
 By default looks only at the nameserver line in /etc/resolv.conf

NETWORK DIAGNOSTICS:
ping - Network packet loss and latency measurement tool
Ex:
The default behavior of ping is to send 64-byte ICMP packet to the specified host every
second until you cancel the operation with a Ctrl-c. When ping operation is cancelled or done, ping
will report summary statistics such as aversge packet loss, number of packets sent/received, etc.
These statistics can allow us to measure the quality of the network between hosts.
traceroute, mtr
Displays network path to a destination
ping 192.168.0.254
Ping –c 4 192.168.0.254

ADVANCE FILESYSTEM MANAGEMENT

ADVANCE FILESYSTEM MANAGEMENT
RAID:
SOFTWARE RAID:
Multiple disks grouped together into "arrays" to provide better performance, redundancy or
both.
mdadm - provides the administration interface to software RAID.
Many "RAID Levels" supported, including RAID O, 1 and 5.
RAID devices are named, /dev/md0, /dev/md1, /dev/md2, /dev/md3 and so on.
RAID 0 or STRIPPING:
Two or more disks used to create a single large high performance volume. Performance is
better if drives of equal size are used. No redundancy, so chance of failure is very high,.
Array size equals the sum of all disks in array.
RAID0 is simply data striped over several disks. This gives a performance advantage,as it is
possible to read parts of a file in parallel. However not only is there no data protection, it is
actually less reliable than a single disk, as all the data is lost if a single disk in the array stripe
fails.
RAID 1 or MIRRORING:
Two disks containing the same data updated simultaneously. redundancy offers good
protection against disk failure. Can slow write performance but tends to improve read
performance. Only RAID type that you can place the /boot partition on. Hot spare disks can
be used to improve fault-tolerance. Array size equals the size of the smallest disk used.
RAID1 is data mirroring. Two copies of the data are held on two physical disks, and the data
is always identical. RAID1 has a performance advantage, as reads can come from either disk,
and is simple to implement. However, it is expensive, as twice as manydisks are needed to
store the data.
RAID 5:
Three or more disks with zero or more hot spares. A good balance between performance and
reliability. Redundancy is achieved by splitting parity between all disks, one disk can be lost
without causing array failure. Both read and write speeds are usually improved, but in certain
cases write performance is dramatically decreased. For this reason RAID 5 is often not a
good choice to host databases.
RAID5 data is written in blocks onto data disks, and parity is generated and rotated around
the data disks. Good general performance, and reasonably cheap to implement. Used
extensively for general data.
If data on a RAID5 disk is updated, then all the old data from the RAID stripe has to be read
back from the disks, then new parity calculated before the new data, and new parity can be
written out. This means that a RAID5 write operation requires 4 IOs. The performance impact
is usually masked by a large subsystem cache.
PARITY:
Parity is a means of adding extra data, so that if one of the bits of data is deleted,
it can be recreated from the parity
The advantage of parity is that it is possible to recover data from errors.
The disadvantage is that more storage space is required.
SOFTWARE RAID CONFIGURATION:
RAID1:
create 2 new partitions using the ID as `fd'
fdisk /dev/sda
p  n  +300M 
:wq
partprobe | sync
t
 partition no  l
 fd
TO START THE RAID
mdadm -C /dev/md0 --level=1 --raid-devices=2 /dev/sda{x,y} or/dev/sdax /dev/sday
or
mdadm -C /dev/md0 -l 1 -n 2 /dev/sda{x,y} or/dev/sdax /dev/sday
The raid should be started first and then only the partition should be formatted
mkfs.ext3 /dev/md0
mount /dev/md0 /mnt
vim /etc/fstab
/dev/md0
mount -a
mount
cd /mnt
touch a b c d
TO VIEW THE RAID STATUS
cat /proc/mdstat
/mnt ext3
defaults 0 0
TO STOP RAID
umount /dev/md0
mdadm --manage /dev/md0 --stop
TESTING AND RECOVERY
mount /dev/sdax /mnt ; mount /dev/sday /opt
ls /mnt ; ls /opt
TO FAIL A PARTICULAR HARDDISK
RAID must be started before failding a device
mdadm -C /dev/md0 --level=1 --raid-devices=2 /dev/sda{x,y} or/dev/sdax /dev/sday
mdadm --manage /dev/md0 -f /dev/sdax/y
or
mdadm --fail /dev/md0 /dev/sdax/y
TO REMOVE THE FAILED DEVICE
mdadm --manage /dev/md0 -r /dev/sdax/y
or
mdadm --remove /dev/md0 /dev/sdax/y
TO ADD A NEW DEVICE
mdadm --manage -a /dev/sdax/y
or
mdadm -a /dev/md0 /dev/sdax/y
cat /proc/mdstat
LOGICAL VOLUME MANAGEMENT

LVM is a tool for logical volume management which includes allocating disks, striping,
mirroring and resizing logical volumes.

The physical volumes are combined into logical volumes, with the exception of the /boot/
partition.

The /boot partition cannot be on a logical volume group because the boot loader cannot read
it.

If the root (/) partition is on a logical volume, create a separate /boot/ partition which is not a
part of a volume group.
LOGICAL VOLUME CONFIGURATION:
Create 2 new partitions using the ID as '8e'
fdisk /dev/sda
p
n
:wq
partprobe | sync
fdisk -l
pvcreate /dev/sdaX
pvdisplay
vgcreate /dev/sdaX
vgdisplay
lvcreate -L 300M -n
lvdisplay
mkfs.ext3 /dev//
vim /etc/fstab
/dev//lvname> /home
mount -a
mount
 +1000M  t

partition no  l
 8e
ext3
defaults
0 0
Store some data on the mount point
TO INCREASE THE LOGICAL VOLUME SIZE WITH OUT DATA LOSS
lvextend -L +700M /dev//lvname>
lvdisplay
lvdisplay show that the has the space of 1000 Mb, but df -h shows that,
df -h
To format the extended LV and added to the existing LV.
resize2fs
df -h
/dev//lvname>
TO ADD ANOTHER PARTITION TO THE EXISTING LOGICAL VOLUME:
create a new partition with the ID as '8e'
pvcreate /dev/sdaY
pvdisplay
vgextend /dev/sdaY
vgdisplay
Now the new partition is also added to the existing volume group.
TO REDUCE LVM
Now reduce the filesystem by 100MB. This example assumes that the original size was 440MB
umount /home
fsck –f /dev//lvname>
resize2fs /dev//lvname> 440M
lvreduce -L 100M /dev//lvname>
mount -a
df -h
USER QUOTA WITH LVM PARTITION:
Remount the above partition with usrquota option
Temporary:
mount /dev//lvname> -o rw,remount,usrquota
/home
Permanent:
umount /home
vim /etc/fstab
/dev//lvname> /home ext3 defaults,usrquota
:wq
mount -a
mount
Now the Above partition is ready to allocate userquota
useradd test
passwd test
00
quotacheck -cu /home
repquota /home
quotaon /home
BLOCK LIMIT: To set soft limit = 5120 kb (5Mb)
setquota 5120 10240 0 0 -u test /home
edquota -u test
==> to create the quota file
==> to display the quota file
hard limit
= 10240 kb (10Mb)
or
5120 10240
0
0
Note: Add the size of used blocks with the soft and hard limit given.
To check the above condition
su - test
quota
dd if=/dev/zero
dd if=/dev/zero
dd if=/dev/zero
of=newfile
of=newfile
of=newfile
To set soft limit = 50
bs=100k count=45  should succeed
bs=100k count=70  should succeed with warning
bs=100k count=150 should fail to write the whole file
hard limit = 70
FILE LIMIT:
setquota 0 0 50 70 -u test /home
or
edquota -u test
0
0
50
70
Note: Add the size of used blocks with the soft and hard limit given
To check the above condition
su - test
quota
Create 49 files successfully, 50th file should be created with warning. 80th file should not be created,
it should be failed.
Note: if any condition did not work properly you have to off the quota and the edit as need.
quotaoff /home
quotaon /home
LVM SNAPSHOTS:
Note: Don't try this with /home, try to use another mount point.
create an LVM partition and mount that in /snapshot
store some data in the mount point
ls /snapshot
lvcreate -L 16M -p r -s -n backups
lvdisplay
mkdir /mybackup
mount /dev//backups /mybackup/backups
mkdir /dump
dump -0u -f /dump/datadump
umount /mybackup/backups
lvremove /dev//backups
umount /snapshot
mkfs.ext3 /dev//lvname>
mount -a
ls /snapshot
Now the Directory contains no data
cd /snapshot
restore -rf /dump/datadump
ls
Now the data is restored in the mount point.
/dev//
/mybackup/backups
TO REMOVE LOGICAL VOLUMES:
umount /home
vim /etc/fstab
Remove the entries regarding to the LVM
lvremove /dev//lvname>
lvdisplay
vgremove
vgdisplay
pvremove /dev/sdaX
pvdisplay
Finally remove the partition using fdisk.

FILESYSTEM MANAGEMENT

FILESYSTEM MANAGEMENT
Total maximum number of partitions supported by the kernel:
63 for IDE drives
15 for SCSI drives
PARTITION THE HARDDISK:
Quotas are enabled at the file system
Easy to backup and recovery
Separate partition improve performance of the system
The operating system can be upgraded or reinstalled with out
Having to restore the data from elsewhere.
CREATING A NEW PARTITION:
list known partition types
Creating an new partition type n
To change the partition Type (ID)
fdisk -l (or) sfdisk -l
fdisk /dev/sda
:m
d delete a partition
l
m print this menu
n add a new partition
p print the partition table
q quit without saving changes
t change a partition's system id
w write table to disk and exit
:n
firstcylinder size: < Default value>
last cylinder size: +M
Command (m for help): t
Partition number (1-12): 12
Hex code (type L to list codes):
:w
partprobe - inform the OS of partition table changes
sync - flush file system buffers
Formatting the file system
mkfs.ext3 /dev/sdaX
or
mke2fs -j /dev/sdaX
X is the partition number
Mount filesystem temporary
mount /dev/sdaX
Mount filesystem permanently
vi /etc/fstab
:wq
mount -a  Mount the filesystem just created and check for errors
mount
/dev/sdaX
/dir
ext3
defaults
00
TO REMOVE A PARTITION:
step 1: Remove entries in /etc/fstab
step 2: umount the file system
step 3: fdisk /dev/sda
umount /dev/sdX or < mount point>
:d
number of partition:X
:w
MOUNT and UMOUNT
Mount:
mount [-t fstype] [option] device mount_point
-t filesystem type
-o options
Ex: mount -t ext3 -o rw,acl /home
mount -o remount,rw /dev/sda6
Umount:
umount [options] device | mount_point
Ex: umount /dev/sda5 (or) /opt
MOUNT POINTS and /etc/fstab

/etc/fstab is referred each time the system boots to create the desired filesystem hierarchy.

During the system initialization, /etc/fstab is used to create the filesystem hierarchy.

It consists of six fields per line for each filesystem.
Syntax:
device
Ex:
Label=/new /new
device
mount_point  The path used to access the filesystem
FS_type
options
dump_freq
mount_point
FS_type
ext3
options
defaults
dump_freq
0
 The special device file name, or filesystem label of the device to mount
fsck_order
 The filesystem type
 A comma-seperated list of options
 Level 0 dump frequency:
0=never dump,
1=daily,
2=every other day.

0=ignore,
1=first (the root filesystem should have this value)
2-9=second, third, etc..

Filesystems that have the same number greater than 1 are checked in parallel

Network filesystems and CD-ROMs should be ignored.
mount -a  Used to mount all the filesystems listed in /etc/fstab
E2LABEL
e2label – Change or View the label on an ext2/ext3 filesystem
To view the label
To change or create label
For a partition:
e2label /dev/sdaX
For all the partitions:
blkid
e2label /dev/sdaX
MOUNTING NFS RESOURCES

To check which directory is exported
showmount -e

Mount the shared directory to your local file system temporary
Syntax:
mount :
Ex:
mount server1.example.com:/var/ftp/pub /mnt

Mount the shared directory to your local file system permanently
Enter the following in /etc/fstab
Ex:
192.168.0.254:/var/ftp/pub
/opt
nfs
defaults
0
MOUNTING SMB RESOURCES
From Linux
smbclient //192.168.0.x/sharename -U Admin
mount -t cifs //192.168.0.x/sharename /opt -o username=john
From Directories shared in Windows
mount -t cifs //192.168.0.x/sharename /opt -o username=Administrator
CREATING A SWAP PARTITION:
create a partition with partition id 82
partprobe | sync
mkswap /dev/sdaX
swapon /dev/sdaX
cat /proc/swaps
or
swapon -s
 to format swap partition
 to enable swap
 to view swap status
To enable swap permanently
vim /etc/fstab
/dev/sdaX
swap
swap
defaults
00
CREATING A SWAP FILE:
dd if=/dev/zero of=/swapfile bs=1024k count=X
where X is the count that is depends on the size of RAM used. Usually 1.5 to 2 times of RAM size is
allocated to swap partition.
To enable swap permanently
vim /etc/fstab
/swapfile
swap
swap
defaults
00
FILE SYSTEM MAINTENANCE
tune2fs - adjust tunable file system parameters on ext2/ext3 file systems
- it is used to convert the ext2 file system to ext3 with out data loss
dumpe2fs - dump ext2/ext3 file system information
dumpe2fs /dev/sdaX
==> displays file system info

USER ADMINISTRATION

USER ADMINISTRATION
Creating users and providing password:
useradd
adduser
passwd
Accounts may be added in a batch with newusers
vim userlist
usr1:redhat:512:512::/home/usr1:/bin/bash
usr2:redhat:513:513::/home/usr2:/bin/bash
usr3:redhat:514:514::/home/usr3:/bin/bash
usr4:redhat:515:515::/home/usr4:/bin/bash
usr5:redhat:516:516::/home/usr5:/bin/bash
usr6:redhat:517:517::/home/usr6:/bin/bash
usr7:redhat:518:518::/home/usr7:/bin/bash
usr8:redhat:519:519::/home/usr8:/bin/bash
usr9:redhat:520:520::/home/usr9:/bin/bash
To create users
newusers
newusers userlist
Note: only drawback of using this method is that the user’s home directories do not get populated with
the files from /etc/skel. so copy the hidden files from /etc/skel to user's home directory.
cp –rf /etc/skel/.* /home/usr1
useradd command populate entries in three files,
/etc/passwd
/etc/shadow
/etc/group
When user accounts are created, a private group is also created with the same name, users are
assigned to this private group
Entries in /etc/passwd
one:x:501:501::/home/one:/bin/bash
user name of the account
An x in the password field. Passwords are stored in the /etc/shadow file or else will contain
the user's encrypted password.
Numeric user id. This is assigned by the useradd script
A common convention is to number them sequentially starting from 500.
Accounts with a UID under 100 are generally system accounts.
root user always having the UID 0
Numeric group id. Red Hat uses group is in a fairly unique manner for enhanced file security.
Usually the group id will match the user id.
Comment field. User details such as name, contact number, address.......
User’s home directory. Usually /home/username (eg. /home/one). All user’s personal files,
web pages, mail forwarding, etc. will be stored here.
User’s shell account. Often set to /bin/bash to provide access to the bash shell
Entries in /etc/shadow
one:$1$vDPEOJMj$OG6VnnJrYS75z.fxadMCA/:13805:0:99999:7:::
As with the passwd file, each field in the shadow file is also separated with colon,characters,
and are as follows:
Username. Case-sensitive, usually all lowercase. A direct match to the username in the
/etc/passwd file.
Password, encrypted. A blank entry (eg. ::) indicates a password is not required to login, and
an entry (eg. :*:) indicates the account has been disabled.
The number of days (since January 1, 1970) since the password was last changed.
The number of days before password may be changed (0 indicates it may be changed at any
time)
The number of days after which password must be changed (99999 indicates user can keep
his or her password unchanged for many, many years)
The number of days to warn user of an expiring password (7 for a full week)
The number of days after password expires that account is disabled
The number of days since January 1, 1970 that an account has been disabled
A reserved field for possible future use
Entries in /etc/group
class:x:541:stud4,stud3,stud2,stud1
Name of the group
group password, or an 'x' when using shadow passwords
unique group ID
comma-seperated list of group members
GROUP ADMINISTRATION:
ADD A GROUP
groupadd
DELETE A GROUP
groupdel
CHANGE A GROUP NAME
groupmod -n
CHANGE THE FILE'S GROUP OWNERSHIP:
chgrp
CHANGE THE FILE'S OWNERSHIP:
chown
Note: if we change the group name, then automatically the members are also added to that newgroup
ALLOCATE USER TO GROUP
ADDING USERS DIRECTLY TO A GROUP
useradd -G
useradd -G class stud2
ADDING AN EXISTING USER TO A GROUP
usermod -G
usermod -G class stud1
gpasswd [-a user]
DELETING USER FROM A GROUP
gpasswd [-d user]
USER ID ANG GROUP ID
root user
system user accounts
users
In order to avoid using GID within the range typically assigned users and their private groups, use -r
groupadd -r
groupadd -r class1
The above command will create an entry in /etc/group like this
class1:x:101:std2,std1
Note: The group ID's are allocated from 101
MODIFYING USER ACCOUNTS:
usermod [options] username
options:
-d
-e
-g
-G
-l
-s
-u
-p
-L
-U
DELETING USERS ACCOUNTS:
userdel
userdel -r
(or)
Manually remove the user from /etc/passwd, /etc/shadow, /etc/group, /var/spool/mail
PASSWORD AGING POLICIES:
By default, passwords do not expire
Forcing passwords to expire is part of a strong security policy
Modify default expiration settings in /etc/login.defs
0
 1-100
 starting from 500
change the home directory
set the date on which the account will expire and be disabled
change the initial login group
change group name
change login name
change the login shell
change login ID
change the string in the password field
Lock the password.
Unlock the password
deletes user from system
deletes user and the home directory of the user
To modify password aging for existing users, use the chage command
chage [options] username
Options:
-d, --lastday
-E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE
-I, --inactive
-l, --list
-m, --mindays
LAST_DAY
set last password change to LAST_DAY
INACTIVE
MIN_DAYS
-M, --maxdays
-W, --warndays WARN_DAYS
-h, --help
MAX_DAYS
set password inactive after expiration to INACTIVE
show account aging information
set minimum number of days before password
change to MIN_DAYS
set maximim number of days before password
change to MAX_DAYS
set expiration warning days to WARN_DAYS
display this help message and exit
LOGIN SHELL SCRIPTS:
/etc/profile
~/.bash_profile
/etc/profile.d/*.sh
~/.bashrc
/etc/bashrc
/etc/profile is executed every time a user logs in to the system. It will set environment
variables for the user such as HISTSIZE and MAIL. This is the first script executed at login.
The user's ~/.bash_profile scripts runs next,
which typically calls ~/.bashrc and /etc/bashrc.
The /etc/profile contains system-wide environment settings; whatever is added or
removed here affects all users.
/etc/profile.d contains initialization scripts specific to software packages installed by RPM.
These scripts are called by /etc/profile.d on login, or by /etc/bashrc if called by a non-
interactive shell.
~/.bash_profile is executed once at login time. It is usually used to set environment
variables and to start programs at login, as opposed to every time you open a terminal
window.
NON LOGIN SHELL SCRIPTS:
~/.bashrc
/etc/bashrc
/etc/profile.d/*.sh
~/. bashrc allows users to customize their own aliases and functions without the
intervention of the administrator.
it runs whenever a user
~/.bash_profile also calls it whenever the user logs
The /etc/bashrc script is used for system-wide functions and aliases.
It alllows a system-administrator to set aliases for every user, like “c” for “clear” or “h” for
“history”. This script is usually called by a user's ~/.bashrc file.
SWITCHING ACCOUNTS:
su - [user]
su - [user] -c command
Allows the user to temporarily another user
Default user is root
The '-' option makes the new shell a login shell
SUDO:
Users listed in /etc/sudoers execute commands with:
an effective user id of 0
group id of root's group
sudo acess is controlled by /etc/sudoers.


This file should be edited with 'visudo'
TO GIVE PERMISSION TO USE A COMMAND FOR A SET OF USERS
visudo
User_Alias USERS = test, test1
Cmnd_Alias COMMAND = /sbin/fdisk
USERS ALL=COMMAND
Now the above list of users can use the commands in the list.
su - test
sbin/fdisk -l
sudo /sbin/fdisk -l now it is working
starts up a non-login interactive shell, and the default user
 not working
TO GIVE FULL PERMISSION LIKE ROOT
visudo
test1
The user test1 can run any command using sudo
sudo /sbin/fdisk -l
ALL=(ALL)
ALL
FILE OWNERSHIP:
Every file has both user and group "ownership"
A newly created file will be owned by:

the user who creates it

the current primary group of that user

SGID directories may change this behavior

The chown command can be used by root to change ownership
Examples:
touch new new1
ls -l (or) ll
-rw-r--r-- 1 root root 0 Oct 12 15:02 new
-rw-r--r-- 1 root root 0 Oct 12 15:02 new1
File ownership can be changed as follows
chown stud1 new1
ll
-rw-r--r-- 1 stud1 root 0 Oct 12 15:02 new1
File ownership and group name can be changed as follows
chown stud2:class new
(or)
chown stud2.class new
ll
-rw-r--r-- 1 stud2 class 0 Oct 12 15:02 new
SUID / SGID EXECUTABLES

Normally processes started by a user run under the user and group security context of that
user

SUID and/or SGID bits set on an executable file cause it to run under the user and/or group
security context of the file's owner and/or group
Example: SUID
ll /sbin/fdisk
-rwxr-xr-x 1 root root 95572 Jan 11 2007 /sbin/fdisk
chmod 4755 /sbin/fdisk
(or)
chmod u+s /sbin/fdisk
-rwsr-xr-x 1 root root 95572 Jan 11 2007 /sbin/fdisk
login as any user and try to access fdisk command
STICKY BIT AND SGID:
groupadd mba
useradd -G mba st1
useradd -G mba st2
useradd -G mba st3
mkdir /work
chgrp mca /work
chmod 777 /work
chmod 770 /work
chmod 1770 /work
or
==> Creating working directory
==> Assigning working directory to group
==> Setting full permission to that directory
(any user can access the group directory)
==> Setting owner ang group only to access
==> Sticky Bit
( owner only having full permission to edit and delete files)
chmod o+t /work
chmod g+s /work
chmod 2770 /work
or
(group names are assigned in this mode (SGID) )
ACCESS CONTROL LISTS (ACL)
ACLs can be configured:

Per user

Per group

For users not in the user group for the file
Grant RWX access to files to multiple users or groups
mount -o remount,acl /home
getfacl file|directory
getfacl /home/newfile.txt
For example, to give read and write permissions to user jack, group class rw:
setfacl -m u:jack:rwx /home/newfile.txt
The above command would grant the user jack read, write and execute access to the file
/home/newfile.txt
To remove acl
setfacl –x u:jack /home/newfile.txt
On directories, default access control lists can be used. If we wanted all newly created content of a
directory to be readable and writable by the user student:
setfacl -m d:u:student:rw /home/share/project/
To set acl to a directory:
setfacl -m d:o:rx /share
The above command would grant the others to read and execute access to the directory /share
To remove all the permissions for a user, group, or others, use the -x option and do not specify any
permissions:
setfacl -x
setfacl -x u:new /mnt

For example, to remove all permissions from the user with UID 500:
setfacl -x u:500 /project/somefile
SELinux
There is an old UNIX saying that everything is a file. Traditional file access is controlled
by user, group, and permission settings. To SElinux, everything is an object and access is
controlled by security elements stored in the inode’s extend attribute fields. Collectively, the elements
are called the security context.
In Red Hat Enterprise Linux 4, SELinux was protecting 13 processes.
In the initial release of Red Hat Enterprise Linux 5, this count had increased to 88.
All files and processes have a security context
The context has several elements, depending on the security needs
user:role:type:sensitivity:category
user_u:object_r:tmp_t:s0:c0
user:
Indicates the type of user that is logged in to the system.
For root user the name will be displayed as root,
Processes have the valve system_u.
For other users user_u.
role :
Defines the purpose of the particular file, process, or use.
Files have the role of object_r
Process and Users get the role of system_r.
Type :
Used by Type Enforcement to specify the nature of the data in a file or a processes.
Rules within the policy say what process types can access which file types.
Sensitivity:
A security classification sometimes used by government agencies.
Category:
Similar to group, but can block root’s access to confidential data.
Not all systems will display s0:c0
To view the security context of a file, user the ls command’s –Z option:
ls –Z
Ex:
ls –lZ /root/anaconda-ks.cfg /var/log/messages
Generally, Files having Directory’s security context
ls –Zd /etc/ /etc/hosts
ls –Z /etc/shadow /etc/aliases
To determine the process is protected by SELinux.
ps –ZC syslogd,bash
SELinux Key Components - Policy
Strict
A system where everything is denied by default.
You must specify allow rules to grant privileges
SELinux designed to be a strict policy.
The policy rules only have allows, no denies.
Minimal privilege's for every daemon
separate user domains for programs like GPG,X, ssh, etc
Difficult to enforce in general purpose Operating system.
Targeted
System where everything is allowed. use deny rules.
Protects systems Doors and Windows
By default processes run in unconfined_t.
unconfined processes have the same access they would have without SELinux running.
Daemons with defined policy transition to locked down domains.
httpd started from unconfined_t transitions to httpd_t which has limited access.
Any process whose type is unconfined_t, is not yet restricted by SELinux.
To view the entire process stack, use either
ps –eZ
or
ps Zax
Note: A restricted process is sometimes called protected, though it is the data that is protected, not
the process.

SYSTEM SERVICES

SYSTEM SERVICES
NETWORK TIME PROTOCOL:
Workstation hardware clocks tend to drift over time without correction
Many application require accurate timing
Time synchronization makes system logs easier to analyze
NTP clients should use three time servers
Config tool: system-config-date
NTP is configured in /etc/ntp.conf
server 192.168.0.1
server 192.168.0.2
server clock.example.com
driftfile /var/lib/ntp/drift
ENABLE THE NETWORK TIME PROTOCOL
system-config-date
Enter the NTP server's name
service ntpd start/restart/reload
chkconfig ntpd on
SYSTEM LOGGING:
Log file examples:




CENTRALISED LOG HOST CONFIGURATION:
/var/log/dmesg: Kernel boot messages
/var/log/messages: Standard system error messages
/var/log/maillog: Mail system messages
/var/log/secure: Security, authentication, and xinetd messages
LOG SERVER:
vim /etc/sysconfig/syslog
SYSLOGD_OPTIONS="-r -m 0"
service syslog start/restart/reload
chkconfig syslog on
LOG CLIENT:
Append the entry in /etc/syslog.conf
authpriv.*
authpriv.*
/var/log/secure
@
(By this entry user authentication log messages are sending to the log server)
service syslog start/restart/reload
chkconfig syslog on
XORG SERVER CONFIGURATION
Configuration stored in /etc/X11/xorg.conf
Configuration settings can be changes as follows
system-config-display
setup  select x configuration
startx
service xfs start/restart/reload
chkconfig xfs on
Note: This is process gives better results in runlevel 3, by this option we can change system
resolution, colour depth, monitor type, video card...
VNC: VIRTUAL NETWORK COMPUTING
Allows to access or share a complete desktop over the network. Uses significantly less
bandwidth as pure remote X connections
VNC SERVER
Individual users can start a VNC server with the command: vncserver
Requires a VNC password which should not be identical to the system password
System -> Preferences -> Remote Desktop
Enable Allow users to view your Desktop and Ask for your confirmation
Note: By this users can view your Desktop with your confirmation
Servers can automatically be started via
/etc/init.d/vncserver start/restart/reload
(or)
service vncserver start/restart/reload
VNC CLIENT
Connects to a remote VNC server with vncviewer host:screen
vncviewer
(or)
Application  Accessories  VNC Viewer  ip
(or)
vncviewer
OpenSSH
Encrypted remote shell
Frequently used for remote system administration
Can copy files securely
Supports key based authentication
ssh root@station2.example.com
Generating Key Pairs
If you do not want to enter your password every time you use ssh, scp, or sftp to connect to a
remote machine, you can generate an authorization key pair.
Keys must be generated for each user.
To generate keys for a user, use the following steps as the user who wants to connect to
remote machines.
If you complete the steps as root, only root will be able to use the keys.
Red Hat Enterprise Linux 5.1 uses SSH Protocol 2 and RSA keys by default.
Generating an RSA Key Pair for Version 2
To generate an RSA key pair to work with version 2 of the protocol, type the following
command at a shell prompt:
ssh-keygen -t rsa
Accept the default file location of ~/.ssh/id_rsa.
Enter a passphrase different from your account password and confirm it by entering it again.
Note: if you don’t want password just press Enter twice.
The public key is written to ~/.ssh/id_rsa.pub. The private key is written to
~/.ssh/id_rsa. Never distribute your private key to anyone.
Change the permissions of the .ssh directory using the following command:
chmod 755 ~/.ssh
Copy the contents of ~/.ssh/id_rsa.pub into the file ~/.ssh/authorized_keys on the
machine to which you want to connect. If the file ~/.ssh/authorized_keys exist, append
the contents of the file ~/.ssh/id_rsa.pub to the file ~/.ssh/authorized_keys on the
other machine.
scp –r .ssh/ id_rsa.pub @:.ssh/authorized_keys
Change the permissions of the authorized_keys file using the following command:
chmod 644 ~/.ssh/authorized_keys
Note: The above configuration should be done in both Systems.
Now you are able to ssh on the another system with out password (Empty password given), [or] with
password that you have given (own password given)
CRONTAB:
crontab -eu
crontab -lu
crontab -ru
FIELD
minute
hour
day of month
month
day of week
==> create/edit crontab
==> lists user crontab
==> removes crontab
ALLOWED VALUES
0-59
0-23
1-31
1-12
0-7 (0 or 7 is Sun,)
A field may be an asterisk (*), which always stands for first-last
Ex: Run at 2:15pm on the first of every month
crontab -eu
15 14 1 * *
service crond start/restart/reload
chkconfig crond on
echo "this is test" > /dev/tty1
THE ANACRON SYSTEM

Anacron runs cron jobs that did not run when the computer is down

Assumes computers are not up continually

Vital for laptops, desktops, workstations, and other systems that are not up continually

Useful for servers that need to be taken down temporarily
Configuration file: /etc/anacrontab
Field 1: If the job has not been run in this many days...
Field 2: wait this number of minutes after reboot and then run it
Field 3: job identifier
Field 4: the job to run
CUPS
Uses the Internet Printing Protocol (IPP)
Allows remote browsing of printer queues
CONFIGURATION FILES
/etc/cups/cupsd.conf
/etc/cups/printers.conf
CONFIGURATION TOOLS
system-config-printer
Web based on http://localhost:631/
Command line management of print queues with lpadmin
lp
lpr
lpq
lprm
cancel
lpstat
CONFIGURING PRINTER:
system-config-printer
Click the New button.
Click Forward
Change the name to printerX
Click Forward
Select Locally-connected as the queue type and highlight /dev/lp0
Click Forward
Select Generic manufacturer and choose Raw Print Queue
Click Forward
Click Finish
Click Yes when it asks if you want to print a test page, and click Yes when it asks if
it looks okay.
Close down system-config-printer. Verify that there is a job in the queue:
lpq
service cups start/restart/reload
chkconfig cups on
Printer X is ready and printing.
 to print a file
 submits files for printing.
 to view print queue
 to cancel jobs
 to cancel jobs
 displays status information about the current classes, jobs, and printers

WEBSERVER

WEBSERVER
PACKAGES NEEDED FOR CONFIGURATION
httpd
IF THE PACKAGES ARE NOT AVAILABLE INSTALL THROUGH YUM INSTALLER
yum install httpd
THE MAIN CONFIGURATION CAN BE EDITED AS FOLLOWS
vim /etc/httpd/conf/httpd.conf
shift+g==>

DocumentRoot /var/www/html
ServerName stationX.example.com

CREATING THE WEBPAGE
cd /var/www/html
echo " This is test page for web server" > index.html
DAEMON SERVICES SHOULD BE STARTED AND ENABLED AFTER REBOOT
service httpd start/restart/reload
chkconfig httpd on
NOTE: Before proceed to verification, confirm that your ip addr is resolved to Domain name or vice
versa.
VERIFICATION OF WEB SERVER
links
Enter the URL name as
stationX.example.com ========>to view webpage.
SECURING ACCESS TO YOUR WEBSITE
mkdir /var/www/virtual
vi /etc/httpd/conf/httpd.conf
shift+g==>
NameVirtualHost 192.168.0.X:80

DocumentRoot /var/www/virtual
ServerName wwwX.example.com


AllowOverride AuthConfig

CREATING THE WEBPAGE
cd /var/www/virtual
echo " This is test page for virtual web server" > index.html
CREATING THE SECURITY
cd /var/www/virtual
vim .htaccess
AuthName "virtual webpage"
AuthType Basic
AuthUserFile /var/www/virtual/pass
require valid-user
CREATING HTPASSWORD TO THE USER
htpasswd -c /var/www/virtual/pass
chmod 640 pass
DAEMON SERVICE RELOADED
service httpd reload
VERIFICATION OF WEB SERVER
links
Enter the URL name as
wwwX.example.com ========>to view webpage.
This is going to ask for username and password, If you are provide the username and password then
the website will be displayed

SAMBA SERVER

SAMBA SERVER
This server is used to share the directories and files to WINDOWS and LINUX
PACKAGES NEEDED: samba, samba-common, samba-client
Yum list samba*
IF THE RPM'S IS NOT AVAILABLE INSTALL THROUGH YUM
yum install samba*
START THE DAEMON SERVICES
service smb start
TO CHECK THE AVAILABLE SAMBA SHARES IN THE LOCAL SYSTEM
smbclient -L localhost -N
( you should get a response from the samba server, but no indication of available shares)
-L
a list should appear
To look at what services are available on a server. You use it as smbclient -L and
-N
is useful when accessing a service that does not require a password.
This parameter suppresses the normal password prompt from the client to the user. This
THE MAIL CONFIGURATION FILE CAN BE EDITED AS FOLLOWS
vi /etc/samba/smb.conf
[global]
workgroup = REDHAT
[pub]
comment = windows sharing
path = /var/ftp/pub
public = yes
writable = yes
[home]
comment = share of user home directories
path = /home
public = no
valid users = Admin
create mask = 0765
hosts allow = 192.168.0. (or) 172.24. (or) 10.
OPTIONS AVAILABLE ARE:
public
browseable ==> share is visible in browse lists
writable ==> resource is read and write enabled
printable ==> resource is a printer, not a disk
group
TO RESTART THE DAEMON SERVICES AND TO ENABLE AFTER REBOOT
service smb restart/reload
chkconfig smb on
TO CHECK THE AVAILABLE SAMBA SHARES IN THE LOCAL SYSTEM
smbclient -L localhost -N
==> share can be accessed by guest
==> all connections to the share use the specified GROUP as the primary group
TO CHECK THE SYNTAX OF THE CONFIGURATION FILE
testparm
CREATE THE USERS NEEDED TO CHECK
useradd Admin
passwd Admin
smbpasswd -a Admin
smbpasswd -e Admin
TO CHECK THE SHARE IS ACCESSIBLE FROM THE LOCAL OR NOT
smbclient //192.168.0.x/home -U Admin
mount -t cifs //192.168.0.x/home /opt -o username=Admin
=======> to create samba password
=======> to enable samba password

WEB PROXY

WEB PROXY
PACKAGES NEEDED FOR CONFIGURATION
squid
IF THE PACKAGES ARE NOT AVAILABLE INSTALL THROUGH YUM INSTALLER
yum install squid
THE MAIN CONFIGURATION CAN BE EDITED AS FOLLOWS
vim /etc/squid/squid.conf
http_port 3128
SEARCH FOR THE WORD /OUR_NETWORKS, THEN ENTER THE FOLLOWING LINES
acl example src 192.168.0.0/255.255.255.0
http_access allow example
You can now refer to this network as "example" elsewhere in the configuration file.
src means that the IP specified is the source Ip(s) for this acl
DAEMON SERVICES SHOULD BE STARTED AND ENABLED AFTER REBOOT
service squid start/restart/reload
chkconfig squid on
To set the proxy settings in Firefox, navigate to Edit->Preferences. In the General settings,
click on the Connection Settings... button. Click the Manual proxy configuration radio button.
Add localhost in the HTTP Proxy: box, and 3128 in the Port: box. Click OK to accept the
changes.
Try accessing a web page somewhere.

POP SERVER

POP SERVER
INSTALLING RELEVANT PACKAGES:
The POP Daemon is blunded with another daemon that provides similar functionality, the
IMAP daemon , anb both are found within the dovecot package.
INSTALL THE DOVECOT RPM USING YUM INSTALLER
yum -y install dovecot
EDIT THE /etc/dovecot.conf FILE AND ADD THE FOLLOWING LINE
vim /etc/dovecot.conf
protocols= pop3 pop3s
TO ENABLING THE SERVICES
service dovecot start/restart/reload
service cyrus-imapd start/restart/reload
CONFIRMING THE SERVICE:
echo " this is test mail" | mail -s "hello user" user
THEN CONNECT TO POP SERVER
telnet stationx.example.com 110
+OK Dovecot ready.
user user
+OK
pass 1
+OK Logged in.
stat
+OK 1 691
TOP 1 691
+OK
Return-Path: <root@station9.example.com>
X-Original-To: user@station9.example.com
Delivered-To: user@station9.example.com
Received: from station9.example.com (localhost.localdomain [127.0.0.1])
by station9.example.com (Postfix) with ESMTP id A5F35ABB9E
for <user@station9.example.com>; Fri, 7 Sep 2007 11:48:14 +0530 (IST)
Received: (from root@localhost)
by station9.example.com (8.13.8/8.13.8/Submit) id l876IE8j005986
for user; Fri, 7 Sep 2007 11:48:14 +0530
Date: Fri, 7 Sep 2007 11:48:14 +0530
From: root <root@station9.example.com>
Message-Id: <200709070618.l876IE8j005986@station9.example.com>
To: user@station9.example.com
Subject: hello user
this is test mail
Now we have properly installed POP server
USING A POP CLIENT
Most popular Mail User Agents today, such as mozilla, mutt, evolution, are POP aware, and
can be used as POP clients.
There is also a popular command-line POP client called "fetchmail". fetchmail is highly
configurable, can query multiple mailboxes, and can run in daemon mode, such that it could query a
user's mailbox every five minutes.
fetchmail delivers the mail pasing it off to the MTA an a localhost, usually "sendmail".
vi ~user/.fetchmailrc
poll stationX.example.com with protocol pop3:
user user there is user user here
password "redhat"
The passwords are stored in this file, fetchmail will refuse to run unless you make the file readable
only by owner
chmod 600 ~user/.fetchmailrc
chown user ~user/.fetchmailrc
Attempt to "pop" your mail as user.
echo " testing" | mail -s "hi" user
su - user
fetchmail -v
logout
Now fetchmail is able to fetch mails from other hosts.
RECEIVING MAIL USING POP3
STEP 1 : telnet 192.168.0.X 110
STEP 2 : user
STEP 3 : pass
STEP 4 : stat + ENTER
STEP 5 : top + ID
STEP 6 : "." + ENTER
STEP 7 : quit

NIS SERVER CONFIGURATION

NIS SERVER CONFIGURATION
INSTALL THE PACKAGES NEEDED USING YUM INSTALLER
yum -y install ypserv
yum -y install portmap
MODIFY THE CONFIGURATION FILE /etc/sysconfig/network As Follows
vim /etc/sysconfig/network
Add a line as follows
NISDOMAIN=RHCE
This will take effect the next time you reboot your machine.
RUN THE FOLLOWING COMMAND TO SET THE NISDOMAIN NAME
nisdomainname RHCE
START THE SERVICES NEEDED FOR CONFIGURATION AND CONFIGURE IT TO START ON
BOOT:
service portmap start/restart/reload
service ypserv start/restart/reload
chkconfig portmap on
chkconfig ypserv on
CREATE A REMOTE HOME DIRECTORY
mkdir /rhome
ADD USERS SUCH THAT THEIR HOME DIRECTORIES ARE IN /rhome
useradd -d /rhome/
PROVIDE PASSWD FOR THE USERS
passwd
EXPORT THE REMOTE HOME DIRECTORY
vi /etc/exports
/rhome *(rw,sync)
exportfs -r
service portmap restart
service nfs restart
chkconfig portmap on
chkconfig nfs on
exportfs -v
GENERARE THE NIS DATABASE BY RUNNING THE FOLLOWING COMMAND, AND WATCH IT'S
OUTPUT FOR ANY ERRORS MESSAGES.
/usr/lib/yp/ypinit -m
Press Ctrl+D
type "y" then press ENTER
START THE YPPASSWDD SERVICE TO UPDATE PASSWORDS, AND ENABLE AFTER THE
REBOOT
service yppasswdd start/restart/reload
chkconfig yppasswdd on
NIS CLIENT CONFIGURATION
INSTALL THE FOLLOWING PACKAGES USING YUM INSTALLER
yum install -y portmap
yum install -y ypbind
yum install -y yp-tools
yum install -y authconfig
yum install -y authconfig-gtk
CONFIGURATION:
system-config-authentication (graphical)
or
authconfig-tui (text)
ENABLE THE FOLLOWING
Enable NIS support
then Enter the following
NIS DOMAIN RHCE
NIS SERVER 192.168.0.X or Domainname
ypbind should now start up successfully
EDIT THE /etc/auto.master FILE
vim /etc/auto.master
/rhome/
/etc/auto.misc --timeout=60
This line specifies that /etc/auto.misc defines mount points in /rhome/ managed by
the automounter. When not in use for more than 60 seconds, filesystems mounted on those mount
points are automatically unmounted.
CREATE AND EDIT /etc/auto.misc
vim /etc/auto.misc
  -fstype=nfs 192.168.0.X:/rhome/
where X is your NIS server IP Address.
START AND ENABLE THE SERVICES AFTER REBOOT
service autofs start/restart/reload
chkconfig autofs on
service ypbind start/restart/reload
chkconfig ypbind on
NISUSER login should be successfully display the home directory of the NISUSER

NFS Network File Service

NFS
NETWORK FILE SERVICE
TO CHECK THE PACKAGE AS FOLLOWS
yum list nfs-utils
IF THE RPM IS NOT AVAILABLE INSTALL THROUGH YUM
yum install nfs-utils
Before configuring the NFS server, observe the RPC services you are now running
rpcinfo -p
MAIN CONFIGURATION SHOULD BE WRITTEN IN /etc/exports
vi /etc/exports
Now we are going to share the '/var/ftp/pub' directory to the redhat.com network, enter the following:
/var/ftp/pub
or
/var/ftp/pub
*.redhat.com(rw,sync,no_root_squash)
192.168.0.0/255.255.255.0(rw,sync,no_root_squash)
START THE DAEMON SERVICES
service portmap start/restart/stop/reload
service nfs start/restart/stop/reload
chkconfig portmap on
chkconfig nfs on
TO VERIFY THE FILES ARE EXPORTED USING THE FOLLOWING
showmount -e localhost
or
/var/ftp/pub *.example.com
/var/ftp/pub 192.168.0.0/255.255.255.0
exportfs -v
/var/ftp/pub
/var/ftp/pub
192.168.0.0/255.255.255.0(rw,wdelay,no_root_squash)
*.example.com(rw,wdelay,no_root_squash)
CLIENT SIDE CONFIGURATION:
To check which directory is exported
showmount -e
mount the shared directory to your local file system
mount 192.168.0.x:/var/ftp/pub /mnt

MAIL CERTIFICATION

MAIL CERTIFICATION
INSTALL THE DOVECOT RPM USING YUM INSTALLER
yum -y install dovecot
CONFIGURATION FILE CAN BE EDITED AS FOLLOWS
vim /etc/dovecot.conf
SEARCH FOR THE TEXT "protocols" THEN COPY THE LINE AND ENABLE IT.
protocols = imap imaps pop3 pop3s
STARTING SERVICE AND ENABLING FOR AFTER REBOOT
service dovecot restart
chkconfig dovecot on
MAKING THE POP3 CERTIFICATION
make -C /etc/pki/tls/certs dovecot.pem
TO ENABLE THE SSL CERTIFICATE PRIVATE KEY.
cp /etc/pki/tls/certs/dovecot.pem /etc/pki/tls/private/dovecot.pem
vim /etc/dovecot.conf
SEARCH FOR THE TEXT "pki" THEN COPY THE LINES AND MODIFY IT
ssl_cert_file = /etc/pki/tls/certs/dovecot.pem
ssl_key_file = /etc/pki/tls/private/dovecot.pem
RESTARTING THE SERVICE AFTER THE MODIFICATION OF CONFIGURATION FILE
service dovecot restart
VERIFYING THE CERTIFICATE CREATED
mutt mailto:-f%7Broot@stationX.example.com}
This is the certificate created to the example.com, it can be used by the users of that domain.
NEW ALIASES
TO FORWARD MAIL TO ANOTHER USER:
EXAMPLE: forward root's mail to user manager
THE MAIN CONFIGURATION FILE IS /etc/aliases
vim /etc/aliases
ENTER THE FOLLOWING DATA IN THE LAST LINE
root:
TO ENABLE THE ALIASES RUN
newaliases
VERIFY THIS BY SENDING MAIL TO ROOT, THIS MAIL IS RECEIVED BY THE USER MANAGER.
echo " message to root " | mail -v -s aliases root@stationx
manager

Mail server

Packages needed: sendmail, sendmail-cf, sendmail-doc

port used by this daemon : 25

Using yum installer to install the RPM's needed for configuration

yum list sendmail*
yum install sendmail*

CONFIGURING THE MTA TO RECEIVE MAIL

make a backup of your original sendmail.cf and sendmail.mc:
cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.orig
cp /etc/mail/sendmail.mc /etc/mail/sendmail.mc.orig
EDITING THE CONFIGURATION FILE
vim /etc/mail/sendmail.mc
search text /127.0.0.1
comment the line using "dnl #"



ENTER THE FOLLOWING ENTRY IN THE LAST LINE

Cw
Cwstationx.example.com
local-host-names - INCLUDE ALL ALIASES FOR YOUR MACHINE HERE.
vim /etc/mail/local-host-names
station9.example.com
www9.example.com
THEN REDIRECT sendmail.mc ENTRY TO sendmail.cf
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

START THE DAEMON SERVICES AND ENABLE AFTER REBOOT

service sendmail start/restart/reload/stop

chkconfig sendmail on
STARTING AND VERIFYING MTA OPERATION

TO CONFIRM THE SENDMAIL IS ENABLED FOR THE APPROPRIATE RUNLEVELS
chkconfig --list sendmail

IF IT IS NOT STARTED, TRY THE FOLLOWING TO START

ntsysv
serviceconf
sendmail -d0 < /dev/null

if sendmail is returning your station name as localhost, you have a misconfigured /etc/hosts, so

remove the localhost entries in /etc/hosts. Check the hostname in /etc/sysconfig/network
==>text mode

==>GUI mode
echo "this is the message"
mail -v -s this is the subject root@stationx

SENDING MAIL USING SMTP
STEP 1 : telnet 192.168.0.X 25
STEP 2 : helo stationX.example.com
STEP 3 : mail from : user@
STEP 4 : rcpt to : user@
STEP 5 : data + ENTER
STEP 6 : type the message
STEP 7 : "." + ENTER
STEP 8 : quit + ENTER

Dynamic Host Configuration Protocol

DHCP SERVER
Dynamic Host Configuration Protocol
This server is used to allocate the IP ADDRESS dynamically for the hosts connected to this server
PACKAGE REQUIRED : dhcp
yum list dhcp
IF THE RPM IS NOT INSTALLED THEN USING YUM TO INSTALL
yum install dhcp
STEP 1: Copy the sample file and rename it
cd /usr/share/doc/dhcp-3.0.1/
cp dhcpd.conf.sample /etc/dhcpd.conf
STEP 2: Edit the configuration file as follows
vi /etc/dhcpd.conf
option routers
option subnet-mask
option domain-name
option domain-name-servers
if we want to allocate IP dynamically then do the following:
range dynamic-bootp 192.168.0.200 192.168.0.225;
default-lease-time 21600;
max-lease-time 43200;
if we want to specify a particular HOSTNAME should have to assign a same IP then do the following:
host station201 {
192.168.0.254;
255.255.255.0;
"linux.com";
192.168.0.254;
next-server station201.linux.com;
hardware ethernet 00:50:FC:2A:AB:9D;
fixed-address 192.168.0.201;
}
:wq!
STEP 3: To enable the services
service dhcpd start/restart/reload
chkconfig dhcpd on

Redhat Enterprise Linux Essentials

DISPLAY THE DATE AND TIME
- date
DISPLAY THE CALENDAR
- cal
cal 5 2007
HELP COMMANDS
- whatis
whatis date
Note: whatis actually uses the database called whatis, update the database using the
command 'makewhatis'
- --help
date --help
- man
man cal
man -k (search a keyword present in man pages)
man 5 passwd
- info
info cal
CURRENT WORKING DIRECTORY
- pwd - print name of current/working directory
ABSOLUTEPATH
Begin with a forward slash, complete road map of file location.
vim /var/named/chroot/etc/named.conf
RELATIVE PATH
Do not begin with a slash, specify location relative to your
current working directory
cd var
cd named
CHANGING DIRECTORIES
--> To an absolute path
ex: cd //
--> To an relative path
ex: cd
--> To your home directory (anyuser including root)
cd
--> To a your previous working directory
cd -
--> To a your previous directory
cd ..
LISTING DIRECTORY CONTENTS
--> ls ( lists the contents of the current directory)
--> ls -a (include hidden file)
--> ls -l (or) ll (long listing)
--> ls /usr (display contents of the directory)
--> ls *.
--> ls -R (displays files including sub directories)
--> ls -ld (directory and symlink information)
COPY FILES AND DIRECTORIES
--> cp [options] file destination
--> cp [options] file1 file2 destination
--> cp -i (ask for overwriting a file)
--> cp -r (copy a directory and subdirectry)
MOVING AND RENAMING FILES AND DIRECTORIES
--> mv (move and rename directories,files)
--> mv [options] file destination
--> mv [options] file1 file2 destination
-f, --force
do not prompt before overwriting
-i, --interactive
prompt before overwrite
CREATING FILES
--> touch (create the empty files)
--> touch {one,two}.
--> vi ( view and edit the files)
--> vi . ( create the hidden files)
--> cat > ( create the new file)
REMOVING FILES
--> rm
--> rm *.
--> rm -i
--> rm -r
--> rm -f
(interactive)
(recursive)
(force)
CREATING DIRECTORY
--> mkdir

(creates the directories)
--> mkdir -p /
(creates the directory and sub directory)
REMOVING THE DIRECTORY
--> rmdir < Empty directory Name>
--> rm -i

--> rm -r

--> rm -f

DETERMINING FILE CONTENT
-
VIEWING TEXT PAGE BY PAGE
-
(interactive)
(recursive)
(force)
file
less [options] [filename]
Space
b
Enter
k
g
G
/text
q
v
Ex: less /etc/passwd
(moves ahead one full screen)
(moves back one full screen)
(moves ahead one line)
(moves back one line)
(moves to the top of the line)
moves to the bottom of the line)
(searches for text)
(quits)
(go to vim editor mode and returns)
USERS, GROUPS, AND PERMISSIONS
- Users and groups are used to control access to files.
- Every file is owned by a user and associated with group
- Every process has an owner and group affiliation.
USERS
- Every user is assigned a unique user ID number(uid)
- Users' names and uids are stored in /etc/passwd
- Users are assigned a home directory and a progam that is run when
they log in.(A shell is a program)
Ex: useradd
GROUPS
- Users are assigned to groups
- Each group is assigned a unique Group ID number(gid)
- gids are stored in /etc/groups
- Each user is given their own private group
- All users in a group can share files that belong to the group.
Ex: groupadd
PERMISSIONS
- File and directories have permissions to determine user’s access-levels.
- permissions are set to:
i)the owner of the file
ii) the group members
iii) all others
- permissions that are set are called read,write,and excute
PERMISSIONS TYPES
- Four symbols are used to when displaying permissions
r --> read the file or list a directory's contents
w --> write the file or create and remove files from directory
x --> permission to execute a program or change into a directory and do
a long listing of the directory
- --> no permissions.
Note: file permissions are viewed by "ls -l" and ll (long listing)
CHANGING FILE OWNERSHIP
- chown [-R] username
where R is recursive
Note: Only root can change a file’s owner
CHANGING GROUP OWNERSHIP
- chgrp[-R] groupname
Note: Only root or the owner can change a file's group
DEFAULT PERMISSIONS
Default permission for directories is 777 minus umask
Default permission for files is the directory default without execute permission.
umask is set with the umask command.
Non-privileged users' umask is 002
Files will have permissions of 664
Directories will have permissions of 775
root's umask is 022
CHANGING PERMISSIONS -SYMBOLIC METHOD
- chmod [-R] mode
mode:
u,g,o for user, group and other
+ or - for grant or deny
r,w or x for read write and execute
Ex:
Full permission to user, group and others
chmod u+rwx,g+rwx,o+rwx
or
chmod ugo+rwx
Full permission to user, read permission to group and read permission to others.
chmod u+rwx,g+r,o+r
Full permission for the user and the group, read permission for the others
chmod ug+rwx,0-wx
CHANGING PERMISSIONS - NUMERIC METHOD
- uses a three-digit mode number
First digit specifies owner's permissions
Second digit specifies group's permissions
Third digit specifies other's permissions
- permissions are calculated by adding
4 for read
2 for write
1 for execute
Ex: chmod 777
Full permission to all
chmod 641
Read and write permission to owner,
Read permission for the group,
Execute permission for others

No space left on device/filesize limit exceeded in AIX 6.1

When transfering file by FTP,
will get a error message "No space left on device/filesize limit exceeded" in AIX 6.1

$ pwd
/home/oracle
$ ftp 192.168.124.62
Connected to 192.168.124.62.

220 192.168.124.62 FTP server (Version 4.2 Thu Dec 16 16:45:49 CST 2010) ready.
Name (192.168.124.62:oracle): oracle
331 Password required for oracle.
Password:
230 User oracle logged in.


ftp > cd /app/soft
250 CWD command successful.
ftp> ls -ltr
200 PORT command successful.
150 Opening data connection for /bin/ls
-rwx------ 1 oracle oinstall         141852 Dec 27 15:18  unzip

-rwx------ 1 oracle oinstall 1073741312 Dec 27 17:35 10gr2_aix5l64_database.cpio.gz

ftp > hash
ftp > get 10gr2_aix5l64_database.cpio.gz
200 PORT command successful.

150 Opening data connection for 10gr2_aix5l64_database.cpio.gz
###############################################
###############################################
###############################################
#############...
10gr2_aix5l64_database.cpio.gz: short write

No space left on device/filesize limit exceeded.
226 File send OK.
225 No transfer to ABOR.

ftp > bye
 _______________________________


But in 192.168.1.124.62 server
There is enough space on the mount points.


$ df -g
Filesystem GB blocks    Free %Used    Iused %    Iused Mounted on
/dev/hd4        1.00         0.93     8%       2795        2%         /
/dev/hd2        2.00         0.80   61%     29055      13%        /usr
/dev/hd9var   6.00         5.22   14%         621        1%        /var
/dev/hd3        3.00         2.91     3%       1251        1%       /tmp
/proc              -              -           -                 -         -         /proc
/dev/hd10opt 2.00         0.94   53%       8306        4%       /opt
/dev/fslv00   45.00       26.86   41%   629463      10%      /app
/dev/fslv01     5.00         2.18   57%       4497        1%      /home
/dev/fslv02   80.00       70.41   12%       9779        1%     /data

So, Login into "root" user,
$ sudo su -
password root: ********


root:/home #
edit the /etc/security/limits file,

and add the oracle user with value "unlimit" or "-1"
# view /etc/security/limits

root :
                fsize = -1
                data = -1
                  rss = -1
              stack = -1
               core = -1
      fsize_hard = -1
       cpu_hard = -1
      data_hard = -1
    stack_hard = -1
     core_hard = -1
           nofiles = -1


oracle:

            fsize = -1
            data = -1
              rss = -1
          stack = -1
           core = -1
  fsize_hard = -1
   cpu_hard = -1
  data_hard = -1
stack_hard = -1
 core_hard = -1
       nofiles = -1

Finally, you have to restart the machine to take effects the changes. . .
after reboot, now you can transfer what ever you want...

Tuesday 27 December 2011

தஞ்சைப் பிரகதீசுவரர் கோயில்

தஞ்சைப் பெருவுடையார் கோயில் அல்லது பிரகதீசுவரர் கோயில் [1] அல்லது தஞ்சை பெரிய கோயில் [2] தஞ்சாவூரிலுள்ள இந்து சமயக் கோயிலும் உலகப் பாரம்பரியச் சின்னமும் ஆகும். இக்கோயில், 10 ஆம் நூற்றாண்டில், சோழப் பேரரசு அதன் உச்ச நிலையிலிருந்தபோது, இராஜராஜ சோழ மன்னனால் கட்டப்பட்டது. ஆரம்பத்தில் இராஜராஜேஸ்வரம் என்றும், பின்னர், தஞ்சையை நாயக்கர்கள் ஆண்டகாலத்தில், தஞ்சைப் பெருவுடையார் கோயில் என்றும் அழைக்கப்பட்ட இக் கோயில், 17, 18ஆம் நூற்றாண்டுகளில் மராட்டிய மன்னர்களால் ஆளப்பட்டபோது பிருகதீசுவரம் ஆகியது. தஞ்சைப் பெரியகோவில் எனவும் இக்கோவில் அறியப்படுகிறது.

இக்கோயில் கட்டப்பட்டபோதிருந்த காலம், சோழராட்சியின் பொற்காலமாகும். தமிழ்நாடு முழுவதும் ஒரே குடைக்கீழ் இருந்ததுடன், எல்லைக்கப்பாலும் பல இடங்கள் சோழப் பேரரசின் கீழ் இருந்ததுடன், பெருமளவு வருவாயும் கிடைத்துவந்தது. பெருமளவு ஆள்பலமும், அரசனின் சிவபக்தியோடு கூடிய ஆளுமையும், இத்தகையதொரு பிரம்மாண்டமான கோயிலை சுமார் 7 ஆண்டுகளில் கட்டிமுடிப்பதற்குத் துணையாக இருந்தது.

இன்று தமிழகத்தின் மிக முக்கியமான சுற்றுலாத்தலமாக விளங்கும் இது 1987ம் ஆண்டு ஐக்கிய நாடுகள் கல்வி, அறிவியல், பண்பாட்டு நிறுவனத்தால் உலக பாரம்பரிய சின்னமாக அறிவிக்கப்பட்டது[3]

1006ம் ஆண்டு கட்டத் தொடங்கி 1010ம் ஆண்டு முடிக்கப்பட்ட இந்த கோயிலுக்கு 2010வது ஆண்டோடு 1000 வயது பூர்த்தியாகின்றது[4].


பொருளடக்கம் [மறை]

1 மத்திய சோழர் காலம்

2 கோயில் அமைப்பு

3 கல்வெட்டுக்கள்

4 நந்தி

5 தஞ்சை பெரியகோவில் உருவம் பதித்த தபால் தலை

6 ஆயிரம் ரூபாய் நோட்டு

7 ஆயிரமாண்டு நிறைவு விழா


மத்திய சோழர் காலம்கி.பி. 985 முதல் 1070 வரை சோழர் கலை உயர்வடைந்து உச்ச நிலையில் இருந்தது. இந்தக் காலத்தை மத்திய சோழர் காலம் என்றழைக்கலாம், இந்தக் காலத்தில் ஏராளமான கோயில்கள் கட்டப்பட்டன. பரந்து கிடந்த சோழப் பேரரசு எங்கும் கோயில்கள் கட்டும் பணி தொடர்ச்சியாக நடந்தது. இக்காலத்தில் எத்தனையோ சிறு கோயில்கள் கட்டப்பட்டன.

           கோயில் அமைப்புசோழப் பேரரசின் விரிந்துவரும் பரப்பிற்கும் வளர்ந்து வரும் வசதிக்கும் ஓங்கிவரும் அதிகாரத்திற்கும் பொருத்தமாகக் கட்டடக் கலையில் தமிழருடைய சாதனையாக இந்தக் கோயிலை இராஜராஜன் கட்ட நினைத்தான் போலும் முக்கியமான கட்டடம் 150 அடி நீளம் இருக்கிறது. மிகப் பிரம்மாண்டமான விமானம் எகிப்தியப் பிரமிடுகளைப் போல கூர்நுனிக் கோபுரமாக அமைந்து கர்ப்பக்கிரகத்திலிருந்து 190 அடி உயரத்திற்கு ஓங்கி வளர்ந்திருக்கிறது. அக்காலத்தில் புவனேஸ்வரத்தில் கட்டப்பட்ட லிங்கராஜர் கோயிலின் உயரம் 160அடி. இராஜராஜேஸ்வரம் அதையும் மிஞ்சி விட்டமை குறிப்பிடத்தக்கது. இந்தக் கோயிலில் பிற்காலத்தில் கட்டப்பட்டவை - முன் தாழ்வாரம், நந்தி மண்டபம், கருவூர்த் தேவர் கோயில, அம்மன் கோயில், சுப்பிரமணியர் கோயில் ஆகியன.

           தஞ்சைப் பெரிய கோயில், ஒரு தோற்றம்இவை தவிர இந்த மாபெரும் கோயிலின் ஏனைய பகுதிகள் யாவும் ஒரே காலத்தவை. இவற்றினுடைய பெருமிதத் தோற்றத்தையும் ஒருங்கிணைந்த திட்டத்தின் எளிமையான இயல்பையும் பாராட்டாமல் இருக்கமுடியாது. துணைச் சார்ந்த(Axial)மண்டபங்களும் விமானமும் அர்த்த மண்டபமும் மகாமண்டபமும் பெரிய நந்தியும் அவற்றிற்கேற்ற பொருத்தமான அளவுகளையுடைய ஒரு சுற்றுச் சுவருக்குள் அடங்கியிருக்கின்றன. இச்சுவரில் கிழக்கே ஒரு கோபுரம் இருக்கிறது. மதிலை ஒட்டி உள்பக்கமாக பல தூண்களுள்ள ஒரு நீண்ட மண்டபம் செல்லுகிறது. இது 35 உட்கோயில்களை இணைக்கிறது. நான்கு திக்குகளிலும் பல இடைவெளிகளுக்கு நடுவே கேந்திரமான இடங்களில் இந்த உட்கோயில்கள் கட்டப் பெற்றிருக்கின்றன. இரண்டாவது வெளிப் பிரகாரத்தின் வாயிலாக இருந்த இடத்தில் முன் பக்கத்தில் இரண்டாவது கோபுரம் இருக்கிறது.

           முக்கிய விமானம் உத்தம வகையச் சார்ந்தது; ஆதலால் இது மிகச் சிறந்தது. இதை, தமிழில் மாடக்கோயில் என்றும் சொல்வார்கள். இவ்வகைக்கு முதலாவது உதாரணம் தட்சிணமேரு-கோரங்கநாதர். இது பக்கவாட்டில் 99 அடி உள்ள சதுர அடித்தளத்தில் மீது அமைந்தது. படுக்கையான பகுதி, நீண்டு துருத்திக் கொண்டிருக்கும். ஐந்து பகுதிகளாக பிரிக்கப்பட்டிருக்கிறது. நடுவேயுள்ள பகுதி மற்ற பகுதிகளை விடப் பெரியது. தர மட்டத்துக்குக் கீழே இருக்கும் தளத்திலிருந்து சிகரம் வரை குடாவும் மாடமும் மாறி மாறிக் காணப்படுகின்றன. சுவரில் பதித்த தூண்கள், பீடத்தை அழகுபடுத்துகின்ற்ன. யாளி உருவத்தால் அழுத்தப்பட்ட கபோதம் உடைய பீடத்தின் மீது, இதைவிடச் சிறிய பரப்பில் 63அடி சதுரத்தில் ஒரு உபபீடம் எழுப்பப்பட்டிருக்கிறது.

            மேலேயும் கீழேயும் பத்மதளங்கள் உடையதும் அரை வட்ட வடிவத்தில் பிரம்மாண்டமானதாய் அமைந்ததுமான குமுதத்தை ஏற்றுக்கொள்ள பத்ம தளமாக, கல்வெட்டுக்களுடன் கூடிய உபானம் விளங்குகிறது. குமுதம், கிழக்கு மூலையில் குறுக்காகத் திரும்பும் போது, விளிம்பில் எண்கோணமாக வெட்டப்படுகிறது. கண்டமும் கபோதமும் நெருங்கிக் காட்டப்பட்டுள்ளன. குமுதத்திற்கு நேர் உயரத்தில் வரி விமானம் கானப்படுகிறது. வரிசையாகப் பல சிங்கங்கள், அவறின் மீது சிங்கங்களை ஓட்டுபவர் மூலைகளில் சிங்களுக்குப் பதிலாக, மகரங்களும் போர் வீரர்களும் வாயைப் பிளந்து கொண்டிருக்கும் குதிரைகளும் அவற்றின் மீதேறிச் சவாரி செய்பவர்களின் உருவங்களும் உள்ளன. உள்ளுறையின் செங்குத்தான சுவர்கள் தள அமைப்பைப் பின்பற்றிய 50அடி உயரத்துக்கு எழுப்பப்பட்டுள்ள, பிரம்மாண்டமான வளைந்த பிதுக்கம் அந்தச் சுவர்களை இரண்டு மாடிகளாகப் பிரிக்கிறது.

             கல்வெட்டுக்கள்இக் கோயிலின் பலவிடங்களிலும் இருக்கும் கல்வெட்டுக்கள், இக் கோயிலில் இராஜராஜன் கொண்டிருந்த தனிப்பட்ட கரிசனத்தை விளக்குவதாகக் கூறப்படுகிறது. தான் மட்டுமன்றி, அரச குடும்பத்தினரும், அரச அலுவலரும், படையினரும், பொதுமக்களும் ஆகிய எல்லோருடைய பங்களிப்பும், கோயிலின் பராமரிப்பிலும், பாதுகாப்பிலும் இருக்கும்படி பார்த்துக்கொண்டானெனவும் தெரிகிறது. நிதித்தேவைகளும், அரசனால் இறையிலியாகக் கொடுக்கப்பட்ட நிலங்களிலும், கிராமங்களிலிருந்தும் வரும் வருவாயினாலும், இன்னும் வேறு வழிகளிலும் பெற்றுக்கொள்ளப்பட்டது.

           தஞ்சை பெரிய கோயில், இன்னொரு தோற்றம்கோயிலில் அன்றாட கருமங்களை ஒழுங்காகச் செயல்படுத்துவதற்குப், பூசகர்களும், சிற்பிகளும் தேவார ஓதுவார்களும், இசைவாணர்களும், நடனமாதர்களும், மேலும் இன்னோரன்ன பணியாட்களும் தேவைகளுக்கேற்ப நியமிக்கப்பட்டிருந்ததாகத் தெரிகிறது. 50 ஓதுவார்களும், 400 நடன மாதர்களும் கோயிலிலிருந்ததாகக் கல்வெட்டுச் சான்றுகள் பகர்கின்றன.

          சிவலிங்கம் பிரதிட்டை செய்யப்பட்டுள்ள, முக்கியமான கோயிலையும், அதனோடு கூடிய மண்டபங்களையும் தவிர, சண்டிகேஸ்வரர், அம்மன், சுப்பிரமணியர், கணபதி மற்றும் கருவூர்த் தேவர் கோயில்களும், இவ் வளாகத்துள் அமைந்துள்ளன.

          ஆலயத்தினைப் பற்றி அதன் வாயிலில் உள்ள செய்திப்பலகைஇக்கோயிலின் கட்டிடக்கலை, சோழர்காலக் கட்டிடக்கலைக்கு நல்லதொரு எடுத்துக்காட்டாகக் கருதப்படுகிறது.

          நந்திதஞ்சைப் பெரியகோவிலில் உள்ள நந்தி ஒரே கல்லால் செய்யப்பட்டது. இதன் உயரம் 14 மீ, நீளம் 7 மீ, அகலம் 3 மீ ஆகும். நந்தி மண்டபம் நாயக்கர் காலத்தில் கட்டப்பட்டதாகக் கூறப்படுகிறது.[5]

       தஞ்சை பெரியகோவில் உருவம் பதித்த தபால் தலை
மத்திய அரசு 1995ம் ஆண்டில் மாமன்னர் ராஜராஜ சோழன் உருவம் பதித்த 2 ரூபாய் தபால் தலையை வெளியிட்டது.

ஆயிரம் ரூபாய் நோட்டு

தஞ்சை பெரிய கோவிலுக்கு பெருமை சேர்க்கும் வகையில் மத்திய அரசு சார்பாக கடந்த 1954&ம் ஆண்டு ஏப்ரல் 1ஆம் தேதி 1000 நோட்டை வெளியிட்டது. அதில் தஞ்சை பெரிய கோவில் எனப்படும் பிரகதீசுவரர் ஆலயத்தின் வியத்தகு தோற்றம் பதிக்கப்பட்டது. ரிசர்வ் வங்கியின் 4&வது கவர்னரான சர் பெனகல் ராமாராவ், அதில் கையெழுத்திட்டார். டெல்லி, மும்பை, கொல்கத்தா, சென்னை மற்றும் கான்பூர் ஆகிய நகரங்களில் அந்த ஆயிரம் ரூபாய் நோட்டுகள் அச்சிடப்பட்டன. 5 வரிசைகளிலான எண்களில் அந்த நோட்டுகள் வெளியாகின. மும்பையில் அச்சிடப்பட்ட நோட்டுகளின் வரிசை ஆங்கில எழுத்து ஏ ஆகும்.

ஆயிரமாண்டு நிறைவு விழா

சதயத்திருவிழாத் தோற்றம்தஞ்சை பெரிய கோவிலின் ஆயிரம் ஆண்டு நிறைவு விழாவினை தஞ்சை மாநகரில் 2010 செப்டம்பர் 25, செப்டம்பர் 26-ந் தேதி ஆகிய 2 நாட்களுக்கு சிறப்புற நடத்தப்பட்டது.


மத்திய மந்திரி ஆ. ராசா பெரியகோவில் உருவம் பொறித்த 5 ரூபாய் சிறப்பு தபால் தலையை முதல்-அமைச்சர் மு. கருணாநிதி முன்னிலையில் வெளியிட்டார். அதை மத்திய மந்திரி ஜி.கே.வாசன் பெற்றுக்கொண்டார்.

சிறப்பு தபால் தலையின் மாதிரி வடிவத்தை, முதல்-அமைச்சர் கருணாநிதி திறந்து வைத்தார். பின்னர் மத்திய மந்திரி எஸ்.எஸ்.பழனிமாணிக்கம் பெரிய கோவில் மற்றும் ராஜராஜன் உருவம் பொறித்த 5 ரூபாய் நாணயத்தை வெளியிட, அதை மத்திய மந்திரி நாராயணசாமி பெற்றுக்கொண்டார்.

விழாவின் முதல் நாள் காலை முதல் நாட்டுப்புறக் கலைஞர்களின் பல்வேறு தெருவோர நிகழ்ச்சிகள் நகரின் பல பகுதிகளில் நடத்தப்பட்டது. மாலையில் தஞ்சை பெரிய கோவிலில் அனைத்திந்திய பரதநாட்டிய கலைஞர்கள் சங்கத்தின் சார்பில் பத்மா சுப்ரமணியத்தின் தலைமையில் ஆயிரம் நடனக்கலைஞர்கள் கலந்து கொண்ட மாபெரும் நிகழ்ச்சி இடம்பெற்றது. அந்த நடன நிகழ்ச்சிக்கு முன்பாக நாதஸ்வர இசை நிகழ்ச்சியும், நடன நிகழ்ச்சிக்குப் பின்னர் 100 ஓதுவார்களின் திருமுறை இசை நிகழ்ச்சியும் நடத்தப்பட்டது.

இரண்டாம் நாள் காலையில் தஞ்சை தமிழ்ப்பல்கலைக்கழகத்தில் ஆய்வரங்கமும், தஞ்சை பெரிய கோவிலில் பொது அரங்கமும், மாலையில் தஞ்சை திலகர் திடலில் முதல்வர் கருணாநிதி தலைமையில் தஞ்சை பெரிய கோவில் ஆயிரம் ஆண்டு நிறைவு நினைவு நாணயம் மற்றும் அஞ்சல் தலை வெளியிடுதல், தஞ்சை மாநகருக்கான அடிப்படை கட்டமைப்பு வசதிகளை தொடங்குதல் ஆகிய நிகழ்வுகள் இடம்பெற்றன. வரலாற்று கண்காட்சி ஒன்றும் நடத்தப்பட்டது[6].



சோழர் படை

சோழ மன்னர்களின் பட்டியல்
முற்காலச் சோழர்கள்
செம்பியன்எல்லாளன்
இளஞ்சேட்சென்னிகரிகால் சோழன்
நெடுங்கிள்ளிநலங்கிள்ளி
கிள்ளிவளவன்கோப்பெருஞ்சோழன்
கோச்செங்கணான்பெருநற்கிள்ளி
மாற்றார் இடையாட்சி கி.பி. 200-848
இடைக்காலச் சோழர்கள்
விசயாலய சோழன்கி.பி. 848-871(?)
ஆதித்த சோழன்871-907 CE
பராந்தக சோழன் Iகி.பி. 907-950
கண்டராதித்தர்கி.பி. 949/50-957
அரிஞ்சய சோழன்கி.பி. 956-957
சுந்தர சோழன்கி.பி. 956-973
ஆதித்த கரிகாலன்கி.பி. 957-969
உத்தம சோழன்கி.பி. 970-985
இராசராச சோழன் Iகி.பி. 985-1014
இராசேந்திர சோழன்கி.பி. 1012-1044
இராசாதிராச சோழன்கி.பி. 1018-1054
இராசேந்திர சோழன் IIகி.பி. 1051-1063
வீரராஜேந்திர சோழன்கி.பி. 1063-1070
அதிராஜேந்திர சோழன்கி.பி. 1067-1070
சாளுக்கிய சோழர்கள்
குலோத்துங்க சோழன் Iகி.பி. 1070-1120
விக்கிரம சோழன்கி.பி. 1118-1135
குலோத்துங்க சோழன் IIகி.பி. 1133-1150
இராசராச சோழன் IIகி.பி. 1146-1163
இராசாதிராச சோழன் IIகி.பி. 1163-1178
குலோத்துங்க சோழன் IIIகி.பி. 1178-1218
இராசராச சோழன் IIIகி.பி. 1216-1256
இராசேந்திர சோழன் IIIகி.பி. 1246-1279
சோழர் சமூகம்
சோழ அரசாங்கம்சோழ இராணுவம்
சோழர் கலைசோழர்கால இலக்கியம்
பூம்புகார்உறையூர்
கங்கைகொண்ட சோழபுரம்தஞ்சாவூர்
தெலுங்குச் சோழர்கள்
edit

பொருளடக்கம்

 [மறை
  • 1 படை
  • 2 மூன்று கை மகாசேனையைப் பற்றிய வரலாற்றுக் குறிப்பு
  • 3 சீன அறிஞர்களின் சோழர்படையைப் பற்றிய குறிப்பு
  • 4 கடற்படை
  • 5 போர் விளைவுகள்

படை

கடற்படை, உள்நாட்டின் படை ஆகிய அனைத்திற்கும் அரசரே தலைவர் ஆவார். இப்படை பல பிரிவுகளாக அமைந்து ஒவ்வொரு பிரிவும் தனிப்பெயரால் அழைக்கப்பட்டது. இவை ஒன்றுபட்ட அமைப்பாகவே இயங்கின. தங்கள் பெயராலேயே கோயில்கள் அமைக்கவும் அவற்றிற்குத் தானங்கள் கொடுக்கவும் இப்பிரிவுகளுக்கு உரிமை இருந்தது. தனிப்பட்ட படை வீரர்களும் இவ்வாறு தானம் செய்தவர்களின் பெயர்களும் அவரைச் சார்ந்த படைப்பிரிவின் பெயர்களும் நமக்கு கல்வெட்டுக்களின் மூலம் கிடைத்துள்ளன. இப்படைகளின் இராணுவ வாழ்க்கை முறையைவிட, வீரர்கள் தம் தனிப்பட்ட வாழ்க்கையில் செய்த பணிகளைப் பற்றித்தான் அதிகமாக அறியக் கிடைக்கிறது.
ஏறக்குறைய 30-க்கும் மேற்பட்ட இப்படைப் பிரிவுகளின் பெயர்களை இராஜராஜனின் கல்வெட்டுக்களிலிருந்து அறிஞர் திரு. வெங்கய்யா அவர்கள் சேகரித்திருக்கிறார். இவற்றை இராஜராஜனுக்கு முன்னும் பின்னும் இருந்த பிரிவுகளுடன் சேர்த்துக் கணக்கிட்டால் சுமார் 70 ஆக உயரும். இவை ஒவ்வொன்றின் பெயரும், அப்படைய துவக்கிய காலத்தையும் சூழ்நிலையையும் மக்களுக்கு நினைவூட்டுவதாய் இருந்திருக்கக்கூடும். இதுவரை நாம் அறியாத அரசர்களின் பல விருதுகளே இவற்றின் பெயர்களாயின. உதாரணத்திற்கு பார்த்திப சேகரன், சமரகேசரி, விக்கிரமசிங்கன், தாயதொங்கன், தானதொங்கன், சண்டபராக்கிரமன், இராஜகுஞ்சரயன் போன்ற பெயர்களைச் சொல்லலாம்.
சோழப்படையின் வளர்ச்சியைப் பற்றிய பல்வேறு பகுதிகளைப் பற்றியும் இப்பெயர்களிலிருந்தே அறியலாம். "ஆனையாட்கள்" அல்லது "குஞ்சரமல்லர்" என்றும் குறிப்பிடப்பட்ட யானைப்படையைப் பற்றியும் "குதிரைச் சேவகர்" என்று அழைக்கப்பட்ட குதிரைப்படையைப் பற்றியும் குறிப்புகள் காணப்படுகின்றன. மற்றும் காலாட்படையின் பல பகுதிகள் பற்றியும் குறிப்புகள் கல்வெட்டுக்களின் காணப்படுகின்றன. கைக்கோளாளரைக் கொண்ட பிரிவு "கைக்கோளப் பெறும் படை" என்று அழைக்கப்பட்டது. கைக்கோளர் என்றால் நெசவாளரைக் குறிக்கும் சொல்லாகக் கொள்ளக்கூடாது. கைப்பலம் பொருந்திய வீரர்களைக் கொண்ட படைப் பிரிவைக் குறிப்பதாக கொள்ளவது பொருத்தமாகயிருக்கும்.
வில்லேந்திய வீரர்கள் "வில்லிகள்" என்றும், வாளேந்திய வீரர்கள் "வாள்பெற்ற கைக்கோளர்கள்" என்றும் குறிக்கப்படுகின்றனர். வலங்கை வகுப்பைச் சேர்ந்த வேளைக்காரர் என்போர் போர் படையில் பெரும் எண்ணிக்கையில் இருந்தனர். இலங்கையில் பொலன்னறுவாவிலிருக்கும் விஜயபாகு மன்னன் கல்வெட்டில் இடங்கை வேளைக்காரர்களைப் பற்றிய குறிப்பு காணப்படுகிறது. இவ்வேளைக்காரர் என்போர் தேவைப்பட்ட போது தற்காலிகமாகச் சேர்த்துக் கொள்ளப்பட்ட(அணி) படைச் சேவகர்கள் என்ற கருத்து உள்ளது ஆனால் இது சரியான ஒன்று இல்லை. மாறாக இவர்கள் நிரந்தரமான நம்பிக்கைக்குப் பாத்திரமான சேவகர்களாகப் பணிபுரிந்தனர். பெயருக்கேற்ப வேளை வரும்போது இவர்கள் தம் உயிரையும் கொடுத்து அரசனைக் காப்பாற்றினர் என்றுதான் கருதவேண்டும்.
பிற்கால இலக்கியச் சான்றுகள் சில இக்கருத்துக்கு வலிவு தருகின்றன. பிற்காலப் பாண்டிய நாட்டில் பணியாற்றிய "தென்னவன் ஆபத்துதவிகள்" என்போர் இவ்வேளைக்காரரைப் போன்றவரே. இவர்கள் அனைவரும் அரசரின் அருகிலேயே இருந்தனர் என்றும், மிக்க அதிகாரம் பெற்றிருந்தனர் என்றும் மார்க்கோபோலோ குறித்துள்ளார். படைகளுக்குள் சிறுதனம் பெருதனம் என்ற பாகுபாடும் இருந்ததாக கல்வெட்டுக்களில் இருந்து தெரியவருகிறது.

மூன்று கை மகாசேனையைப் பற்றிய வரலாற்றுக் குறிப்பு

திருநெல்வேலி மாவட்டத்தைச் சேர்ந்த அம்பாசமுத்திரத்தை அடுத்துள்ள திருவாலீசுரத்திலிருக்கும் அரியதொரு கல்வெட்டு அங்கிருந்த மூன்று கை மகாசேனை(மூன்று அங்கங்களைக் கொண்ட பெரும் சேனை)யைப் பற்றிய வரலாற்றுக் குறிப்புக்களைத் தருகிறது. அக்கல்வெட்டு முதலாம் இராஜராஜன் அல்லது முதலாம் இராஜேந்திரன் காலத்திலோ எழுதப்பட்டதாக இருக்கவேண்டும். அக்கல்வெட்டில் காணப்படுபவை.
இவர்கள் விஷ்ணுவையையும் சிவபெருமானையும் வழிபட்டனர். கன்னரதேவனைத் தோற்கடித்துத் துரத்தினர்; காங்கேயனை வென்றனர்; கல்பாடம் என்ற ஊரையும் கடற்கரையிலுள்ள விழிஞத்தையும் அழித்தனர். கடல் கடந்து கிழக்கே சென்று மாதோட்டத்தை அழித்தனர்; மலை நாட்டைக் கைப்பற்றினர்; சாலையிலுள்ள கடற்படையை அறுத்தனர்; வள்ளாளன் என்ற சாளுக்கியரை புறம்காட்டி ஓடச் செய்தனர்; வனவாசி நகரைக் கைப்பற்றினர்; இச்சாதனைகளுக்காக காளஹஸ்தியிலுள்ள தமிழ்ப் புலவர்களால் புகழ்ந்து பாடப் பெற்றனர்; மேலும், குச்சி மலையிலுள்ள கோட்டையை அழித்து உச்சந்தி நகரைப் பிடித்தனர். தங்களை எதிர்த்த வடுகர்களை முறியடித்தனர். வாதாபிக் கோட்டையைத் தகர்த்து அந்நகரையும் கைப்பற்றினர். இம்மகா சேனையினர் பாண்டிய நாட்டில் தங்கியிருந்தனர் என்றும் மூவகையான பெரும் சேனையைச் சார்ந்த அஞ்சாநெஞ்சம் படைத்த வீரர்கள் என்றும் குறிக்கப்படுகின்றனர். திருவாலீசுரம் கோயிலையும் அதைச் சார்ந்த பூசாரி மற்றும் பணியாட்கள் உட்பட அனைத்தையும் இச்சேனையினர் பேணிவந்தனர்.
மேலே குறிப்பிட்டுள்ள வெற்றிகள் அனைத்தும் இராஜராஜன், அவரது மகன் இராஜேந்திரன் காலத்தில் அடைந்த வெற்றிகளாகும். கி.பி. 1096ல் பொறிக்கப்பட்ட சேரன் மாதேவி(சேரமாதேவி) கல்வெட்டு ஒன்றில் இம்மாசேனையினரின் வீரக்கனவுகள் பற்றிக் கூறப்படுகிறது. மற்றொரு கோயிலையும் அதன் சொத்துக்களையும் இம்மான்சேனை தன் பாதுகாப்பின் கீழ்க் கொண்டுவந்தது என்று அந்தக் கல்வெட்டு கூறுகிறது.

சீன அறிஞர்களின் சோழர்படையைப் பற்றிய குறிப்பு

கி.பி. 1178-ல் ஒரு சீன அறிஞர் சோழ நாட்டைப் பற்றியும் சோழர்படையைப் பற்றியும் பின்வருமாறு எழுதியுள்ளார். "இந்நாடு மேற்கு நாடுகளுடன் போரிட்டுக் கொண்டிருக்கிறது. அரசாங்கத்தினரிடம் ஏறக்குறைய அறுபது ஆயிரம் போர் யானைகள் உள்ளன. ஒவ்வொரு யானையும் 6 அல்லது 7 அடி உயரம் உள்ளது. போரிடும்போது யானைகளின் மீது அம்பாரிகள் அமைத்து அவற்றில் வீரர்கள் அமர்ந்து கொண்டு நெடுந்தொலைவிற்கு அம்பு எய்கின்றார்கள். அருகே உள்ளவர்கள் ஈட்டிகளால் தாக்குகின்றனர். வெற்றி அடைந்தவுடன் யானைகளுக்கு விருந்து கொடுத்து கௌரவிக்கின்றனர். சிலர் அவைகளுக்கு பொன்னாலான அம்பாரிகளைப் பரிசாகத் தருகின்றன. ஒவ்வொரு நாளும் அரசர் முன் யானைகள் கொண்டுவரப்படுகின்றன.

கடற்படை

இராஜேந்திரனின் படை வீரரை ஏற்றிச் சென்ற "எண்ணிலடங்காக் கப்பல்கள்" கடல் கடந்து ஸ்ரீவிஜயத்தையும் அதைச் சார்ந்த தீவுகளையும் கைப்பற்றியது ஒரு திடீர் சாதனை அல்ல; சோழர்கள் கடைபிடித்த திட்டவட்டமான கடற்படைக் கொள்கையின் விளைவேயாகும். சங்க காலத்திலேயே சோழர்கள் கடல் வாணிகத்திற்கு அடிகோலினர். பிறகு பல்லவர் காலத்தில் கப்பல் போக்குவரத்துப் பெருகிய காரணத்தால் தென்னிந்தியாவிற்கும், மலேயா(மலேசியா, சிங்கப்பூர்) இந்தோசீனா போன்ற தீவுகளுக்குமிடையில் வாணிகக்கலைப் பண்பாட்டுறவு மேலும் வளர்ந்தது.
9-ம் நூற்றாண்டில் "மணிக்கிராமம்" என்னும் தென்னிந்திய வர்த்தகக் குழு வங்கக்கடலைக் கடந்து எதிர்க் கடற்கரை ஓரத்தில் இயங்கத் தொடங்கிய செய்தியை அங்குள்ள தகுவாபா என்னுமிடத்தில் உள்ள கல்வெட்டு ஒன்று கூறுகிறது. பண்டைய வழக்கப்படியே சோழர்களும் தங்கள் கடல் ஆதிக்கத்தைப் பரப்பும் பணியில் ஈடுபட்டு பல வெற்றிகளைக் கண்டனர். ஈழம், மாலத்தீவு(Sri Lanka and Maldives) ஆகியவற்றைக் கைப்பற்றியது. சீன வரலாற்றில் குறிக்கப்பெற்றது போல, சீன நாட்டிற்கு தூதுக்குழுவை அனுப்பியது. இவையெல்லாம் இம்முயற்சியால் சோழர் கண்ட வெற்றிகளாகும்.
காந்தளூர்ச் சாலை கலமறுத்து, சேரர் படையை முறியடித்துத் தென்னிந்தியக் கடலில் சோழர் தங்கள் நிகரற்ற ஆதிக்கத்தை நிலைநாட்டினர். சோழர் காலத்திய கலங்களின் அமைப்பு எப்படி இருந்தது என்பதைப் பற்றி நேரடியான சான்றுகள் யாதும் கிடைக்கவில்லை. ஆனால் இதற்கும் பல நூற்றாண்டுகளுக்கு முன்னரே மூன்று வகைக் கலங்கள் சோழ மண்டலக் கரையில் உலாவின என்று "பெரிப்ளூஸ்" என்னும் நூல் கூறியுள்ளதையும் பிறகு இராஜேந்திரன் பெரியதொரு கப்பற்படையைக் கொண்டு வெற்றிச் சாதனைகள் புரிந்ததையும் நோக்கும் பொழுது, சோழர் கப்பற்படை சிறியதும் பெரியதுமான பல கொண்ட சிறந்த படையாக அமைக்கப் பெற்றிருந்ததாகத் தோன்றுகிறது.

போர் விளைவுகள்

போர் என்பது இருதரப்பிலுமுள்ள படை வீரர்களுக்கிடையே மட்டும் நடந்த சண்டை எனக்கருதவும், நாட்டின் அன்றாட வாழ்க்கைக்கு ஊறு விளைவிக்கவில்லை என்ற ஓர் எண்ணத்திற்குச் சிறிதும் ஆதாரம் இல்லை. சோழர் கல்வெட்டுக்களிலிருந்தும் அவர்களுடன் போரிட்ட சாளுக்கியரின் கல்வெட்டுக்களிலிருந்தும் நமக்கு தெரியவருவது, அவர்கள் செய்த கடும் போரினால் துங்கபத்திரை நதியின் இரு பக்கங்களில் இருந்த மக்களிடையே பல தலைமுறைக்குத் தாங்கமுடியாத துயரங்களை அப்போர் உண்டாக்கியது. போரிடும் பொழுது கடைபிடிக்கவேண்டிய சில உயர்ந்த மரபுகளையும் கண்ணியத்தையும் கூட மரந்து, அமைதியாக வாழ்ந்த மக்கள் பலவாறு துன்புறுத்தப்பட்டனர்.
ஈழத்திலும் கருநாடகப் பகுதியிலும் கிடைத்துள்ள சான்றுகளை நாம் மறுக்கவோ மறைக்கவோ முடியாது. சாளுக்கியக் கல்வெட்டுக்கள் முதலாம் இராஜேந்திரன் கோயில்களை அழித்தான் என்றும் குற்றம் சாட்டுகின்றன. சமய வேறுபாட்டினால் இது செய்யப்பட்டிருக்கலாம் என்றாலும், பொருளாசையும் ஒரு காரணமாக இருந்திருக்கலாம். சாளுக்கிய நாட்டில் செல்வச் செழிப்புடன் இருந்த பல சமணப் பள்ளிகள்(பஸ்திக்குகள்) ஆழ்ந்த சிவபக்தனான ராஜேந்திரனுக்கு நல்ல வேட்டைக் களமாக அமைந்தன என்று தெரிகிறது. அயல்நாட்டுப் படையெடுப்புக்களிலிருந்து சோழர்களுக்கு கிடைத்த பொருள்கள் ஏராளம். அவ்வாறு கொள்ளையடிக்கப்பட்ட பொன்னையும் பொருளையும் தான், அரசர்கள் தானமாக வாரிக்கொடுத்தனர் என்று அவர்கள் கல்வெட்டுக்கள் வெளிப்படையாக கூறுகின்றன.
பொதுவாக போர்க்களத்தின் மூலம் கிடைத்த பொருள் எல்லாம் அரசரையே சாரும். அவைகளை தன் விருப்பம் போல் பயன்படுத்தலாம். சீப்புலி பாகி நாடுகளில் கைப்பற்றப்பட்ட தொள்ளாயிரம் ஆடுகளை முதலாம் இராஜராஜன் தமது 6-ம் ஆட்சி ஆண்டில் காஞ்சிபுரத்தில் இருக்கும் துர்க்கைக் கோயிலுக்குத் தானமாக அளித்துத் தமது பெயரில் பத்து நந்தா விளக்கேற்றி வைக்கப் பணித்தார் என்று கல்வெட்டுக்கள் கூறுகின்றன. மற்றொரு கல்வெட்டில் மலைநாட்டைக் கைப்பற்றி, அங்கிருந்து கொண்டு வரப்பட்ட படிமங்களில் மரகதத்தேவர் படிமம் ஒன்றை அதிகார் ஒருவர் அரசனிடம் கேட்டுப் பெற்றுக் கொண்டு அதைத் திருப்பழனம் என்னும் ஊரில் கோயில் கொள்ளச் செய்தார் என்றும் குறிப்பிடப்பட்டுள்ளது.