Posts

Showing posts from March, 2014

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@192.168.3.144 root@192.168.3.144's password: Last login: Fri Mar 14 14:33:47 2014 from test.example.com # 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
depends:
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                                                                                     
                                      …