Tuesday, June 24, 2003

fortune's FreeBSD tips

The program 'fortune', which is often called in the .login file by default, has a nice collection of FreeBSD tips. You can access this a couple of ways:


$ /usr/games/fortune freebsd-tips


will print a single tip to your screen, while


$ /usr/games/fortune -m col freebsd-tips | less


will dump all the tips that contain the sequence 'col' to your screen. This will show you the nice short way using the col command to strip DOS End Of Line characters from your files (those are the ones that look like ^M in many places):


$ col -bx < DOSFIle > BSDFile


although I guess it also replaces tabs with spaces. An easier way is to just use the dos2unix command (and it's opposite, unix2dos).




Testing for mail relay

Site that will check to make sure you don't have an "open relay"; ie., a way for an anonymous user to use your sendmail to send mail from. It used to be pretty common, but then spammers started using everyone else's sendmail to hide their identity, and now it is a Very Bad Thing if you have an open relay.



Mail relay testing




Monday, June 23, 2003

<i>fetchmail</i> tutorial

How to set up and run fetchmail from a server:



Fetchmail Configuration




FreeBSD Splash Screens

Great page on doing splash screens for FreeBSD. It includes a nice catalog of splash screens.



FreeBSD Splash Screens



This page has lots more splash and desktop screens, including some vaguely erotic and futuristic BSD Daemons:



deaddreamer.com




Disabling SSH

Easy way to disable ssh: Add the following line to the /etc/rc.conf file:



sshd_enable="NO"



"The Complete FreeBSD"

I just received the book The Complete FreeBSD in the mail the other day, and I gotta say it looks great! Of course, in the interest of full disclosure, I must say that I got my copy free because I helped to proof the book. But even if I didn't it would have immediately rose to the top of my "to get" books, as I really liked the 3rd edition, which is one reason why I helped out on this one. The author, Greg "groggy" Lehey is quite active on the FreeBSD mailing lists, and he does a great job in explaining all kinds of mysterious parts. In particular, I remember when I first read the 3rd edition how much I appreciated his line by line analysis of the boot screen.


The Complete FreeBSD by Greg Lehey. Published by O'Reilly Community Press.




Monday, June 16, 2003

Hush up, login

A quick way to have a "silent" login is to create an empty file in your home directory called .hushlogin. Now when you login, nothing should be echoed to the tty. Works nice!


Saturday, June 7, 2003

Stack Protection for FreeBSD

From what I understand, this is a patch to GCC that adds "stack protection". The stack is part of a computer program where data is stored, and a common hack is to "overflow" the stack and using the effects of that to insert your own remote program. This patch prevents GCC, the compiler normally used on FreeBSD from allowing that to happen. You patch GCC, and rebuild the world to add the protection into the kernel. I haven't tried this yet, but I'm intrigued nonetheless.



How to build FreeBSD with stack protection



An interesting little side note in the above web page - it has about as concise a set of instructions for rebuilding and installing the kernel that I've ever seen!



Rebuild and install everything:



cd /usr/src

mergemaster -p

make buildworld

make buildkernel

make installkernel


shutdown -r now
, bringing the system back up in single-user mode

make installworld

mergemaster

reboot



Setting the time

Two excellent articles on synchronizing your systems clock with the rest of the world using NTP:








Friday, June 6, 2003

FreeBSD CVS Tags

Here is a complete list of the current CVS tags for FreeBSD. Use these in conjunction with cvsup and your cvsups file to grab the latest version of the source for your system:



CVS Tags