Saturday, January 7, 2012

domain client configuration

[root@localhost named] rpm  -qa  ypbind
[root@localhost named]rpm -ivh  ypbind
[root@localhost named]rpm  -ivh  portmap 
[root@localhost named]rpm  -ivh ypserver
[root@localhost named]authconfig-tai  
domain name  or sever name & server IP 
[root@localhost named]getent  passwd  username  ( to check)
[root@localhost named]vim   /etc/auto.master  
/disc       /etc/auto.disc
/home      /etc/auto.home
save &  exit
[root@localhost named]vim   /etc/auto.home
*    -fstype=nfs      domainIP:/home/$
save  & exit 
* means   any user  can  to log in
if  we provide username to * then  only that user  will gets  access to log in
[root@localhost named] service autofs  restart 

automount & one more user creat at a time

root@localhost named]vim  /etc/auto.master
/misc    /etc/auto.misc
copy the above line   & edit like as the following --
/mountpoint to misc      /etc/
such as   /momin      /etc/
root@localhost named]vim  /etc/
*    -fstype=nfs   serverIP:/data  (source)   /test (mount point)
root@localhost named]service autofs   restart
root@localhost named]cd  /test
root@localhost named]ls   ( to see)
one more user creat  at  a time      
root@localhost named]vim  myusers1 
type here ----
"for  u in u1 u2 u3 u4"
useradd  $u
echo  123| passwd  --stdir  $u 
passwd  $u   ( when he will first log in then he input a password that is his password)  
save &  exit
[root@localhost named]sh   myusers1    (run this command)

some necessary note

[root@localhost named]vim  /etc/sysconfig/network-scripts/ifcfg-eth0
if not shows IP till  you assign IP address on lAN setup the you input IP here manually 
[root@localhost named]ifup  eth0
[root@localhost named]ifdown eth0  ( now you gets IP  )
[root@localhost named]top  ( to see recent process )
[root@localhost named]vim /etc/inittab
we can select run level by default here.
to link a file to another file. 
[root@localhost named]ln  filename   filename ( hard link)
[root@localhost named]ln  -il  filename ( to see inode )
[root@localhost named]ln  -s  filename  filename  ( to soft link)  
[root@localhost named]tail  /etc/group  ( to query a group)
[root@localhost named]passwd  -d username  ( change password)
[root@localhost named]fdisk  -l   ( to see windows disk both)
[root@localhost named]shutdown  -h 10 ( to shutdown pc after 10 minutes )

Run level & SElinux

 [root@localhost named]chkconfig  -- list  vsftpd
 [root@localhost named]service  servicename  status
 [root@localhost named]chkconfig   --level  5 vsftpd off 
 [root@localhost named]chkconfig   vsftpd  off 
 [root@localhost named] chkconfig   --level  35  vsftpd on
 [root@localhost named]chkconfig  --list 
 [root@localhost named]getenforce 
 [root@localhost named]setenforce  1
 [root@localhost named]setenforce  0
 [root@localhost named]vim  /etc/selinux/config
we can  use this file to entry this function.

OS default=client of time server=recover a file of linux os

OS default
[root@localhost named]vim  /etc/grub.conf
just type here  "1" for windows "0" for linux
Time server client configuration
[root@localhost named]
vim  /etc/ntp.conf
just type here  server IP or server name 
[root@localhost named]vim  /etc/ntp/step_tickers
just type here  server IP 
[root@localhost named]service ntpd restart
[root@localhost named]system-config-data 
here go to networktime tab -add -server  IP-ok 
recover a file of linux os
at first  insert a CD into CD ROM  the reboot the PC press "a" during booting type here  "linux rescue"-enter
then you should  to take step as your requirement * 

IP forwarding & prevent ot reply of ping----

[root@localhost named]vim  /etc/sysctl.conf
just enable  IP forwarding  here by  "1"  /against  "0"  1 for enable  0 for disable.
[root@localhost named]sysctl  -p
ping reply prevent-------- 
[root@localhost named]cat  /proc/sys/net/icmp_echo_ignore_all  (to see the status)
[root@localhost named]echo 1 >  /proc/sys/net/icmp_echo_ignore_all  ( to prevent )
[root@localhost named]echo 0 > /proc/sys/net/icmp_echo_ignore_all   (to enable) 
[root@localhost named]vim  /etc/sysctl.conf
just enable this line --net.ipv4.icmp_echo_ignore_all=1

Friday, January 6, 2012

Init function & default virtual mode

[root@localhost named]init 0 :  Shutdown (goes thru the /etc/rc0.d/* scripts then halts)
[root@localhost named]init 1  :  Single user mode or emergency mode means no network no multitasking is present in this mode only root has access in this runlevel
[root@localhost named]init 2  :  No network but multitasking support is present .
[root@localhost named]init 3  :  Network is present multitasking is present but with out GUI .
[root@localhost named]init 4  :  It is similar to runlevel 3; It is reserved for other purposes in research.
[root@localhost named]init 5  :  Network is present multitasking and GUI is present with sound etc.
[root@localhost named]init 6  :  This runlevel is defined to system restart.
by default  virtual mode-------
[root@localhost named]vim   /etc/inittab
replace here "3"  to  "5"   NB: 3 for virtual   5 for multiple
[root@localhost named]startx    ( for going to graphical)