Simple and easy :
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
nJoy ๐
Simple and easy :
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
nJoy ๐
Google Chrome is an alternative web browser beside Mozilla Firefox. It’s free and open source. But the problem Google Chrome on Backtrack 5 is Google Chrome can’t run in root mode. We know that Backtrack run the root mode by default. If you run the Google Chrome it won’t work. So if you want to install and run Google Chrome in root this is the tutorial.
apt-get install chromium-browser
Access the Chrome directory
cd /usr/lib/chromium-browser
And here we go, open chromium-browser with hexaedit to edit the hexa code of chromium-browser
hexedit chromium-browser
It is sometimes required especially when managingย many serversย to recognize the hardware setup you are running on especially if you have a zoo of different animals.ย
Great tool for getting detailed hardware report including bios versions and memory / processor info :
dmidecode
While the output varies slightly across distros and sometimes you need to install it e.g.
ย yum -y install dmidecode
It is a great tool for understanding the underlying system and to know if you’re on a VM or not.
nJoy ๐
So the story goes like this :
wget http://sourceforge.net/projects/bacula/files/latest/download?source=files
tar zxvf bacula-*.tar.gz
cd bacula-<fiolder>
./configure –enable-client-only
make
make install
make install-autostart-fd
nJoy ๐
Step # 1: Stop the MySQL server process.
Step # 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password.
Step # 3: Connect to mysql server as the root user.
Step # 4: Setup new mysql root account password i.e. reset mysql password.
Step # 5: Exit and restart the MySQL server.
Here are commands you need to type for each step (login as the root user):
# /etc/init.d/mysql stop
Output:
Stopping MySQL database server: mysqld.
# mysqld_safe --skip-grant-tables &
Output:
[1] 5988 Starting mysqld daemon with databases from /var/lib/mysql mysqld_safe[6025]: started
# mysql -u root
Output:
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 4.1.15-Debian_1-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit
# /etc/init.d/mysql stop
Output:
Stopping MySQL database server: mysqld STOPPING server from pid file /var/run/mysqld/mysqld.pid mysqld_safe[6186]: ended [1]+ Done mysqld_safe --skip-grant-tables
# /etc/init.d/mysql start
# mysql -u root -p
Voila !
nJoy ย ๐
In file named after the interface you want to use as gateway:
e.g. /etc/sysconfig/network-scripts/route-eth0
Create entries :
ADDRESS=192.168.4.0
NETMASK=255.255.255.0
GATEWAY=192.168.1.250
NnJoy ๐
rsync –progress -ah –remove-sent-files –bwlimit=1000 source/ /target
nJoy ๐
This is a Script that I use to deploy and script iptables.
Sample handles ssh and mysql it’s easy to extend.
#!/bin/bash # # iptables example configuration script # # Flush all current rules from iptables # iptables -F # # Allow SSH connections on tcp port 22 # This is essential when working on remote servers via SSH to prevent locking yourself out of the system # # iptables -A INPUT -p tcp --dport 22 -j ACCEPT # SSH rules iptables -A INPUT -i eth0 -p tcp -s 193.50.90.251 --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT iptables -A INPUT -i eth0 -p tcp -s 212.164.176.98 --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT iptables -A OUTPUT -o eth0 -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT # mysql rules iptables -A INPUT -i eth0 -p tcp -s 193.50.90.251 --dport 3306 -m state --state NEW,ESTABLISHED -j ACCEPT iptables -A INPUT -i eth0 -p tcp -s 212.164.176.98 --dport 3306 -m state --state NEW,ESTABLISHED -j ACCEPT #Allow frontend 1 iptables -A INPUT -i eth0 -p tcp -s 191.94.70.36 --dport 3306 -m state --state NEW,ESTABLISHED -j ACCEPT #Allow Frontend 2 iptables -A INPUT -i eth0 -p tcp -s 191.94.70.38 --dport 3306 -m state --state NEW,ESTABLISHED -j ACCEPT iptables -A OUTPUT -o eth0 -p tcp --sport 3306 -m state --state ESTABLISHED -j ACCEPT # # Set default policies for INPUT, FORWARD and OUTPUT chains # iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT ACCEPT # # Set access for localhost # iptables -A INPUT -i lo -j ACCEPT # # Accept packets belonging to established and related connections # iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # # Save settings # /sbin/service iptables save # # List rules # iptables -L -v
nJoy ๐
Quick way not very detailed but it gives you a clue
$ last
nJoy ! ๐
(I get shorter and sweeter ๐ )
i.e. You wnet home need your desktop have ssh no vnc !! Here is the easy solution..
Install x11vnc.
$ DISPLAY=localhost:0 x11vnc &
connect to the display using vnc et voila !
BTW Teamviewer also USED TO WORK but no longer in ver 8 so thanks VNC for not being obsolete..
nJoy ๐