<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>x83.net &#187; BSD</title>
	<atom:link href="http://www.x83.net/category/bsd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.x83.net</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jan 2012 13:53:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Reload rc.conf without rebooting</title>
		<link>http://www.x83.net/reload-rc-conf-without-rebooting/</link>
		<comments>http://www.x83.net/reload-rc-conf-without-rebooting/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 20:52:40 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[rc.conf]]></category>
		<category><![CDATA[shutdown]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=156</guid>
		<description><![CDATA[# shutdown now // this brings the system to Single User &#8211; press enter for shell // and then CTRL + D or logout to switch to multi user To delete options /var/db/ports/$port/options &#038;&#038; make install clean again.]]></description>
			<content:encoded><![CDATA[<p># shutdown now // this brings the system to Single User &#8211; press enter for shell<br />
// and then CTRL + D or logout to switch to multi user</p>
<p>To delete options /var/db/ports/$port/options &#038;&#038; make install clean again. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/reload-rc-conf-without-rebooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD tips : Setting time and date</title>
		<link>http://www.x83.net/freebsd-tips-setting-time-and-date/</link>
		<comments>http://www.x83.net/freebsd-tips-setting-time-and-date/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 20:52:07 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[localtime]]></category>
		<category><![CDATA[ntpdate]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=154</guid>
		<description><![CDATA[It’s definitely a good thing to have your system clock sync itself each time you reboot using a public NTP Timeserver. FreeBSD makes this a piece of cake. First, you’ll want to make sure your timezone is set correctly. Check /usr/share/zoneinfo for the correct time zone file, and copy it to /etc/localtime. I.e.: bash-2.05b# mv [...]]]></description>
			<content:encoded><![CDATA[<p>It’s definitely a good thing to have your system clock sync itself each time you reboot using a public NTP Timeserver. FreeBSD makes this a piece of cake.</p>
<p>First, you’ll want to make sure your timezone is set correctly. Check /usr/share/zoneinfo for the correct time zone file, and copy it to /etc/localtime. I.e.:</p>
<blockquote><p> bash-2.05b# mv /usr/share/zoneinfo/zonefilehere /etc/localtime</p></blockquote>
<p>Once you’ve done that, you will need to make sure your date and time are set within at least a few minutes of the current date and time. To do this, use the date command:</p>
<blockquote><p>bash-2.05b# date 0408290000</p></blockquote>
<p>The date is in YYMMDDHHMM format, the clock being a 24 hour and not 12 hour clock. To make sure the date looks correct before moving on, just type date in again:</p>
<blockquote><p> bash-2.05b# date<br />
 Sun Aug 29 00:00:33 MDT 2004</p></blockquote>
<p>Now that our timezone, date, and time are all set correctly, lets setup the NTP daemon to keep the system time synced-up.To do this, open /etc/rc.conf in your editor of choice, and add these lines:</p>
<blockquote><p> ntpdate_enable=”YES”<br />
 ntpdate_program=”ntpdate”<br />
 ntpdate_flags=”-b timeserver.org”</p></blockquote>
<p>Replace timeserver.org with a server from a public NTP timeserver list which is near you (by number of network hops, not necessarily physical location). You’ll need to Google for a list of these yourself. Voila!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/freebsd-tips-setting-time-and-date/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing ports collection</title>
		<link>http://www.x83.net/installing-ports-collection/</link>
		<comments>http://www.x83.net/installing-ports-collection/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 20:50:58 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[cvsup]]></category>
		<category><![CDATA[port]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=151</guid>
		<description><![CDATA[http://www.freebsd.org/doc/en/books/handbook/ports-using.html&#8221;>http://www.freebsd.org/doc/en/books/handbook/ports-using.html == CVSup Method == This is a quick method for getting and keeping your copy of the Ports Collection up to date using CVSup protocol. If you want to learn more about CVSup, see Using CVSup. Note: The implementation of CVSup protocol included with the FreeBSD system is called csup. It first appeared in [...]]]></description>
			<content:encoded><![CDATA[<p>http://www.freebsd.org/doc/en/books/handbook/ports-using.html&#8221;>http://www.freebsd.org/doc/en/books/handbook/ports-using.html</p>
<p>== CVSup Method ==</p>
<p>This is a quick method for getting and keeping your copy of the Ports Collection up to date using CVSup protocol. If you want to learn more about CVSup, see Using CVSup.</p>
<p>Note: The implementation of CVSup protocol included with the FreeBSD system is called csup. It first appeared in FreeBSD 6.2. Users of older FreeBSD releases can install it via the net/csup port/package.</p>
<p>Make sure /usr/ports is empty before you run csup for the first time! If you already have the Ports Collection present, obtained from another source, csup will not prune removed patch files.</p>
<p>I.      Run csup:</p>
<p> # csup -L 2 -h cvsup.FreeBSD.org /usr/share/examples/cvsup/ports-supfile</p>
<p>Change cvsup.FreeBSD.org to a CVSup server near you. See CVSup Mirrors (Section A.5.7) for a complete listing of mirror sites.</p>
<p>Note: One may want to use his own ports-supfile, for example to avoid the need of passing the CVSup server on the command line.             1. In this case, as root, copy /usr/share/examples/cvsup/ports-supfile to a new location, such as /root or your home directory.<br />
2. Edit ports-supfile.<br />
3. Change CHANGE_THIS.FreeBSD.org to a CVSup server near you. See CVSup Mirrors (Section A.5.7) for a complete listing of mirror sites.<br />
4. And now to run csup, use the following:</p>
<p>  # csup -L 2 /root/ports-supfile</p>
<p>II.<br />
Running the csup(1) command later will download and apply all the recent changes to your Ports Collection, except actually rebuilding the ports for your own system.</p>
<p>== Portsnap Method ==</p>
<p>Portsnap is an alternative system for distributing the Ports Collection. It was first included in FreeBSD 6.0. On older systems, you can install it from ports-mgmt/portsnap package:</p>
<p> # pkg_add -r portsnap</p>
<p>Please refer to Using Portsnap for a detailed description of all Portsnap features.</p>
<p>1. Since FreeBSD 6.1-RELEASE and with recent versions of the Portsnap port or package, you can safely skip this step. The /usr/ports will be created automatically at first use of the portsnap(8) command. With previous versions of Portsnap, you will have to create an empty directory /usr/ports if it does not exists:</p>
<p> # mkdir /usr/ports</p>
<p>2. Download a compressed snapshot of the Ports Collection into /var/db/portsnap. You can disconnect from the Internet after this step, if you wish.</p>
<p> # portsnap fetch</p>
<p>3. If you are running Portsnap for the first time, extract the snapshot into /usr/ports:</p>
<p> # portsnap extract</p>
<p>If you already have a populated /usr/ports and you are just updating, run the following command instead:</p>
<p> # portsnap update</p>
<p>== Sysinstall Method ==</p>
<p>This method involves using sysinstall to install the Ports Collection from the installation media. Note that the old copy of Ports Collection from the date of the release will be installed. If you have Internet access, you should always use one of the methods mentioned above.</p>
<p>1. As root, run sysinstall (/stand/sysinstall in FreeBSD versions older than 5.2) as shown below:</p>
<p> # sysinstall</p>
<p>2. Scroll down and select Configure, press Enter.<br />
3. Scroll down and select Distributions, press Enter.<br />
4. Scroll down to ports, press Space.<br />
5. Scroll up to Exit, press Enter.<br />
6. Select your desired installation media, such as CDROM, FTP, and so on.<br />
7. Scroll up to Exit and press Enter.<br />
8. Press X to exit sysinstall.</p>
<p>== Removing Installed Ports ==</p>
<p>Now that you know how to install ports, you are probably wondering how to remove them, just in case you install one and later on decide that you installed the wrong port. We will remove our previous example (which was lsof for those of you not paying attention). Ports are being removed exactly the same as the packages (discussed in the Packages section), using the pkg_delete(1) command:</p>
<p> # pkg_delete lsof-4.57</p>
<p>== Upgrading Ports ==</p>
<p>First, list outdated ports that have a newer version available in the Ports Collection with the pkg_version(1) command:</p>
<p> # pkg_version -v</p>
<p>== Upgrading Ports using Portupgrade ==</p>
<p>The portupgrade utility is designed to easily upgrade installed ports. It is available from the ports-mgmt/portupgrade port. Install it like any other port, using the make install clean command:</p>
<p> # cd /usr/ports/ports-mgmt/portupgrade<br />
 # make install clean</p>
<p>Scan the list of installed ports with the pkgdb -F command and fix all the inconsistencies it reports. It is a good idea to do this regularly, before every upgrade.</p>
<p>When you run portupgrade -a, portupgrade will begin to upgrade all the outdated ports installed on your system. Use the -i flag if you want to be asked for confirmation of every individual upgrade.</p>
<p> # portupgrade -ai</p>
<p>If you want to upgrade only a certain application, not all available ports, use portupgrade pkgname. Include the -R flag if portupgrade should first upgrade all the ports required by the given application.</p>
<p> # portupgrade -R firefox</p>
<p>To use packages instead of ports for installation, provide -P flag. With this option portupgrade searches the local directories listed in PKG_PATH, or fetches packages from remote site if it is not found locally. If packages can not be found locally or fetched remotely, portupgrade will use ports. To avoid using ports, specify -PP.</p>
<p> # portupgrade -PP gnome2</p>
<p>To just fetch distfiles (or packages, if -P is specified) without building or installing anything, use -F. For further information see portupgrade(1).</p>
<p>== Upgrading Ports using Portmanager ==</p>
<p>Portmanager is another utility for easy upgrading of installed ports. It is available from the ports-mgmt/portmanager port:</p>
<p> # cd /usr/ports/ports-mgmt/portmanager<br />
 # make install clean</p>
<p>All the installed ports can be upgraded using this simple command:</p>
<p> # portmanager -u</p>
<p>You can add the -ui flag to get asked for confirmation of every step Portmanager will perform. Portmanager can also be used to install new ports on the system. Unlike the usual make install clean command, it will upgrade all the dependencies prior to building and installing the selected port.</p>
<p> # portmanager x11/gnome2</p>
<p>If there are any problems regarding the dependencies for the selected port, you can use Portmanager to rebuild all of them in the correct order. Once finished, the problematic port will be rebuilt too.</p>
<p>== Upgrading Ports using Portmaster ==</p>
<p>Portmaster is another utility for upgrading installed ports. Portmaster was designed make use of the tools found in the “base” system (it does not depend upon other ports) and uses the information in /var/db/pkg/ to determine which ports to upgrade. It is available from the ports-mgmt/portmaster port:</p>
<p> # cd /usr/ports/ports-mgmt/portmaster<br />
 # make install clean</p>
<p>Portmaster groups ports into four categories:</p>
<p>    *</p>
<p>      Root ports (no dependencies, not depended on)<br />
    *</p>
<p>      Trunk ports (no dependencies, are depended on)<br />
    *</p>
<p>      Branch ports (have dependencies, are depended on)<br />
    *</p>
<p>      Leaf ports (have dependencies, not depended on)</p>
<p>You can list all the installed ports and search for updates using the -L option:</p>
<p> # portmaster -L<br />
===>>> Root ports (No dependencies, not depended on)<br />
===>>> ispell-3.2.06_18<br />
===>>> screen-4.0.3<br />
        ===>>> New version available: screen-4.0.3_1<br />
===>>> tcpflow-0.21_1<br />
===>>> 7 root ports<br />
&#8230;<br />
===>>> Branch ports (Have dependencies, are depended on)<br />
===>>> apache-2.2.3<br />
        ===>>> New version available: apache-2.2.8<br />
&#8230;<br />
===>>> Leaf ports (Have dependencies, not depended on)<br />
===>>> automake-1.9.6_2<br />
===>>> bash-3.1.17<br />
        ===>>> New version available: bash-3.2.33<br />
&#8230;<br />
===>>> 32 leaf ports</p>
<p>===>>> 137 total installed ports<br />
        ===>>> 83 have new versions available</p>
<p>All the installed ports can be upgraded using this simple command:</p>
<p> # portmaster -a</p>
<p>    Note: By default, Portmaster will make a backup package before deleting the existing port. If the installation of the new version is successful, Portmaster will delete the backup. Using the -b will instruct Portmaster not to automatically delete the backup. Adding the -i option will start Portmaster in interactive mode, prompting you before upgrading each port.</p>
<p>If you encounter errors during the upgrade process, you can use the -f option to upgrade/rebuild all ports:</p>
<p> # portmaster -af</p>
<p>You can also use Portmaster to install new ports on the system, upgrading all dependencies before building and installing the new port:</p>
<p> # portmaster shells/bash</p>
<p>Please see portmaster(8) from more information.</p>
<p>== Ports and Disk Space ==</p>
<p>Using the Ports Collection will use up disk space over time. After building and installing software from the ports, you should always remember to clean up the temporary work directories using the make clean command. You can sweep the whole Ports Collection with the following command:</p>
<p> # portsclean -C</p>
<p>You will accumulate a lot of old source distribution files in the distfiles directory over time. You can remove them by hand, or you can use the following command to delete all the distfiles that are no longer referenced by any ports:</p>
<p> # portsclean -D</p>
<p>Or to remove all distfiles not referenced by any port currently installed on your system:</p>
<p> # portsclean -DD</p>
<p>Note: The portsclean utility is part of the portupgrade suite.</p>
<p>Do not forget to remove the installed ports once you no longer need them. A nice tool to help automate this task is available from the ports-mgmt/pkg_cutleaves port.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/installing-ports-collection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rehash after adding packages</title>
		<link>http://www.x83.net/rehash-after-adding-packages/</link>
		<comments>http://www.x83.net/rehash-after-adding-packages/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 20:49:56 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[rehash]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=149</guid>
		<description><![CDATA[# pkg_add -r bash; pkg_add -r cvsup-without-gui; pkg_add -r nano # nano nano: Command not found. # rehash]]></description>
			<content:encoded><![CDATA[<p> # pkg_add -r bash; pkg_add -r cvsup-without-gui; pkg_add -r nano<br />
 # nano<br />
 nano: Command not found.<br />
 # rehash</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/rehash-after-adding-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>updatedb freebsd</title>
		<link>http://www.x83.net/updatedb-freebsd/</link>
		<comments>http://www.x83.net/updatedb-freebsd/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 20:49:12 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[updatedb]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=147</guid>
		<description><![CDATA[FreeBSD and updatedb To use locate under FreeBSD you first need to run updatedb: /usr/libexec/locate.updatedb]]></description>
			<content:encoded><![CDATA[<p>FreeBSD and updatedb</p>
<p>To use <strong>locate</strong> under FreeBSD you first need to run updatedb:</p>
<p>/usr/libexec/locate.updatedb</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/updatedb-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim improved howto</title>
		<link>http://www.x83.net/vim-improved-howto/</link>
		<comments>http://www.x83.net/vim-improved-howto/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 20:44:18 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[vim improved]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=142</guid>
		<description><![CDATA[VIM is the most useful standard text editor on your system. (vi is short for visual editor and is pronounced “vee-eye.” Unlike Emacs, it is available in nearly identical form on every modern Unix system, thus providing a kind of text-editing With a screen editor, you can scroll the page, move the cursor, delete lines, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>VIM</strong> is the most useful standard text editor on your system. (vi is short for visual editor<br />
and is pronounced “vee-eye.”<br />
Unlike Emacs, it is available in nearly identical form on every modern Unix system, thus providing<br />
a kind of text-editing</p>
<p>With a screen editor, you can scroll the page, move<br />
the cursor, delete lines, insert characters, and more, while seeing the results of your<br />
edits as you make them. Screen editors are very popular, since they allow you to make<br />
changes as you read through a file, like you would edit a printed copy, only faster.</p>
<p><strong>Intro</strong></p>
<p><strong>Quitting Without Saving Edits</strong></p>
<p>When you are first learning vi, especially if you are an intrepid experimenter, there are<br />
two other ex commands that are handy for getting out of any mess that you might create.<br />
What if you want to wipe out all of the edits you have made in a session and then return<br />
to the original file? The command:</p>
<p> :e! <Enter></p>
<p><strong>To quit :</strong></p>
<blockquote><p> :q! <Enter></p></blockquote>
<p>&#8221;The exclamation point added to the :e or :q command causes vi to override this prohibition, performing the operation<br />
even though the buffer has been modified.&#8221;</p>
<p><strong>Saving file</strong></p>
<p><strong>You can save in a new file </strong></p>
<blockquote><p> :w newfile  or :w pathname/file</p></blockquote>
<p><strong>Delete a file :</strong></p>
<blockquote><p>:!rm file</p></blockquote>
<p><strong>Free space:</strong></p>
<blockquote><p>:!df </p></blockquote>
<p><strong>Shell commands :</strong></p>
<blockquote><p> :!ls /tmp<br />
 :!sh   :!shell (For shell)  &#8211; :exit to exit or CTRL+D   CTRL+Z for background (fg + bg)</p></blockquote>
<p>You try to write your file, but you get a message telling you that your disk quota has<br />
been reached.<br />
Try to force the system to save your buffer with the ex command :pre (short<br />
for :preserve). If that doesn’t work, look for some files to remove. Use :sh (or<br />
CTRL-Z if you are using a job-control system) to move out of vi and remove files.<br />
Use CTRL-D (or fg) to return to vi when you’re done. Then write your file<br />
with :w!.</p>
<p><strong>vi Commands</strong></p>
<p>vi has two modes: command mode and insert mode. As soon as you enter a file, you<br />
are in command mode, and the editor is waiting for you to enter a command. Commands<br />
enable you to move anywhere in the file, to perform edits, or to enter insert<br />
mode to add new text. Commands can also be given to exit the file (saving or ignoring<br />
your edits) in order to return to the Unix prompt.</p>
<p><strong>Moving the Cursor</strong></p>
<p>In command mode you can position the cursor anywhere in the file. Since you begin<br />
all basic edits (changing, deleting, and copying text) by placing the cursor at the text<br />
that you want to change, you want to be able to move the cursor to that place as quickly<br />
as possible.</p>
<p><strong>Single Movements</strong></p>
<p>The keys h, j, k, and l, right under your fingertips, will move the cursor:</p>
<blockquote><p>h<br />
Left, one space<br />
j<br />
Down, one line<br />
k<br />
Up, one line<br />
l<br />
Right, one space</p></blockquote>
<p>You can also use the cursor arrow keys ( ? , ? , ? , ? ), + and &#8211; to go up and down, or<br />
the ENTER and BACKSPACE keys, but they are out of the way. At first, it may seem<br />
awkward to use letter keys instead of arrows for cursor movement. After a short while,<br />
though, you’ll find it is one of the things you’ll like best about vi—you can move around<br />
without ever taking your fingers off the center of the keyboard.</p>
<p><strong>Numeric Arguments</strong></p>
<p>You can precede movement commands with numbers. For Ex command 4l moves the cursor four spaces to the right, just as if you had typed l four times<br />
(llll).</p>
<blockquote><p>e.g 4l &#8211; 4 spaces to the right<br />
    4h &#8211; 4 spaces to the left<br />
    4k &#8211; 4 lines up<br />
    4j &#8211; 4 lines down
</p></blockquote>
<p><strong>vi</strong> has an option that allows you to set a distance from<br />
the right margin at which vi will automatically insert a newline character. This option<br />
is wrapmargin (its abbreviation is wm). You can set a wrapmargin at 10 characters:</p>
<blockquote><p> :set wm=10</p></blockquote>
<p><strong>Movement Within a Line</strong></p>
<p>Two useful commands that involve movement within a line are:</p>
<blockquote><p>0 (digit zero)<br />
Move to beginning of line.<br />
$<br />
Move to end of line.
</p></blockquote>
<p>Line numbers can be displayed<br />
in vi by using the number option, which is enabled by typing </p>
<blockquote><p> :set nu in command mode</p></blockquote>
<p>Tricks:<br />
1). edit $HOME/.vimrc and add : set ts=4 (tab space, default is 8 )</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/vim-improved-howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NetBSD adding users</title>
		<link>http://www.x83.net/netbsd-adding-users/</link>
		<comments>http://www.x83.net/netbsd-adding-users/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 20:57:15 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[NetBSD]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[useradd]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=165</guid>
		<description><![CDATA[useradd -G wheel -g wheel -m -s /bin/ksh giany user mod -s /usr/pkg/bin/bash giany Check &#8221;user&#8221; syntax.]]></description>
			<content:encoded><![CDATA[<p> useradd -G wheel -g wheel -m -s /bin/ksh giany<br />
 user mod -s /usr/pkg/bin/bash giany</p>
<p>Check &#8221;user&#8221; syntax.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/netbsd-adding-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD: GRE Tunnels</title>
		<link>http://www.x83.net/freebsd-gre-tunnels/</link>
		<comments>http://www.x83.net/freebsd-gre-tunnels/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 20:54:34 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[gre]]></category>
		<category><![CDATA[gre1]]></category>
		<category><![CDATA[ifconfig]]></category>
		<category><![CDATA[tunnel]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=160</guid>
		<description><![CDATA[b0x# kldstat Id Refs Address Size Name 1 5 0xc0400000 34f898 kernel 2 14 0xc0750000 56270 acpi.ko 3 1 0xc0c97000 1c000 ipl.ko 4 1 0xc15ef000 4000 if_gre.ko # kldload if_gre.ko # sysctl -w net.inet.ip.gre_default_mtu=1450 # ifconfig gre1 create # ifconfig gre1 tunnel 217.154.12.2 212.25.240.34 # ifconfig gre1 mtu 1450 # ifconfig gre1 inet 10.1.12.38 10.1.12.37 [...]]]></description>
			<content:encoded><![CDATA[<pre>
b0x# kldstat
Id Refs Address Size Name
1 5 0xc0400000 34f898 kernel
2 14 0xc0750000 56270 acpi.ko
3 1 0xc0c97000 1c000 ipl.ko
4 1 0xc15ef000 4000 if_gre.ko
</pre>
<pre>
# kldload if_gre.ko
# sysctl -w net.inet.ip.gre_default_mtu=1450
# ifconfig gre1 create
# ifconfig gre1 tunnel 217.154.12.2 212.25.240.34
# ifconfig gre1 mtu 1450
# ifconfig gre1 inet 10.1.12.38 10.1.12.37 netmask 255.255.255.252
# ifconfig gre1 up
</pre>
<p>And that was that!</p>
<p>or Lan :</p>
<pre>
# ifconfig gre1 inet 10.1.12.37 10.1.12.38 netmask 255.255.255.252 up
# /usr/sbin/greconfig -i gre1 -v -s 212.25.240.34 -d 217.154.12.2
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/freebsd-gre-tunnels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NetBSD Qemu</title>
		<link>http://www.x83.net/netbsd-qemu/</link>
		<comments>http://www.x83.net/netbsd-qemu/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 20:56:39 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[NetBSD]]></category>
		<category><![CDATA[qemu]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=163</guid>
		<description><![CDATA[I tested NetBSD 4.0 under Qemu and all seems to work fine. First of all create a slice partition of 3GB. dd if=/dev/zero of=scratch.img bs=3072 count=1000000 and then boot NetBSD using the iso : qemu scratch.img -cdrom /home/giany/Desktop/i386cd-4.0.iso -boot d After booting follow these steps: Follow the instruction screens when the NetBSD installer appears. If [...]]]></description>
			<content:encoded><![CDATA[<p>I tested NetBSD 4.0 under Qemu and all seems to work fine.<br />
First of all create a slice partition of 3GB.</p>
<p> dd if=/dev/zero of=scratch.img bs=3072 count=1000000</p>
<p>and then boot NetBSD using the iso :<br />
<span id="more-163"></span><br />
 qemu  scratch.img -cdrom /home/giany/Desktop/i386cd-4.0.iso -boot d</p>
<p>After booting follow these steps:</p>
<p>Follow the instruction screens when the NetBSD installer appears. If a particular step or<br />
choice is not mentioned here then you sould use the default choices.</p>
<p>- choose a custom installation</p>
<p>- select only one of either the GENERIC or GENERIC.MP kernels, depending on the server</p>
<p>- select all sets except Games and x11</p>
<p>- choose to use the entire disk for the NetBSD installation</p>
<p>- Choose to set the sizes of the NetBSD partitions</p>
<p>Partition sizes should be as follows:</p>
<p>Mountpoint      Size<br />
/               2G<br />
swap            2G<br />
/tmp            512G<br />
/var            20G<br />
/usr            20G<br />
/home           rest</p>
<p>- choose to use serial port com0 for the bootblock selection</p>
<p>- choose US/Pacific-New as the timezone</p>
<p>- choose MD5 for password encryption</p>
<p>- set the root password</p>
<p>Configure hostname, IP address, default gateway as needed</p>
<p>After the install process close the Qemu window and run qemu using the image that slice.</p>
<p> qemu  -m 256 -hda scratch.img  -localtime -net nic,vlan=0,macaddr=00:aa:00:00:01:02,model=i82559er -net tap,vlan=0,script=no</p>
<p>and from the linux box:</p>
<p> ifconfig tap1 2.2.2.1 netmask 255.255.255.0 up</p>
<p>Configure the nameserver in /etc/resolv.conf set in /etc/ifconfig.fxp0 the ip address smth like :</p>
<p> inet 2.2.2.2 netmask 255.255.255.0 media autoselect<br />
 inet 3.3.3.3 netmask 255.255.255.0 alias                                  // for multiple interfaces<br />
 inet 4.4.4.4 netmask 255.255.255.0 alias</p>
<p>My rc.conf file looks like:</p>
<p>
<pre>
hostname="kwala.x83.net"
domainname="x83.net"
auto_ifconfig=YES
defaultroute="2.2.2.1"
wscons=YES
sshd=YES
</pre>
</p>
<p>To add extra packages check this link <a href="ftp://ftp.netbsd.org/pub/NetBSD/packages/4.0/i386/All/">ftp://ftp.netbsd.org/pub/NetBSD/packages/4.0/i386/All/</a> and choose what packages you want. I installed bash/net-snmp/perl/tcsh/mtr.<br />
Now you should see the internet from the NetBSD box.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/netbsd-qemu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD : Install and configure Tripwire</title>
		<link>http://www.x83.net/freebsd-install-and-configure-tripwire/</link>
		<comments>http://www.x83.net/freebsd-install-and-configure-tripwire/#comments</comments>
		<pubDate>Fri, 13 Apr 2007 20:53:59 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[tripwire]]></category>

		<guid isPermaLink="false">http://www.x83.net/blog/?p=158</guid>
		<description><![CDATA[ADD THE TRIPWIRE SECURITY COMPONENT Setup Tripwire (ref: http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/ch-tripwire.html) Edit the /etc/tripwire/twcfg.txt file to reflect the following: EDITOR =/usr/bin/pico Edit the /etc/tripwire/twpol.txt file to reflect the following: (emailto = "me@me.com") { ! /proc; / -&#62; $(ReadOnly); ! /dev; /boot -&#62; $(ReadOnly); /tmp -&#62; $(ReadOnly); /var/log -&#62; $(ReadOnly); /var/log/httpd/access_log -&#62; l; /var/log/httpd/error_log -&#62; l; } Install/Setup [...]]]></description>
			<content:encoded><![CDATA[<p><strong>ADD THE TRIPWIRE SECURITY COMPONENT</strong></p>
<p>Setup Tripwire (ref: http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/ch-tripwire.html)<br />
Edit the /etc/tripwire/twcfg.txt file to reflect the following:</p>
<p>EDITOR =/usr/bin/pico</p>
<p>Edit the /etc/tripwire/twpol.txt file to reflect the following:</p>
<pre>(emailto = "me@me.com")
{
! /proc;
/ -&gt; $(ReadOnly);
! /dev;
/boot -&gt; $(ReadOnly);
/tmp -&gt; $(ReadOnly);
/var/log -&gt; $(ReadOnly);
/var/log/httpd/access_log -&gt; l;
/var/log/httpd/error_log -&gt; l;
}</pre>
<p>Install/Setup (only once):</p>
<pre>/etc/tripwire/twinstall.sh
site key: web site key
local key: web local key</pre>
<p>Initialize:</p>
<pre>/usr/sbin/tripwire --init

Check:
/usr/sbin/tripwire --check

View logs:
/usr/sbin/twprint -m r --twrfile /var/lib/tripwire/report/.twr | less

Remove files unneeded by default setup
pico /etc/tripwire/twpol.txt

Generate new policy file:
/usr/sbin/twadmin --create-polfile -S site.key /etc/tripwire/twpol.txt

Initialize again:
/usr/sbin/tripwire --init</pre>
<pre>Cron will check daily
View logs:
/usr/sbin/twprint -m r --twrfile /var/lib/tripwire/report/.twr | less
Update the database:
/usr/sbin/tripwire --update --twrfile /var/lib/tripwire/report/.twr
Customize.</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/freebsd-install-and-configure-tripwire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

