On a FreeBSD server
1. reboot server
2. choose to boot into single user mode
3. mount -o rw <root partition> e.g. mount -o rw /
4. passwd <root account> e.g. passwd root
5. mount -o ro <root partition> e.g. mount -o ro /
6. reboot server again
Voila !!!
psyber.monkey posted on April 8th, 2008 in Open Source, Psyber.Monkey, freebsd, linux, unix+freebsd category | Only ONE daring fellow comment »
dig <record type> <host.name>
e.g dig SRV _someservice._port.hostname.domainame.com.my OR dig SRV _https._ICMP.host.takizo.com
psyber.monkey posted on April 6th, 2008 in Apple, Apple Mac, Open Source, Psyber.Monkey, Technology, Tip of the Day, freebsd, linux, unix+freebsd category | Nobody dare to comment yet »
e.g. rm -rf backup-20070[8-9]-*
would delete :
- backup-200708-morning
- backup-200708-evening
- backup-200709-night
- backup-200709-latenight
but not :
- backup-200706-morning
- backup-200707-afternoon
- backup-200711-midnight
e.g. ls backup-20070[1-9] would list all backup starting from January to September but leave October, November & December out, of year 2007.
psyber.monkey posted on April 4th, 2008 in Apple, Apple Mac, Open Source, Psyber.Monkey, Technology, Tip of the Day, freebsd, linux, unix+freebsd category | Nobody dare to comment yet »
sed -e 1d -e 50d -e ‘/junks/d’
would remove first and 50th line & any line(s) with the word “junks”.
update 20080821 :
sed -e ‘/^$/d’
would remove every empty line
psyber.monkey posted on April 3rd, 2008 in Open Source, Psyber.Monkey, Tip of the Day, freebsd, linux, unix+freebsd category | Nobody dare to comment yet »
we have about 15 freebsd servers with us, ranging from freebsd 4.7 to freebsd 7. most of the server need to be patched regularly, except servers that are not accessible from public network. one of the method we use to monitor outdated port is using portsnap cron, it update the port tree base on the date/time you configured on crontab, and when there is any port is outdated, it will notify us through email from system message.
setting up port tree update on cron
fire up your crontab with crontab -e and add this line;
0 7 * * * portsnap -I cron update && pkg_version -vIL=
this will update the port tree every morning 7am and if there is any output from the command pkg_version -vIL=, it will send an email to system root.
alias root to your email address
if you wish to receive the notification through your email, on /etc/aliases file, alias root to your_email_address, remember to run newaliases command after update the file.

Email notification from different servers.

Port that outdated and need to be upgraded.
takizo posted on April 3rd, 2008 in Systems category | Only ONE daring fellow comment »