Thursday, December 29, 2011

error: PAM: authentication error for root from xxx.xxx.xxx.xxx

Hi,

I recently installed freebsd 8.2 on my lap, its very good experience using this OS. I had simple issue after installation. While doing ssh to FreeBSD installed on vmware I came up with above error.

Which clearly states that issue is with authentication , which we need to configure in ssh service.

We need to add below three options in /etc/ssh/sshd_config

PermitRootLogin yes 
PasswordAuthentication yes 
AllowUsers root


Thats it, we are done , now we can ssh to FreeBSD installed in vmware, one common mistake I did ,was adding these above lines in /etc/ssh/ssh_config.

So there are 2 files in /etc/ssh/ directory i.e /etc/ssh/ssh_config & /etc/ssh/sshd_config


We are suppose to configure above 3 options in sshd_config  then only it will work like charm!

Regards,
Girish

Monday, December 19, 2011

Determining IP Information for eth0... failed; no link present. Check cable?

Hi,


While working on RHEL5 installed on VMWARE I got this error restarting network service.

Little bit around 1 min I noticed that Ethernet option for VMWARE is off !!! that's the reason RHEL5 thrown this error.
 










Regards,
Girish

Sunday, December 18, 2011

httpd-2.2.3-31.el5.i386: Cannot find a valid baseurl for repo: Server

Hi All,


Actually its very basic mistake, in such type of errors if you have http repository setup, check once if http url is accessible from client or not.


If not accessible the probably problem with http service, but if accessible then ? ? ? ?

Then problem was very simple, it was wrong baseurl in /etc/yum.repos.d/yumconf.repo file

Here is sample of wrong configuration :

[root@station2 ~]# cat /etc/yum.repos.d/yumrepos.repo
[Server]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
basurl=http://192.168.152.130/Server
enabled=1
gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Error was quite simple, instead of "baseurl" it is "basurl"

Correct it and your problem will be solved quickly!!!

Regards,
Girish







Friday, August 12, 2011

Linux QRTask Commands

Hi,

Those who working as a linux administrator may have came across Quarterly Review Task (QRTask).
Its gathering of information about server after every 4 months. We generally perform QRTASK's its very easy to do, and here are few of important commands used for QRTASK :

You can save below lines as shell script with .sh extension :
-----------------------------------------------------------


echo ---------------------------------------
echo "Server Name"
echo ---------------------------------------
hostname

echo ---------------------------------------
echo "Server Model"
echo ---------------------------------------
dmidecode | grep -m1 "Product Name"

echo ---------------------------------------
echo "System Firmware Revision"
echo ---------------------------------------
dmidecode -s bios-version

echo ---------------------------------------
echo "OS Type"
echo ---------------------------------------
uname -a


echo --------------------------------------
echo "HBA"
echo --------------------------------------
lspci |grep -i -e fib -e hba

echo ---------------------------------------
echo "OS Backups"
echo ---------------------------------------
cat /proc/mdstat

echo ---------------------------------------
echo "System INformation"
echo ---------------------------------------
dmidecode -t system


echo ---------------------------------------
echo "BIOS Information"
echo ---------------------------------------
dmidecode -t bios

echo ---------------------------------------
echo "Processor INformation"
echo ---------------------------------------
dmidecode -t processor





echo ---------------------------------------
echo "CPU information"
echo ---------------------------------------
cat /proc/cpuinfo
           
echo ---------------------------------------
echo "MEMORY-USAGE"
echo ---------------------------------------
cat /proc/meminfo  

echo ---------------------------------------
echo "SWAP"
echo ---------------------------------------
swapon -s

echo ---------------------------------------
echo "I/O throughput"
echo ---------------------------------------
iostat




echo ---------------------------------------
echo "Disk Space"
echo ---------------------------------------
df -h

echo ---------------------------------------
echo "FIRMWARE REVISION"
echo ---------------------------------------
dmidecode --type bios




echo ---------------------------------------
echo "NETWORK INTERFACES"
echo ---------------------------------------

ifconfig | grep eth


echo ---------------------------------------
echo "NETWORK-INFORMATION"
echo ---------------------------------------

ethtool eth0;ethtool eth1;ethtool eth2;ethtool eth3


echo ---------------------------------------
echo "PATCH-LIST"
echo ---------------------------------------
rpm -qa>rpm.txt

echo ---------------------------------------
echo "User List"
echo ---------------------------------------
cat /etc/passwd



This information is then documented for official purpose.

Thanks & Regards,
Girish...

Tuesday, August 9, 2011

NFS Automount issue in Office

Hi ,

This posts are not for advanced users as they all know these common issues.
I came across this issue regarding NFS automount in my office.
I checked o/p of : df -h but nfs share was not shown in o/p

We though that issue might be from Server end d wanted to check nfs server side , but one thing I didn't know was when we perform AUTO-MOUNTING of NFS share , unless user request for share it is not mounted on specified directory , and that is why client tool was generating message like "share XXX not mounted on XXX"

Finally we suppressed that alarm and now its working fine. :)

Thanks & Regards,
Girish...


Saturday, June 11, 2011

How to enable VMWare Drag & Drop Feature ?

Hi ,

Before writing this post even i didn't know about how to drag and drop in VMware tool , and this is why i decided to post it on my blog!..

