This is one of the coolest guest book written in php/MySQL. You can download software from smartisoft website. Only problem is it does not show you admin url by default. Here is url that you need to use it!
YOURPASSWORD is stored in your config.php as variable $adminpass! Have a fun!!!
If you rum rm command accidentally and deleted important a file, recovery becomes critical under Linux and/or UNIX oses.
Since Linux is multiuser and multitasking operating system other users/process can overwrite deleted file disk space. So you need to take down system to single user mode.
First use wall (only the super-user can write on the terminals of users) command write a message to all users, then use init (process control initialization) command to take system to single user mode.
Following are generic steps to recover text files.
First use wall command to tell user that system is going down in a single user mode:
System is going down to .... please save your work.
Press CTRL+D to send message.
Next use init 1 command to take system to a single user mode:
# init 1
Using grep (traditional UNIX way) to recover files
Use following grep syntax:
grep -b ‘search-text’ /dev/partition > file.txt
grep -a -B[size before] -A[size after] ‘text’ /dev/[your_partition] > file.txt
- -i : Ignore case distinctions in both the PATTERN and the input files i.e. match both uppercase and lowercase character.
- -a : Process a binary file as if it were text
- -B Print number lines/size of leading context before matching lines.
- -A: Print number lines/size of trailing context after matching lines.
To recover text file starting with “nixCraft” word on /dev/sda1 you can try following command:
# grep -i -a -B10 -A100 'nixCraft' /dev/sda1 > file.txt
Next use vi to see file.txt. This method is ONLY useful if deleted file is text file. If you are using ext2 file system, try out recover command. .
This is bit tricky. But it is possible to configure MRTG for Virtuozzo VPS Linux. Please see MRTG configuration howto if you are new to MRTG. After running command:
# cfgmaker –global ‘WorkDir: /var/www/html/mymrtg’ –output /etc/mrtg/mymrtg1.cfg [email protected]
Above command will only look for 127.0.0.1 (both lo and venet0)as rest of real ips are alias to venet0 interface. You need to open mrtg file /etc/mrtg/mymrtg.cfg and edit it by hand:
1) Comment out lines (as follows)
2) Add IP addrss 127.0.0.1 and MaxBytes 1250000 as shown in bold letter as follows:
Target[rh3_2]: 2:[email protected]:
SetEnv[rh3_2]: MRTG_INT_IP="127.0.0.1" MRTG_INT_DESCR="venet0"
Title[rh3_2]: Traffic Analysis for 2 -- rh3.cyberciti.org
Traffic Analysis for 2 -- rh3.cyberciti.org
|System:||rh3.cyberciti.org in Linux (RH3_UP2), EV1 IDC2,TX.|
|Maintainer:||Vivek G Gite <[email protected]>|
|Max Speed:||1250.0 kBytes/s|
Make sure you have properly configured snmp server. After that run mrtg as usual.
For more information see my Linux MRTG+SNMP step-by-step tutorial.
Recently I got chance to play with Virtuozzo VPS. Good news is they are good to reduced cost and bad news (as of Dec-04, 2004) they do not support full iptables rule set like –state and –log etc. After spending more than 4+ hrs I was able to setup simple but effective firewall on Red hat enterprise linux Virtuozzo VPS. Here is script. Make sure you customize it for your environment.
Explains how to bind Qmail SMTP to particular IP address.
A question from my email bag – How do you find out all drivers loaded by FreeBSD kernel?
FreeBSD comes with kldstat command. The kldstat utility or command displays the status of any files dynamically linked into the kernel. And the kldunload utility unloads a file which was previously loaded with lldload command. You can use kldunload command as follows.
Unload a file from the kernel
First login as a root user (use su – or sudo commnad):
Get list of loaded modules/drivers first use following command
To remove module use the following command
The kldstat utility displays the status of any files dynamically linked into the kernel.
kldunload -i ID
Example to unload smbfs module
Type the following command as the root user:
# kldunload smbfs
# kldunload -i 8
Please note that # 8 is module ID obtained using kldstat command.
Force the unload
You can pass -f option to kldunload to force the unload. This ignores error returns to MOD_QUIESCE from the module and implies that the module should be unloaded even if it is currently in use. The users are left to cope as best they can.
# kldunload -f smbfs