Monday, October 19, 2009

Change your shell to bash

First, need to build from the ports tree.
cd /usr/ports/shells/bash
make install

Edit the shells file
vi /etc/shells

Add this line if does not already exist;
/usr/local/bin/bash

Execute the chsh command and change the line that says;
Shell: /bin/csh

to
Shell: /usr/local/bin/bash

Logout and login again and you will have a bash shell!

Monday, September 21, 2009

Setting up SNMPD

Versions tested; FreeBSD 6.2, 7.2
Here's what you have to do (logged in as root);

Installing
#cd /usr/ports/net-mgmt/net-snmp
#make install

Configuration
#cd /usr/local/etc/snmp
snmpconf -g basic_setup

Answer all the questions to suit your requirements, paying particular attention to the parts relating to access controls and the "snmp community". Also note, if you don't change your cwd to /usr/local/etc/snmp then the conf file will be created in whatever directory you are currently in therefore you will have to copy the file manually.

Here is a particularly simple example of snmp.conf using a read only "public" community. Using the "public" community is not advised for security reasons, I have used it here for simplicities sake.
syslocation  "Virtual machine on underworld"

syscontact user@example.com.au

sysservices 12

rocommunity public

trap2sink 10.100.1.198

trapcommunity public

I have removed the comments from here for brevity. If you look at your own generated snmpd.conf file it will be fully commented describing these various lines.

Placing the Config File
#mkdir /usr/local/etc/snmp/
#mv snmpd.conf /usr/local/etc/snmp/snmpd.conf


Checking your configuration from the local host
snmpwalk -Os -c public -v 1 localhost system

This should return a bunch of lines relating to various parts of your system. You can execute the same command from another host, changing "localhost" to the name of the system.

Sunday, May 17, 2009

First Post

I have to admin FreeBSD at work. Everything is v4 or v6 (they don't like upgrading here apparently)

Anyway, these are the little thungs I've come across.

I usually use Ubuntu (see ubuntubloke.blogger.com)