Many times we need to simply copy files from Host OS to vmware os and this feature is gr8 help for all of us.

Steps :
-------
1) Go to VMWare setting > Options > Guest Isolation.
2) Select "Enable drag and drop to and from VM" and "Enable Copy paste to and from this VM"
3) Go to VM option of Virtual Machin.
4) Click on Install VM Tools , so it will automatically install VM Tools in your operating system inside VM

Thats It!

Now you can simply drag and drop from your host OS !...Thats really Cool!...

Happy Blogging!


Tuesday, June 7, 2011

Difference Between Unix flavours Links

Hi  Friends ,

Here are some of links that will let us know difference between Linux Unix , HP UX etc.

I will post more links here in this post , Keep visiting.

Thanks & Regards,
Girish

Thursday, May 5, 2011

DHCP Server RHEL 5

Hello Friends ,

For RHEL5 setting up DHCP server is very easy , just you need to follow steps given in below link.

http://oob.freeshell.org/nzwireless/dhcpd.html

Thank You!

Sudo Users With No Password!

How it will be if you get root access for 2 minutes somewhere and afterwards you want to get root access for FULL TIME! If admin is not watching sudo ! (Real Scenario)

Attackers somehow gets 2 minutes access to ROOT!

Step 1 : Add user with your favorite Name mine is cracker

Step 2 : visudo

Step 3 : Scroll down till "Allow root to run any command"

Add Line :

cracker       ALL=NOPASSWD:       ALL


Thats it!

Now save and exit!

Log in with your new user cracker directly without password!!!

Thank You!

 

Friday, April 15, 2011

Desktop Screen Recorder for RHEL 5

Hi ,

Many times we need to record our desktop so that we can later view and share same videos with others.
Here is a little tutorial on how to do it..

1) Need to have setup RHEL repository
2) Download  recordmydesktop

Installing recordmydesktop on RHEL5
---------------------------------------
step 1 :  unzip recordmydesktop.tar.gz using --> tar -xvf recordmydesktop.tar.gz

step 2 : go to extracted folder.

step 3 : ./configure

step 4 : make

make: *** No Rules to make target `install` . Stop.

HERE THE PROBLEMS STARTS!

This is what i didn't expected basically in my case i followed below steps :

./configure | grep "error"

Now you will get list of dependencies thats what we need to install.

in case of RHEL5 all these dependencies are available in  RHEL5 repositories.

just install it like : 


yum install -y (PACKAGE NAME SPECIFIED IN ERROR)  


Again type : ./configure | grep "error"

Repeat above steps till above command gives no output.

Thats how you solved dependencies for recordmydesktop software

Now simply fireup command : recordmydesktop


Your screen recording gets started!

Thats It!...Enjoy Recording

- Girish







Thursday, April 14, 2011

RHEL 5 Ethernet Driver problem on Intel Motherboard


Issue Details :
----------------

Intel based pc ,
Ethernet Driver problem



ifup eth0 --> "device eth0 does not seem to be present, delaying initialization."


System-config-network --> select any driver but it wont work same message as above


lspci --> Realtek semiconductor co. ltd RTL8101E Express Fast Ethernet controller


This clearly shows that we have above device installed as H/W


Uname -r --> 2.6.18.8.el5 (Our Kernel Version)


Lets find Drivers for this device from internet


Download RTL8101E for Linux kernel (2.6.X)


----------------------
Installation of Driver
----------------------

tar -xvf

make clean modules

make install

depmod -a

insmod ./src/r8101.ko

reboot

service network restart



Thats It ! Now assign Ip address and enjoy.


Thank You,



Tuesday, April 5, 2011

Sniff Wireless Broadband USB Connection

Hi,

Here is our one of the smart tool for capturing network traffic through USB Drive

Tool Name : SmartSniff

Download it from : http://www.pendriveapps.com/

Thank you,

Happy Hacking

Sunday, January 23, 2011

Samba Server

Hi Friends , if you want to access linux shares from windows and add files into linux share you are at right place.

Scenario :

1 Desktop pc --> Windows vista
1 Desktop pc --> Windows 2000
1 Desktop pc -->  Redhat 5 (RHEL 5)

we will setup samba server on RHEL 5 and then we will access that share from windows 2000 and windows vista.


RHEL 5 :
----------
1)  yum -y install samba*
2)  yum -y install system-config-samba   ( For Samba GUI Configuration )
3)  vim /etc/samba/smb.conf
4)  Look for  hosts allow =  add IP subnets here Ex .     192.168.1.  127.  10.47.0.   NO COMMAS
5)  At the end of File add :
  
     [SHARE NAME]
           comment = root
           path = /                    --> to share
           writeable = yes        --> Connected user can read write
           

6) This information is enough in smb.conf
7)  system-config-samba 
8)  preferences > server setting > security > authentication mode "Share"
9)  preferences > samba users > add user > unix username and enter password for samba 
10) Click on share , click on properties , ACCESS > Allow access to everyone

How to access Shared Folders from windows 2000 and windows vista

1) Run > \\RHEL server ip\

Thats It! Now you can even insert files into share so that it can be visible in RHEL 5! 
Aree ooo Sambaa! Tu to kamal ka software hai!