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