LAMP How To - Open Source At Work

Only Passion Matters

Entries for September, 2009

Setting Up A Secure Linux Authentication Server Quickly (LDAP + TLS + SAMBA)

Just like microsoft active directory, having a centralised authentication server in linux is important especially when you have more than one server or service to manage. Just imagine each service (ssh, samba, httpd…etc) has its own user database… Sooner or later, you will find managing users very difficult. A simple task like deleting a user [...]

bash: copying files without prompt

It can be annoying that the ‘cp’ command keep prompting if you are to overwrite some files. This is due the cp alias. To fix that,

unalias cp
cp -af source target

done.

Restarting vmware web access

sometimes the vmware web access just halted for some reason. A good way to overcome that is to simply restart the vmware web server, ie

/etc/init.d/vmware-mgmt restart

Bash: Simple command to mass replace content in directory

Imagine that we need to mass change the content in certain directory. A combination of find and sed can save the day. It is very to do it in perl as well.

find /your/dir -type f | xargs sed -i ’s/old/new/g’