AdminUser.wOrdpress.cOm

Archive for the ‘Linux’ Category

This article is converted from the Mailman FAQ Wizard
Credits:
——————
Jacinta Richardson , Duncan Drury, Mark Sapiro and the other good folks at mailman-users mailing list
————————————————————————-
Here are some common things to check when no mail is going out from your lists.
Also, do you get no mail at all from Mailman or just no posts? If you [...]

Mount ISO image in Linux

Posted by: SiiN on: July 22, 2008

Do you have the habit of storing files as ISO ? . In Windows you can read the contents of an ISO file by mounting it on a virtual drive using Daemontools. In Linux it’s pretty simple. You just have to mount the ISO as a loop device.
# mount -o loop filename.iso /path/to/some/directory
You [...]

Enter the command:
strings `which php` | grep ./configure | sed s#”‘”#””#g

Redirecting network traffic to a new IP using iptables

Posted by: SiiN on: March 17, 2008

Login to the old server as root and enter the following
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp -dport 80 -j DNAT –to-destination 1.2.3.4:80
iptables -t nat -A POSTROUTING -j MASQUERADE
Here the new ip address is 1.2.3.4. Now all the traffic to port 80 will get redirected to port 80 [...]

Changing mac address Ubuntu/Debian

Posted by: SiiN on: February 28, 2008

Yo!
Finally I managed to connect to the net using my laptop. DHCP server was not giving an IP from the lease when I try to connect
from my lappy. I found out the issue – my ISP was blocking the mac address of my laptops network card – why – who knows [...]

Unmounting virtfs mounts ::: cPanel

Posted by: SiiN on: February 5, 2008

First of all, check if the user is running any jailshell process is running
ps aufx |grep user |grep jailshell
Kill’em
Unmount the mounts created by that user:
for i in `cat /proc/mounts |grep virtfs |grep user_name_here |awk β€˜{print$2}’`; do umount $i; done

Tags: ,

Encrypt a file from command line using gpg

Posted by: SiiN on: January 22, 2008

To encrypt a file
$gpg -c filename
To Decrypt file
$gpg file.gpg

Here are two commands which you need to run from the console to check .key and .crt files
#openssl rsa -noout -text -in www.domainname.com.key
#openssl x509 -noout -text -in www.domainname.com.crt
Check for modulus part in the output of both commands
If the modulus output match, then your .crt and .key files are matching.

To check how fast a domain loads

Posted by: SiiN on: December 3, 2007

and to convice the user
time wget -q <domainname>
Thank you Sari for the tip

Mounting proc filesystem: Bad file descriptor

Posted by: SiiN on: November 5, 2007

Ballu called me as he got this error:
Mounting proc filesystem Bad file descriptor
No such partition found …
Something modifed /dev/null to a regular file. To fix, login into repair mode, remount root filesystem as read-write, and restore /dev/null:
# mount -n -o remount,rw /
# rm -f /dev/null
# mknod -m 0666 /dev/null c 1 3
It worked. [...]