The Archives

  • 29.Jun.09
    Measuring network performance network | fernape | (0)
    FreeBSD includes several benchmarking suites in the ports collection. One of these suites is netperf, developed by HP. It allows measuring several network parameters using two programs: the server and the client. First things first: let us install netperf. % cd /usr/ports/benchmarks/netperf && make install clean Once the software has been successfully compiled (it does not take long) we can bring the server up: $ netserver Starting netserver at port 12865 Starting netserver at hostname port 12865 and family AF_UNSPEC Notice that you can launch the server as a regular user. Now, we are ready to run our test: $ netperf -t TCP_STREAM TCP STREAM TEST from ...
  • 01.Jun.09
    Adding a new member to the group (FreeBSD) shell | fernape | (0)
    The pw command is used to add and modify system users and groups. The following is an easy way to add a new member to a group: % pw groupmod operator -M n0str0m0 It adds n0str0m0 to the operators group. Bye!
  • 26.May.09
    Auditing ports (FreeBSD) security | fernape | (0)
    One of the most important aspects of *BSD systems is security. Knowing which installed packages have exploitable vulnerabilities is one of the admin's tasks. Here, the portaudit utility comes in handy. It is not part of the base system, so it must be installed first: % cd /usr/ports/ports-mgmt/portaudit; make install clean To run a simple check: % portaudit Affected package: XXX Type of problem: XXX -- embedded GD library Use-After-Free vulnerability. Reference: <> Affected package: YYY- Type of problem: YYY -- integer overflow vulnerability. Reference: <> Affected package: ZZZ-1.10.2_2 Type of problem: ZZZ -- integer overflow. Reference: <> I have omitted the details of the vulnerable packages of my own machine. I'm sure you ...
  • 30.Apr.09
    Changing your login shell shell | fernape | (0)
    Yes, I have to admit this is the first thing I do on my account after installing FreeBSD :). This example however, comes from a Linux box (you may notice it due to the default installation paths for the shells). $ chsh -l /bin/ash /bin/bash /bin/csh /bin/tcsh The command above lists the available shells. (I have omitted some of the entries to shorten the list). $ chsh -s /bin/bash The next time you log in, your shell will be bash. Enjoy!
  • 14.Mar.09
    Removing software in FreeBSD shell | fernape | (0)
    Sometimes you need to uninstall some software. May be you need more room in your hard drive (not quite often nowadays, though) or maybe you just don't like the software and want to get rid of it. Here, pkg_delete and pkg_deinstall come to rescue. pkg_delete deletes a software package previously installed. It is a quite simple program, so we will jump to the other option. % pkg_delete kismet-200805.r1_1 % pkg_deinstall is a wrapper for pkg_delete that handles wildcards and traverses dependencies. So it is specially useful when you need to remove a software package that installed a lot of other packages (Gnome? KDE?). The drawback, ...
  • 24.Feb.09
    Adding software in FreeBSD shell | fernape | (0)
    The easiest way is to add a binary package with: % pkg_add <package> Packages in FreeBSD are .tbz files with some special meta-files (or files with meta information) inside it. However you will use pkg_add in this fashion most likely: % pkg_add -r <package> This connects to the repository matching your release, downloads the package (and all its dependencies) and installs the package. Another example of how easy FreeBSD can be ;)
  • 12.Feb.09
    Fix package database cmd, shell | fernape | (0)
    % pkgdb -F In FreeBSD, interactively fixes the package database. Useful after an upgrade.
  • 26.Dec.08
    Updating freebsd shell | fernape | (1)
    freebsd-update is one of the ways available to update your FreeBSD system. In the simplest form, you can use it this way: % freebsd-update fetch % freebsd-update install These two commands above, fetch and install updates for your release. freebsd-update can also perform a rollback, be scheduled to fetch updates automatically and used to fetch new packages from a different release. freebsd-update's behaviour is ruled by the /etc/freebsd-update.conf. You can specify which components you want to be monitored by freebsd-update (base system, kernel, sources...) Though BSDs systems can be tough, this is an example of how easy things can turn out from time to time :)