no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

Newly installed Ubuntu 14.04 server and samba on a new PC.
When I was trying to create an array by execute the mdadm command with sudo, I got this error message:

no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

Somehow, the sudo command was successfully completed, but the error message is annoying. I was thinking this maybe a mdadm bug, but after tried some other commands – I found each time when I was execute a command with sudo I got this error message. Weird! After googling around I found some pages relating to this problem. Looks like this seems to be a issue with samba and libpam-smbpass?
Continue reading no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

make: *** No rule to make target `uninstall’. Stop.

之前编译了个软件用,后来要删除,结果试了下make uninstall后得到

make: *** No rule to make target `uninstall'.  Stop.

好吧,既然原作者没提供uninstall,那就只好麻烦点了。
首先,把make install所做的步骤给存到remove.txt这个文件里:

make -n install > remove.txt

然后打开这个文件,根据install的步骤,反过来,手动把安装的文件给一个个删掉。
比如文件里有一句:

/usr/bin/install -c -m 755 -s foo.bar /usr/sbin

这句意思是把foo.bar这个文件装到/usr/sbin下面。把相应文件删除即可。

Can’t start tightvncviewer in Ubuntu

When I was trying to start tightvncviewer in Ubuntu, I got this exception:

Exception in thread "main" java.awt.HeadlessException
    at java.applet.Applet.<init>(Applet.java:67)
    at javax.swing.JApplet.<init>(JApplet.java:130)
    at com.glavsoft.viewer.Viewer.<init>(Viewer.java:67)
    at com.glavsoft.viewer.Viewer.<init>(Viewer.java:75)
    at com.glavsoft.viewer.Viewer.main(Viewer.java:53)

After some searching I found out install OpenJDK Java runtime can solve this problem.

sudo apt-get install openjdk-7-jre

用iptables加强VPS防御

VPS – Virtual Private Server,也就是虚拟专用服务器。虽说是虚拟的,但是和普通服务器一样:有内存、有CPU、有HDD当然也直接接入互联网。

实话实说,网络的凶险程度一点也不比人类社会低。接入互联网的设备,无时无刻不承受着来自各方面的攻击:比如最常见的端口扫描。
Continue reading 用iptables加强VPS防御