Showing posts from 2014

Quick HOWTO; Puppet installation and basic configuration

About Puppet

Puppet is open source configuration management tool . Other open source CM systems are Chef and CFEngine. Two main components of puppet are
Puppet MasterPuppet AgentPuppet programs are called “manifests,” and they use the .pp file extension . 

Resources are the fundamental unit for modeling system configurations. Each resource describes some aspect of a system, like a service that must be running or a package that must be installed. The block of Puppet code that describes a resource is called a resource declaration which describes a desired state for one resource.

Installing Puppet Master.

Step 1:   The newest versions of Puppet can be installed from 
               theyum.puppetlabs.compackage repository. To enable the repository,  run the                          below command. Once repository is enabled ,  install puppetmaster.

  # sudo rpm -ivh


About SVN :

Manual Says Subversion  is  a version control system, which allows you to keep old versions of files and directories (usually source code), keep a log of who, when, and why changes occurred, etc., like CVS, RCS or SCCS.  Subversion keeps a single copy of the master sources.   This copy is called the source ‘‘repository’’; it contains all the information to permit extracting previous versions of those files at any time


1. Create a SVN reposity 

               # mkdir /var/ssdgsvn/                   
               # chmod -R 775 /var/ssdgsvn/      
               #chgrp -R ssdgsvn /var/ssdgsvn/  
               # svnadmin create /var/ssdgsvn/  

Create ssdgsvn group  and add all users to ssdgsvn group.

                #  groupadd ssdgsvn               
                #  usermod -G zaman ssdgsvn 
                #  id  zaman                         

2. Configure svn.conf

 # cp /var/ssdgsvn/conf/svnserve.conf /var/ssdgsvn/conf/svnserve.conf.orig     

   Uncomment the fol…

Implications of missing suid bit for su command

Problem:We can successfully log in as root user using ssh but when I when I do su - to login as root , it says " incorrect password " even though passwords are same and I am typing the correct password.$ su - Password: su: incorrect password Solution:suid permission was missing for su command. Setting the SUID bit for su command resolved the issue
$ ssh root@ root@'s password: Last login: Fri Mar 14 14:33:47 2014 from # ls -l /bin/su -rwxr-xr-x. 1 root root 34904 Oct 5 2011 /bin/su # chmod u+s /bin/su # ls -l /bin/su -rwsr-xr-x. 1 root root 34904 Oct 5 2011 /bin/su #su - ssdg #su - Password: # id uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)

Troubleshooting: Cannot log in as root with su command

I was seeing something strange behavior on one of my server.I can log in as 'root' user using ssh but when I try to login as 'root' user using su - , it fails with " incorrect password" error.

$ su - Password: su: incorrect passwordAfter some poking on the system , I was able to identify the issue . The issue was missing SUID permission for su command. Setting SUID command for su command resolved the issue .# ls -l /bin/su -rwxr-xr-x. 1 root root 34904 Oct 5 2011 /bin/su # chmod u+s /bin/su # ls -l /bin/su -rwsr-xr-x. 1 root root 34904 Oct 5 2011 /bin/su # su - user $ su - Password: # id uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)

KVM Virtualization in RHEL 6

1. Install the following packages for setting up  guest hosts using KVM virtualization .                    # yum install  virt-install  virsh  libvirt  kvm

                     # yum install kvm python-virtinst libvirt libvirt-python virt-manager

                     # yum install virt-viewer libguestfs-tools

2.   Check whether the following modules are loaded . If not , load it manually using insmod.  # modinfo kvm
filename:       /lib/modules/2.6.32-220.el6.x86_64/kernel/arch/x86/kvm/kvm.ko
license:        GPL
author:         Qumranet
srcversion:     E0EC656A576974AAE72808D
vermagic:       2.6.32-220.el6.x86_64 SMP mod_unload modversions
parm:           oos_shadow:bool
parm:           ignore_msrs:bool
parm:           allow_unsafe_assigned_interrupts:Enable device assignment on platforms without interrupt remapping support. (bool)


# modinfo kvm_intel
filename:       /lib/modules/2.6.32-220.el6.x86_64/kernel/arch/x86/kvm/kvm-intel.ko
license:        GPL
author:  …

Setting up a Local YUM Repository

Setting up the YUM ServerSetting up a local YUM repository provides many benefits in situations like where hosts in a network does not have access to Internet . Also , installing  a package from a local YUM repository is faster because of low latency as compared to Internet .  The YUM repository can have access to Internet so that the repository is always updated with latest software updates . Please find below steps to setup a local YUM repository. 
1. Create a directory to be used for setting up a repository

                                           # mkdir  /var/www/html/rhelimages                                                               

2.   Dump contents of RHEL DVD to the above created directory

                           # cp  -r  /media/cdrom/*    /var/www/html/rhelimages/
3. Install the createrepo package if not already installed 

# rpm -q createrepo