<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://freebsdwiki.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://freebsdwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pete</id>
		<title>FreeBSDwiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://freebsdwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pete"/>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Special:Contributions/Pete"/>
		<updated>2026-04-30T19:43:35Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.18.0</generator>

	<entry>
		<id>http://freebsdwiki.net/index.php/MySQL,_Simple_Installation</id>
		<title>MySQL, Simple Installation</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/MySQL,_Simple_Installation"/>
				<updated>2004-09-02T20:32:13Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article will walk you through a simple installation of MySQL server, for usage via localhost in a local environment. (For example, for use in conjunction with Apache and PHP in a web-database related role, with no direct foreign connections to the MySQL server. All connections will be made internally.)&lt;br /&gt;
&lt;br /&gt;
See also:  [[MySQL]]&lt;br /&gt;
&lt;br /&gt;
'''Overview'''&lt;br /&gt;
&lt;br /&gt;
For this article, I'll be installing MySQL Server and Client, version 4.0.20 (current in my ports tree.) The steps listed here will very likely work for newer versions available when you read this, but you may want to google to make sure.&lt;br /&gt;
&lt;br /&gt;
'''Install MySQL from ports'''&lt;br /&gt;
&lt;br /&gt;
First, we need to install the port. Make sure you're logged in as [[root]], and as always, update your ports tree with [[CVSUP]] before doing any major software installations.&lt;br /&gt;
&lt;br /&gt;
 oyabun# cd /usr/ports/databases/mysql40-server/&lt;br /&gt;
 oyabun# make install clean BUILD_OPTIMIZED=YES BUILD_STATIC=yes&lt;br /&gt;
 &lt;br /&gt;
This will download the source for MySQL Server, compile it optimized for your particular system, and also install mysql40-client, as it is a dependency. This process will very likely take a decent amount of time. ''Oyabun'' is my BSD server, and it's an AthlonXP 2000+, compiling MySQL from source usually takes about 15 - 25 minutes. (Guesstimating, I've never actually timed it.)&lt;br /&gt;
&lt;br /&gt;
When the installation is done, you'll see something very similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre name=&amp;quot;I used pre on this because this is a lot of text.&amp;quot;&amp;gt;&lt;br /&gt;
To start mysqld at boot time you have to copy support-files/mysql.server&lt;br /&gt;
to the right place for your system&lt;br /&gt;
&lt;br /&gt;
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !&lt;br /&gt;
To do so, start the server, then issue the following commands:&lt;br /&gt;
/usr/local/bin/mysqladmin -u root password 'new-password'&lt;br /&gt;
/usr/local/bin/mysqladmin -u root -h oyabun.n3s.local password 'new-password'&lt;br /&gt;
See the manual for more instructions.&lt;br /&gt;
&lt;br /&gt;
You can start the MySQL daemon with:&lt;br /&gt;
cd /usr/local ; /usr/local/bin/mysqld_safe &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:&lt;br /&gt;
cd sql-bench ; perl run-all-tests&lt;br /&gt;
&lt;br /&gt;
Please report any problems with the /usr/local/bin/mysqlbug script!&lt;br /&gt;
&lt;br /&gt;
The latest information about MySQL is available on the web at&lt;br /&gt;
http://www.mysql.com&lt;br /&gt;
Support MySQL by buying support/licenses at https://order.mysql.com&lt;br /&gt;
mysql:*:88:&lt;br /&gt;
You already have a group &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
mysql:*:88:88::0:0:MySQL Daemon:/var/db/mysql:/sbin/nologin&lt;br /&gt;
You already have a user &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
Changed home directory of &amp;quot;mysql&amp;quot; to &amp;quot;/var/db/mysql&amp;quot;&lt;br /&gt;
===&amp;gt;   Compressing manual pages for mysql-server-4.0.20&lt;br /&gt;
===&amp;gt;   Registering installation for mysql-server-4.0.20&lt;br /&gt;
===&amp;gt; SECURITY REPORT:&lt;br /&gt;
      This port has installed the following files which may act as network&lt;br /&gt;
      servers and may therefore pose a remote security risk to the system.&lt;br /&gt;
/usr/local/bin/ndb_drop_table&lt;br /&gt;
/usr/local/bin/ndb_delete_all&lt;br /&gt;
/usr/local/libexec/ndbd&lt;br /&gt;
/usr/local/bin/ndb_restore&lt;br /&gt;
/usr/local/bin/ndb_cpcd&lt;br /&gt;
/usr/local/libexec/ndb_mgmd&lt;br /&gt;
/usr/local/bin/ndb_select_all&lt;br /&gt;
/usr/local/bin/ndb_drop_index&lt;br /&gt;
/usr/local/bin/ndb_desc&lt;br /&gt;
/usr/local/lib/mysql/libndbclient.so.0&lt;br /&gt;
/usr/local/bin/ndb_show_tables&lt;br /&gt;
/usr/local/bin/ndb_waiter&lt;br /&gt;
/usr/local/bin/ndb_select_count&lt;br /&gt;
&lt;br /&gt;
      This port has installed the following startup scripts which may cause&lt;br /&gt;
      these network services to be started at boot time.&lt;br /&gt;
/usr/local/etc/rc.d/mysql-server.sh&lt;br /&gt;
&lt;br /&gt;
      If there are vulnerabilities in these programs there may be a security&lt;br /&gt;
      risk to the system. FreeBSD makes no guarantee about the security of&lt;br /&gt;
      ports included in the Ports Collection. Please type 'make deinstall'&lt;br /&gt;
      to deinstall the port if this is a concern.&lt;br /&gt;
&lt;br /&gt;
      For more information, and contact details about the security&lt;br /&gt;
      status of this software, see the following webpage:&lt;br /&gt;
http://www.mysql.com/&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-client-4.0.20&lt;br /&gt;
===&amp;gt;  Cleaning for libtool-1.5.8&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-server-4.0.20&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The really important parts are those about '''setting a MySQL password for your root account''', and the addition of a mysql group and a mysql user to your base system. You'll notice in my example that I already had a mysql user and group, but you likely won't.&lt;br /&gt;
&lt;br /&gt;
You'll also notice that the install added a startup script to /usr/local/etc/rc.d/, meaning MySQL server will start with every boot now. Let's move on to configuration and finish up this installation.&lt;br /&gt;
&lt;br /&gt;
'''Configuration'''&lt;br /&gt;
&lt;br /&gt;
MySQL is now installed, so let's get it ready for use.&lt;br /&gt;
&lt;br /&gt;
First, we have to start the server. The following assumes you logged in as a regular account, then used [[su]] to become [[root]].&lt;br /&gt;
&lt;br /&gt;
 oyabun# exit&lt;br /&gt;
 exit&lt;br /&gt;
 &amp;gt; su&lt;br /&gt;
 Password:&lt;br /&gt;
 oyabun# /usr/local/etc/rc.d/mysql-server.sh start&lt;br /&gt;
 mysqloyabun#&lt;br /&gt;
 oyabun#&lt;br /&gt;
&lt;br /&gt;
It may not be necessary, but I usually exit my root shell and re-login in after major software installations, so the system can find necessary scripts and programs in the path, which the new software may have updated. It costs nothing but a few seconds. Anyway: You'll notice mysql notified you that it started by changing the next shell prompt to &amp;quot;''mysqloyabun#'', where ''oyabun'' = the name of your server.&lt;br /&gt;
&lt;br /&gt;
Now, let's set that root password.&lt;br /&gt;
&lt;br /&gt;
 oyabun# /usr/local/bin/mysqladmin -u root password 'new-password'&lt;br /&gt;
 oyabun# /usr/local/bin/mysqladmin -u root -h oyabun.n3s.local password 'new-password'&lt;br /&gt;
&lt;br /&gt;
Change 'new-password' to whatever you really want use as your password. In the second line, change '''oyabun.n3s.local''' to whatever your current domain qualification is for your server. The MySQL install will tell you - remember, I pulled this example out of the output at end-of-install. If you're copying and pasting this as you go into your putty session or other ssh client, WATCH OUT FOR LINEBREAKS. If you copy the carriage return as well, you really did just set your password to 'new-password.' (Hey, don't laugh, it just happened to me.)&lt;br /&gt;
&lt;br /&gt;
If that happens, you'll have to issue a slightly different command to change a current password.&lt;br /&gt;
&lt;br /&gt;
 oyabun# /usr/local/bin/mysqladmin -p password 'the-REAL-password'&lt;br /&gt;
 Enter password:&lt;br /&gt;
 oyabun#&lt;br /&gt;
&lt;br /&gt;
Since you're logged in as root, this will change your password '''after''' you enter the current password, which if you screwed up like I did, is/was 'new-password'. Crisis averted.&lt;br /&gt;
&lt;br /&gt;
'''Note''': From now on, you can't type '''mysql''' at a command prompt to enter the mysql client, you have to add '''-p''' to make it challenge you for a password.&lt;br /&gt;
&lt;br /&gt;
'''Testing the installation'''&lt;br /&gt;
&lt;br /&gt;
We're going to get into a little bit of mysql syntax here. For more in-depth documentation, you should visit http://www.mysql.com or google the particular command you're having trouble with, using 'mysql grant syntax' as the search argument for example.&lt;br /&gt;
&lt;br /&gt;
 oyabun# mysql -p&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 31 to server version: 4.0.20&lt;br /&gt;
 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.&lt;br /&gt;
 mysql&amp;gt; create database testing;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; grant all on testing.* to 'user'@'localhost' identified by 'password';&lt;br /&gt;
 Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, you'll notice that all commands in the mysql client have to be terminated with ''';'''. If you forget and hit enter, you can just enter a lone ''';''' on a new line, and it will work provided the syntax of the command is correct.&lt;br /&gt;
&lt;br /&gt;
If both of those commands worked, then you just created a database named testing, and assigned full read/write priviledges to a user name 'user' with password 'password'.&lt;br /&gt;
&lt;br /&gt;
To delete a database, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; drop database testing;&lt;br /&gt;
 Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
That's it! You now have MySQL added to your machine, and you begin using php scripts or other MySQL tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category : Ports and Packages]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/MySQL,_Simple_Installation</id>
		<title>MySQL, Simple Installation</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/MySQL,_Simple_Installation"/>
				<updated>2004-09-02T20:27:34Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article will walk you through a simple installation of MySQL server, for usage via localhost in a local environment. (For example, for use in conjunction with Apache and PHP in a web-database related role, with no direct foreign connections to the MySQL server. All connections will be made internally.)&lt;br /&gt;
&lt;br /&gt;
See also:  [[MySQL]]&lt;br /&gt;
&lt;br /&gt;
'''Overview'''&lt;br /&gt;
&lt;br /&gt;
For this article, I'll be installing MySQL Server and Client, version 4.0.20 (current in my ports tree.) The steps listed here will very likely work for newer versions available when you read this, but you may want to google to make sure.&lt;br /&gt;
&lt;br /&gt;
'''Install MySQL from ports'''&lt;br /&gt;
&lt;br /&gt;
First, we need to install the port. Make sure you're logged in as [[root]], and as always, update your ports tree with [[CVSUP]] before doing any major software installations.&lt;br /&gt;
&lt;br /&gt;
 oyabun# cd /usr/ports/databases/mysql40-server/&lt;br /&gt;
 oyabun# make install clean BUILD_OPTIMIZED=YES BUILD_STATIC=yes&lt;br /&gt;
 &lt;br /&gt;
This will download the source for MySQL Server, compile it optimized for your particular system, and also install mysql40-client, as it is a dependency. This process will very likely take a decent amount of time. ''Oyabun'' is my BSD server, and it's an AthlonXP 2000+, compiling MySQL from source usually takes about 15 - 25 minutes. (Guesstimating, I've never actually timed it.)&lt;br /&gt;
&lt;br /&gt;
When the installation is done, you'll see something very similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre name=&amp;quot;I used pre on this because this is a lot of text.&amp;quot;&amp;gt;&lt;br /&gt;
To start mysqld at boot time you have to copy support-files/mysql.server&lt;br /&gt;
to the right place for your system&lt;br /&gt;
&lt;br /&gt;
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !&lt;br /&gt;
To do so, start the server, then issue the following commands:&lt;br /&gt;
/usr/local/bin/mysqladmin -u root password 'new-password'&lt;br /&gt;
/usr/local/bin/mysqladmin -u root -h oyabun.n3s.local password 'new-password'&lt;br /&gt;
See the manual for more instructions.&lt;br /&gt;
&lt;br /&gt;
You can start the MySQL daemon with:&lt;br /&gt;
cd /usr/local ; /usr/local/bin/mysqld_safe &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:&lt;br /&gt;
cd sql-bench ; perl run-all-tests&lt;br /&gt;
&lt;br /&gt;
Please report any problems with the /usr/local/bin/mysqlbug script!&lt;br /&gt;
&lt;br /&gt;
The latest information about MySQL is available on the web at&lt;br /&gt;
http://www.mysql.com&lt;br /&gt;
Support MySQL by buying support/licenses at https://order.mysql.com&lt;br /&gt;
mysql:*:88:&lt;br /&gt;
You already have a group &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
mysql:*:88:88::0:0:MySQL Daemon:/var/db/mysql:/sbin/nologin&lt;br /&gt;
You already have a user &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
Changed home directory of &amp;quot;mysql&amp;quot; to &amp;quot;/var/db/mysql&amp;quot;&lt;br /&gt;
===&amp;gt;   Compressing manual pages for mysql-server-4.1.3&lt;br /&gt;
===&amp;gt;   Registering installation for mysql-server-4.1.3&lt;br /&gt;
===&amp;gt; SECURITY REPORT:&lt;br /&gt;
      This port has installed the following files which may act as network&lt;br /&gt;
      servers and may therefore pose a remote security risk to the system.&lt;br /&gt;
/usr/local/bin/ndb_drop_table&lt;br /&gt;
/usr/local/bin/ndb_delete_all&lt;br /&gt;
/usr/local/libexec/ndbd&lt;br /&gt;
/usr/local/bin/ndb_restore&lt;br /&gt;
/usr/local/bin/ndb_cpcd&lt;br /&gt;
/usr/local/libexec/ndb_mgmd&lt;br /&gt;
/usr/local/bin/ndb_select_all&lt;br /&gt;
/usr/local/bin/ndb_drop_index&lt;br /&gt;
/usr/local/bin/ndb_desc&lt;br /&gt;
/usr/local/lib/mysql/libndbclient.so.0&lt;br /&gt;
/usr/local/bin/ndb_show_tables&lt;br /&gt;
/usr/local/bin/ndb_waiter&lt;br /&gt;
/usr/local/bin/ndb_select_count&lt;br /&gt;
&lt;br /&gt;
      This port has installed the following startup scripts which may cause&lt;br /&gt;
      these network services to be started at boot time.&lt;br /&gt;
/usr/local/etc/rc.d/mysql-server.sh&lt;br /&gt;
&lt;br /&gt;
      If there are vulnerabilities in these programs there may be a security&lt;br /&gt;
      risk to the system. FreeBSD makes no guarantee about the security of&lt;br /&gt;
      ports included in the Ports Collection. Please type 'make deinstall'&lt;br /&gt;
      to deinstall the port if this is a concern.&lt;br /&gt;
&lt;br /&gt;
      For more information, and contact details about the security&lt;br /&gt;
      status of this software, see the following webpage:&lt;br /&gt;
http://www.mysql.com/&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-client-4.0.20&lt;br /&gt;
===&amp;gt;  Cleaning for libtool-1.5.8&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-server-4.0.20&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The really important parts are those about '''setting a MySQL password for your root account''', and the addition of a mysql group and a mysql user to your base system. You'll notice in my example that I already had a mysql user and group, but you likely won't.&lt;br /&gt;
&lt;br /&gt;
You'll also notice that the install added a startup script to /usr/local/etc/rc.d/, meaning MySQL server will start with every boot now. Let's move on to configuration and finish up this installation.&lt;br /&gt;
&lt;br /&gt;
'''Configuration'''&lt;br /&gt;
&lt;br /&gt;
MySQL is now installed, so let's get it ready for use.&lt;br /&gt;
&lt;br /&gt;
First, we have to start the server. The following assumes you logged in as a regular account, then used [[su]] to become [[root]].&lt;br /&gt;
&lt;br /&gt;
 oyabun# exit&lt;br /&gt;
 exit&lt;br /&gt;
 &amp;gt; su&lt;br /&gt;
 Password:&lt;br /&gt;
 oyabun# /usr/local/etc/rc.d/mysql-server.sh start&lt;br /&gt;
 mysqloyabun#&lt;br /&gt;
 oyabun#&lt;br /&gt;
&lt;br /&gt;
It may not be necessary, but I usually exit my root shell and re-login in after major software installations, so the system can find necessary scripts and programs in the path, which the new software may have updated. It costs nothing but a few seconds. Anyway: You'll notice mysql notified you that it started by changing the next shell prompt to &amp;quot;''mysqloyabun#'', where ''oyabun'' = the name of your server.&lt;br /&gt;
&lt;br /&gt;
Now, let's set that root password.&lt;br /&gt;
&lt;br /&gt;
 oyabun# /usr/local/bin/mysqladmin -u root password 'new-password'&lt;br /&gt;
 oyabun# /usr/local/bin/mysqladmin -u root -h oyabun.n3s.local password 'new-password'&lt;br /&gt;
&lt;br /&gt;
Change 'new-password' to whatever you really want use as your password. In the second line, change '''oyabun.n3s.local''' to whatever your current domain qualification is for your server. The MySQL install will tell you - remember, I pulled this example out of the output at end-of-install. If you're copying and pasting this as you go into your putty session or other ssh client, WATCH OUT FOR LINEBREAKS. If you copy the carriage return as well, you really did just set your password to 'new-password.' (Hey, don't laugh, it just happened to me.)&lt;br /&gt;
&lt;br /&gt;
If that happens, you'll have to issue a slightly different command to change a current password.&lt;br /&gt;
&lt;br /&gt;
 oyabun# /usr/local/bin/mysqladmin -p password 'the-REAL-password'&lt;br /&gt;
 Enter password:&lt;br /&gt;
 oyabun#&lt;br /&gt;
&lt;br /&gt;
Since you're logged in as root, this will change your password '''after''' you enter the current password, which if you screwed up like I did, is/was 'new-password'. Crisis averted.&lt;br /&gt;
&lt;br /&gt;
'''Note''': From now on, you can't type '''mysql''' at a command prompt to enter the mysql client, you have to add '''-p''' to make it challenge you for a password.&lt;br /&gt;
&lt;br /&gt;
'''Testing the installation'''&lt;br /&gt;
&lt;br /&gt;
We're going to get into a little bit of mysql syntax here. For more in-depth documentation, you should visit http://www.mysql.com or google the particular command you're having trouble with, using 'mysql grant syntax' as the search argument for example.&lt;br /&gt;
&lt;br /&gt;
 oyabun# mysql -p&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 31 to server version: 4.0.20&lt;br /&gt;
 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.&lt;br /&gt;
 mysql&amp;gt; create database testing;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; grant all on testing.* to 'user'@'localhost' identified by 'password';&lt;br /&gt;
 Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, you'll notice that all commands in the mysql client have to be terminated with ''';'''. If you forget and hit enter, you can just enter a lone ''';''' on a new line, and it will work provided the syntax of the command is correct.&lt;br /&gt;
&lt;br /&gt;
If both of those commands worked, then you just created a database named testing, and assigned full read/write priviledges to a user name 'user' with password 'password'.&lt;br /&gt;
&lt;br /&gt;
To delete a database, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; drop database testing;&lt;br /&gt;
 Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
That's it! You now have MySQL added to your machine, and you begin using php scripts or other MySQL tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category : Ports and Packages]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/MySQL,_Simple_Installation</id>
		<title>MySQL, Simple Installation</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/MySQL,_Simple_Installation"/>
				<updated>2004-09-02T20:26:58Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article will walk you through a simple installation of MySQL server, for usage via localhost in a local environment. (For example, for use in conjunction with Apache and PHP in a web-database related role, with no direct foreign connections to the MySQL server. All connections will be made internally.)&lt;br /&gt;
&lt;br /&gt;
See also:  [[MySQL]]&lt;br /&gt;
&lt;br /&gt;
'''Overview'''&lt;br /&gt;
&lt;br /&gt;
For this article, I'll be installing MySQL Server and Client, version 4.0.x (current in my ports tree.) The steps listed here will very likely work for newer versions available when you read this, but you may want to google to make sure.&lt;br /&gt;
&lt;br /&gt;
'''Install MySQL from ports'''&lt;br /&gt;
&lt;br /&gt;
First, we need to install the port. Make sure you're logged in as [[root]], and as always, update your ports tree with [[CVSUP]] before doing any major software installations.&lt;br /&gt;
&lt;br /&gt;
 oyabun# cd /usr/ports/databases/mysql40-server/&lt;br /&gt;
 oyabun# make install clean BUILD_OPTIMIZED=YES BUILD_STATIC=yes&lt;br /&gt;
 &lt;br /&gt;
This will download the source for MySQL Server, compile it optimized for your particular system, and also install mysql40-client, as it is a dependency. This process will very likely take a decent amount of time. ''Oyabun'' is my BSD server, and it's an AthlonXP 2000+, compiling MySQL from source usually takes about 15 - 25 minutes. (Guesstimating, I've never actually timed it.)&lt;br /&gt;
&lt;br /&gt;
When the installation is done, you'll see something very similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre name=&amp;quot;I used pre on this because this is a lot of text.&amp;quot;&amp;gt;&lt;br /&gt;
To start mysqld at boot time you have to copy support-files/mysql.server&lt;br /&gt;
to the right place for your system&lt;br /&gt;
&lt;br /&gt;
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !&lt;br /&gt;
To do so, start the server, then issue the following commands:&lt;br /&gt;
/usr/local/bin/mysqladmin -u root password 'new-password'&lt;br /&gt;
/usr/local/bin/mysqladmin -u root -h oyabun.n3s.local password 'new-password'&lt;br /&gt;
See the manual for more instructions.&lt;br /&gt;
&lt;br /&gt;
You can start the MySQL daemon with:&lt;br /&gt;
cd /usr/local ; /usr/local/bin/mysqld_safe &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:&lt;br /&gt;
cd sql-bench ; perl run-all-tests&lt;br /&gt;
&lt;br /&gt;
Please report any problems with the /usr/local/bin/mysqlbug script!&lt;br /&gt;
&lt;br /&gt;
The latest information about MySQL is available on the web at&lt;br /&gt;
http://www.mysql.com&lt;br /&gt;
Support MySQL by buying support/licenses at https://order.mysql.com&lt;br /&gt;
mysql:*:88:&lt;br /&gt;
You already have a group &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
mysql:*:88:88::0:0:MySQL Daemon:/var/db/mysql:/sbin/nologin&lt;br /&gt;
You already have a user &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
Changed home directory of &amp;quot;mysql&amp;quot; to &amp;quot;/var/db/mysql&amp;quot;&lt;br /&gt;
===&amp;gt;   Compressing manual pages for mysql-server-4.1.3&lt;br /&gt;
===&amp;gt;   Registering installation for mysql-server-4.1.3&lt;br /&gt;
===&amp;gt; SECURITY REPORT:&lt;br /&gt;
      This port has installed the following files which may act as network&lt;br /&gt;
      servers and may therefore pose a remote security risk to the system.&lt;br /&gt;
/usr/local/bin/ndb_drop_table&lt;br /&gt;
/usr/local/bin/ndb_delete_all&lt;br /&gt;
/usr/local/libexec/ndbd&lt;br /&gt;
/usr/local/bin/ndb_restore&lt;br /&gt;
/usr/local/bin/ndb_cpcd&lt;br /&gt;
/usr/local/libexec/ndb_mgmd&lt;br /&gt;
/usr/local/bin/ndb_select_all&lt;br /&gt;
/usr/local/bin/ndb_drop_index&lt;br /&gt;
/usr/local/bin/ndb_desc&lt;br /&gt;
/usr/local/lib/mysql/libndbclient.so.0&lt;br /&gt;
/usr/local/bin/ndb_show_tables&lt;br /&gt;
/usr/local/bin/ndb_waiter&lt;br /&gt;
/usr/local/bin/ndb_select_count&lt;br /&gt;
&lt;br /&gt;
      This port has installed the following startup scripts which may cause&lt;br /&gt;
      these network services to be started at boot time.&lt;br /&gt;
/usr/local/etc/rc.d/mysql-server.sh&lt;br /&gt;
&lt;br /&gt;
      If there are vulnerabilities in these programs there may be a security&lt;br /&gt;
      risk to the system. FreeBSD makes no guarantee about the security of&lt;br /&gt;
      ports included in the Ports Collection. Please type 'make deinstall'&lt;br /&gt;
      to deinstall the port if this is a concern.&lt;br /&gt;
&lt;br /&gt;
      For more information, and contact details about the security&lt;br /&gt;
      status of this software, see the following webpage:&lt;br /&gt;
http://www.mysql.com/&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-client-4.0.20&lt;br /&gt;
===&amp;gt;  Cleaning for libtool-1.5.8&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-server-4.0.20&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The really important parts are those about '''setting a MySQL password for your root account''', and the addition of a mysql group and a mysql user to your base system. You'll notice in my example that I already had a mysql user and group, but you likely won't.&lt;br /&gt;
&lt;br /&gt;
You'll also notice that the install added a startup script to /usr/local/etc/rc.d/, meaning MySQL server will start with every boot now. Let's move on to configuration and finish up this installation.&lt;br /&gt;
&lt;br /&gt;
'''Configuration'''&lt;br /&gt;
&lt;br /&gt;
MySQL is now installed, so let's get it ready for use.&lt;br /&gt;
&lt;br /&gt;
First, we have to start the server. The following assumes you logged in as a regular account, then used [[su]] to become [[root]].&lt;br /&gt;
&lt;br /&gt;
 oyabun# exit&lt;br /&gt;
 exit&lt;br /&gt;
 &amp;gt; su&lt;br /&gt;
 Password:&lt;br /&gt;
 oyabun# /usr/local/etc/rc.d/mysql-server.sh start&lt;br /&gt;
 mysqloyabun#&lt;br /&gt;
 oyabun#&lt;br /&gt;
&lt;br /&gt;
It may not be necessary, but I usually exit my root shell and re-login in after major software installations, so the system can find necessary scripts and programs in the path, which the new software may have updated. It costs nothing but a few seconds. Anyway: You'll notice mysql notified you that it started by changing the next shell prompt to &amp;quot;''mysqloyabun#'', where ''oyabun'' = the name of your server.&lt;br /&gt;
&lt;br /&gt;
Now, let's set that root password.&lt;br /&gt;
&lt;br /&gt;
 oyabun# /usr/local/bin/mysqladmin -u root password 'new-password'&lt;br /&gt;
 oyabun# /usr/local/bin/mysqladmin -u root -h oyabun.n3s.local password 'new-password'&lt;br /&gt;
&lt;br /&gt;
Change 'new-password' to whatever you really want use as your password. In the second line, change '''oyabun.n3s.local''' to whatever your current domain qualification is for your server. The MySQL install will tell you - remember, I pulled this example out of the output at end-of-install. If you're copying and pasting this as you go into your putty session or other ssh client, WATCH OUT FOR LINEBREAKS. If you copy the carriage return as well, you really did just set your password to 'new-password.' (Hey, don't laugh, it just happened to me.)&lt;br /&gt;
&lt;br /&gt;
If that happens, you'll have to issue a slightly different command to change a current password.&lt;br /&gt;
&lt;br /&gt;
 oyabun# /usr/local/bin/mysqladmin -p password 'the-REAL-password'&lt;br /&gt;
 Enter password:&lt;br /&gt;
 oyabun#&lt;br /&gt;
&lt;br /&gt;
Since you're logged in as root, this will change your password '''after''' you enter the current password, which if you screwed up like I did, is/was 'new-password'. Crisis averted.&lt;br /&gt;
&lt;br /&gt;
'''Note''': From now on, you can't type '''mysql''' at a command prompt to enter the mysql client, you have to add '''-p''' to make it challenge you for a password.&lt;br /&gt;
&lt;br /&gt;
'''Testing the installation'''&lt;br /&gt;
&lt;br /&gt;
We're going to get into a little bit of mysql syntax here. For more in-depth documentation, you should visit http://www.mysql.com or google the particular command you're having trouble with, using 'mysql grant syntax' as the search argument for example.&lt;br /&gt;
&lt;br /&gt;
 oyabun# mysql -p&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 31 to server version: 4.0.20&lt;br /&gt;
 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.&lt;br /&gt;
 mysql&amp;gt; create database testing;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; grant all on testing.* to 'user'@'localhost' identified by 'password';&lt;br /&gt;
 Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, you'll notice that all commands in the mysql client have to be terminated with ''';'''. If you forget and hit enter, you can just enter a lone ''';''' on a new line, and it will work provided the syntax of the command is correct.&lt;br /&gt;
&lt;br /&gt;
If both of those commands worked, then you just created a database named testing, and assigned full read/write priviledges to a user name 'user' with password 'password'.&lt;br /&gt;
&lt;br /&gt;
To delete a database, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; drop database testing;&lt;br /&gt;
 Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
That's it! You now have MySQL added to your machine, and you begin using php scripts or other MySQL tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category : Ports and Packages]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/MySQL,_Simple_Installation</id>
		<title>MySQL, Simple Installation</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/MySQL,_Simple_Installation"/>
				<updated>2004-09-01T17:37:48Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article will walk you through a simple installation of MySQL server, for usage via localhost in a local environment. (For example, for use in conjunction with Apache and PHP in a web-database related role, with no direct foreign connections to the MySQL server. All connections will be made internally.)&lt;br /&gt;
&lt;br /&gt;
See also:  [[MySQL]]&lt;br /&gt;
&lt;br /&gt;
'''Overview'''&lt;br /&gt;
&lt;br /&gt;
For this article, I'll be installing MySQL Server and Client, version 4.1.x (current in my ports tree.) The steps listed here will very likely work for newer versions available when you read this, but you may want to google to make sure.&lt;br /&gt;
&lt;br /&gt;
'''Install MySQL from ports'''&lt;br /&gt;
&lt;br /&gt;
First, we need to install the port. Make sure you're logged in as [[root]], and as always, update your ports tree with [[CVSUP]] before doing any major software installations.&lt;br /&gt;
&lt;br /&gt;
 oyabun# cd /usr/ports/databases/mysql41-server/&lt;br /&gt;
 oyabun# make install clean BUILD_OPTIMIZED=YES BUILD_STATIC=yes&lt;br /&gt;
 &lt;br /&gt;
This will download the source for MySQL Server, compile it optimized for your particular system, and also install mysql41-client, as it is a dependency. This process will very likely take a decent amount of time. ''Oyabun'' is my BSD server, and it's an AthlonXP 2000+, compiling MySQL from source usually takes about 15 - 25 minutes. (Guesstimating, I've never actually timed it.)&lt;br /&gt;
&lt;br /&gt;
When the installation is done, you'll see something very similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre name=&amp;quot;I used pre on this because this is a lot of text.&amp;quot;&amp;gt;&lt;br /&gt;
To start mysqld at boot time you have to copy support-files/mysql.server&lt;br /&gt;
to the right place for your system&lt;br /&gt;
&lt;br /&gt;
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !&lt;br /&gt;
To do so, start the server, then issue the following commands:&lt;br /&gt;
/usr/local/bin/mysqladmin -u root password 'new-password'&lt;br /&gt;
/usr/local/bin/mysqladmin -u root -h oyabun.n3s.local password 'new-password'&lt;br /&gt;
See the manual for more instructions.&lt;br /&gt;
&lt;br /&gt;
You can start the MySQL daemon with:&lt;br /&gt;
cd /usr/local ; /usr/local/bin/mysqld_safe &amp;amp;&lt;br /&gt;
&lt;br /&gt;
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:&lt;br /&gt;
cd sql-bench ; perl run-all-tests&lt;br /&gt;
&lt;br /&gt;
Please report any problems with the /usr/local/bin/mysqlbug script!&lt;br /&gt;
&lt;br /&gt;
The latest information about MySQL is available on the web at&lt;br /&gt;
http://www.mysql.com&lt;br /&gt;
Support MySQL by buying support/licenses at https://order.mysql.com&lt;br /&gt;
mysql:*:88:&lt;br /&gt;
You already have a group &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
mysql:*:88:88::0:0:MySQL Daemon:/var/db/mysql:/sbin/nologin&lt;br /&gt;
You already have a user &amp;quot;mysql&amp;quot;, so I will use it.&lt;br /&gt;
Changed home directory of &amp;quot;mysql&amp;quot; to &amp;quot;/var/db/mysql&amp;quot;&lt;br /&gt;
===&amp;gt;   Compressing manual pages for mysql-server-4.1.3&lt;br /&gt;
===&amp;gt;   Registering installation for mysql-server-4.1.3&lt;br /&gt;
===&amp;gt; SECURITY REPORT:&lt;br /&gt;
      This port has installed the following files which may act as network&lt;br /&gt;
      servers and may therefore pose a remote security risk to the system.&lt;br /&gt;
/usr/local/bin/ndb_drop_table&lt;br /&gt;
/usr/local/bin/ndb_delete_all&lt;br /&gt;
/usr/local/libexec/ndbd&lt;br /&gt;
/usr/local/bin/ndb_restore&lt;br /&gt;
/usr/local/bin/ndb_cpcd&lt;br /&gt;
/usr/local/libexec/ndb_mgmd&lt;br /&gt;
/usr/local/bin/ndb_select_all&lt;br /&gt;
/usr/local/bin/ndb_drop_index&lt;br /&gt;
/usr/local/bin/ndb_desc&lt;br /&gt;
/usr/local/lib/mysql/libndbclient.so.0&lt;br /&gt;
/usr/local/bin/ndb_show_tables&lt;br /&gt;
/usr/local/bin/ndb_waiter&lt;br /&gt;
/usr/local/bin/ndb_select_count&lt;br /&gt;
&lt;br /&gt;
      This port has installed the following startup scripts which may cause&lt;br /&gt;
      these network services to be started at boot time.&lt;br /&gt;
/usr/local/etc/rc.d/mysql-server.sh&lt;br /&gt;
&lt;br /&gt;
      If there are vulnerabilities in these programs there may be a security&lt;br /&gt;
      risk to the system. FreeBSD makes no guarantee about the security of&lt;br /&gt;
      ports included in the Ports Collection. Please type 'make deinstall'&lt;br /&gt;
      to deinstall the port if this is a concern.&lt;br /&gt;
&lt;br /&gt;
      For more information, and contact details about the security&lt;br /&gt;
      status of this software, see the following webpage:&lt;br /&gt;
http://www.mysql.com/&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-client-4.1.3&lt;br /&gt;
===&amp;gt;  Cleaning for libtool-1.5.8&lt;br /&gt;
===&amp;gt;  Cleaning for mysql-server-4.1.3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The really important parts are those about '''setting a MySQL password for your root account''', and the addition of a mysql group and a mysql user to your base system. You'll notice in my example that I already had a mysql user and group, but you likely won't.&lt;br /&gt;
&lt;br /&gt;
You'll also notice that the install added a startup script to /usr/local/etc/rc.d/, meaning MySQL server will start with every boot now. Let's move on to configuration and finish up this installation.&lt;br /&gt;
&lt;br /&gt;
'''Configuration'''&lt;br /&gt;
&lt;br /&gt;
MySQL is now installed, so let's get it ready for use.&lt;br /&gt;
&lt;br /&gt;
First, we have to start the server. The following assumes you logged in as a regular account, then used [[su]] to become [[root]].&lt;br /&gt;
&lt;br /&gt;
 oyabun# exit&lt;br /&gt;
 exit&lt;br /&gt;
 &amp;gt; su&lt;br /&gt;
 Password:&lt;br /&gt;
 oyabun# /usr/local/etc/rc.d/mysql-server.sh start&lt;br /&gt;
 mysqloyabun#&lt;br /&gt;
 oyabun#&lt;br /&gt;
&lt;br /&gt;
It may not be necessary, but I usually exit my root shell and re-login in after major software installations, so the system can find necessary scripts and programs in the path, which the new software may have updated. It costs nothing but a few seconds. Anyway: You'll notice mysql notified you that it started by changing the next shell prompt to &amp;quot;''mysqloyabun#'', where ''oyabun'' = the name of your server.&lt;br /&gt;
&lt;br /&gt;
Now, let's set that root password.&lt;br /&gt;
&lt;br /&gt;
 oyabun# /usr/local/bin/mysqladmin -u root password 'new-password'&lt;br /&gt;
 oyabun# /usr/local/bin/mysqladmin -u root -h oyabun.n3s.local password 'new-password'&lt;br /&gt;
&lt;br /&gt;
Change 'new-password' to whatever you really want use as your password. In the second line, change '''oyabun.n3s.local''' to whatever your current domain qualification is for your server. The MySQL install will tell you - remember, I pulled this example out of the output at end-of-install. If you're copying and pasting this as you go into your putty session or other ssh client, WATCH OUT FOR LINEBREAKS. If you copy the carriage return as well, you really did just set your password to 'new-password.' (Hey, don't laugh, it just happened to me.)&lt;br /&gt;
&lt;br /&gt;
If that happens, you'll have to issue a slightly different command to change a current password.&lt;br /&gt;
&lt;br /&gt;
 oyabun# /usr/local/bin/mysqladmin -p password 'the-REAL-password'&lt;br /&gt;
 Enter password:&lt;br /&gt;
 oyabun#&lt;br /&gt;
&lt;br /&gt;
Since you're logged in as root, this will change your password '''after''' you enter the current password, which if you screwed up like I did, is/was 'new-password'. Crisis averted.&lt;br /&gt;
&lt;br /&gt;
'''Note''': From now on, you can't type '''mysql''' at a command prompt to enter the mysql client, you have to add '''-p''' to make it challenge you for a password.&lt;br /&gt;
&lt;br /&gt;
'''Testing the installation'''&lt;br /&gt;
&lt;br /&gt;
We're going to get into a little bit of mysql syntax here. For more in-depth documentation, you should visit http://www.mysql.com or google the particular command you're having trouble with, using 'mysql grant syntax' as the search argument for example.&lt;br /&gt;
&lt;br /&gt;
 oyabun# mysql -p&lt;br /&gt;
 Enter password:&lt;br /&gt;
 Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;br /&gt;
 Your MySQL connection id is 31 to server version: 4.1.3-beta&lt;br /&gt;
 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.&lt;br /&gt;
 mysql&amp;gt; create database testing;&lt;br /&gt;
 Query OK, 1 row affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; grant all on testing.* to 'user'@'localhost' identified by 'password';&lt;br /&gt;
 Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, you'll notice that all commands in the mysql client have to be terminated with ''';'''. If you forget and hit enter, you can just enter a lone ''';''' on a new line, and it will work provided the syntax of the command is correct.&lt;br /&gt;
&lt;br /&gt;
If both of those commands worked, then you just created a database named testing, and assigned full read/write priviledges to a user name 'user' with password 'password'.&lt;br /&gt;
&lt;br /&gt;
To delete a database, issue the following command:&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; drop database testing;&lt;br /&gt;
 Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
That's it! You now have MySQL added to your machine, and you begin using php scripts or other MySQL tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category : Ports and Packages]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/MySQL</id>
		<title>MySQL</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/MySQL"/>
				<updated>2004-09-01T16:38:25Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article is the main portal for all things MySQL at The BSD Wiki. &lt;br /&gt;
&lt;br /&gt;
See also:  [[MySQL_Simple_Installation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category : Ports and Packages]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/MySQL</id>
		<title>MySQL</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/MySQL"/>
				<updated>2004-09-01T16:38:13Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article is the main portal for all things MySQL at The BSD Wiki. &lt;br /&gt;
&lt;br /&gt;
See also:  MySQL_Simple_Installation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category : Ports and Packages]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Talk:ATTRIB</id>
		<title>Talk:ATTRIB</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Talk:ATTRIB"/>
				<updated>2004-08-25T19:00:54Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Rename this &amp;quot;Attrib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
oops. --[[User:Jimbo|Jimbo]] 18:58, 25 Aug 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
PWN3D &amp;lt;3&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/DIR</id>
		<title>DIR</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/DIR"/>
				<updated>2004-08-25T18:58:49Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Under FreeBSD and other unix-like OSes, the equivalent command is [[ls]].&lt;br /&gt;
&lt;br /&gt;
[[ls]] is best combined with [[grep]] if you plan on doing any filtering.&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
dir *.txt&lt;br /&gt;
&lt;br /&gt;
Unix:&lt;br /&gt;
&lt;br /&gt;
ls | grep .txt&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
dir boogy*.*&lt;br /&gt;
&lt;br /&gt;
Unix: &lt;br /&gt;
&lt;br /&gt;
ls | grep boogy&lt;br /&gt;
&lt;br /&gt;
[[Category:Windows Equivalents]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Talk:ATTRIB</id>
		<title>Talk:ATTRIB</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Talk:ATTRIB"/>
				<updated>2004-08-25T18:56:24Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Rename this &amp;quot;Attrib&amp;quot;&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/User:Dave</id>
		<title>User:Dave</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/User:Dave"/>
				<updated>2004-08-25T18:54:51Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I do some unix, linux and BSD stuff for a university in South Florida.&lt;br /&gt;
&lt;br /&gt;
I have broccoli in my socks. Does that make you randy?&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Portupgrade</id>
		<title>Portupgrade</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Portupgrade"/>
				<updated>2004-08-25T05:34:02Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''portupgrade and you'''&lt;br /&gt;
&lt;br /&gt;
portupgrade is a small collection of tools that goes hand in hand with [[cvsup]]. Portupgrade does what it says - upgrades your ports - but it actually means your ''installed'' ports, even packages that were installed as part of the base system. Portupgrade includes two important programs - ''portupgrade'', and [[portversion]]. Between them and cvsup, you'll have the ability to keep all installed software on your system up to date, so long as it exists in the ports tree.&lt;br /&gt;
&lt;br /&gt;
See also - [[cvsup]] - [[Update_the_ports_tree]] - [[portversion]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installing the Portupgrade suite ==&lt;br /&gt;
&lt;br /&gt;
Installation is very simple:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; su&lt;br /&gt;
Enter password:&lt;br /&gt;
oyabun# cd /usr/ports/sysutils/portupgrade&lt;br /&gt;
oyabun# make install clean&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it's done, you'll have to ''exit and re-enter'' your session as [[root]] to use it without typing full pathnames. This assumes you used [[su]] to become root from a different account. If you logged in from the physical console as root, you can exit and re-login, or you can simply su to a new shell. (Lazy!)&lt;br /&gt;
&lt;br /&gt;
== Using portupgrade and portversion ==&lt;br /&gt;
&lt;br /&gt;
Now that that's done, you need to update your ports database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# portsdb -Uu&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will likely take a while.&lt;br /&gt;
&lt;br /&gt;
Now you can use [[portversion]] to see a list of installed programs that are out of date like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# portversion | grep '&amp;lt;'&lt;br /&gt;
expat                       &amp;lt;&lt;br /&gt;
ezm3                        &amp;lt;&lt;br /&gt;
fontconfig                  &amp;lt;&lt;br /&gt;
freetype2                   &amp;lt;&lt;br /&gt;
imake                       &amp;lt;&lt;br /&gt;
libnet-devel                &amp;lt;&lt;br /&gt;
libtool                     &amp;lt;&lt;br /&gt;
oyabun#&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a possible example of the output you'd recieve from portversion. Issuing a portversion command without the ''| grep '&amp;lt;''' would produce a list of ALL installed packages on your machine, with '''&amp;lt;''' for &amp;quot;out of date&amp;quot;, '''=''' for &amp;quot;current&amp;quot;, and '''&amp;gt;''' for &amp;quot;newer&amp;quot;. How can you get &amp;quot;newer&amp;quot; than what's in the ports tree? This happens if you haven't issued a '''portsdb -Uu''' command to update your ports database. The database contains entries pointing to older versions, while the ports tree itself contains newer versions, leading to situations where portversion reports &amp;quot;&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now, to upgrade one of these packages, do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# portupgrade imake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Portupgrade will upgrade the port with the newer version available in the ports tree, and also take care of any dependencies the new version may have - if it needed ANOTHER installed port upgraded to a newer version, for example.&lt;br /&gt;
&lt;br /&gt;
That's it. You'll have to repeat these steps (portversion, then portupgrade on one of the results) a few times to complete update your software, but all in all it's fairly simple and straightforward.&lt;br /&gt;
&lt;br /&gt;
Note - you may sometimes be prompted to run '''pkgdb -F''' to fix inconsistencies with listed dependencies within programs when you issue portversion commands, after upgrading ports. Just do it ('''pkgdb -F''', that is) and it will take care of the problem, allowing you to issue the portversion command.&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/User:Pete</id>
		<title>User:Pete</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/User:Pete"/>
				<updated>2004-08-25T05:31:55Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Portupgrade</id>
		<title>Portupgrade</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Portupgrade"/>
				<updated>2004-08-25T04:14:45Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''portupgrade and you'''&lt;br /&gt;
&lt;br /&gt;
portupgrade is a small collection of tools that goes hand in hand with [[cvsup]]. Portupgrade does what it says - upgrades your ports - but it actually means your ''installed'' ports, even packages that were installed as part of the base system. Portupgrade includes two important programs - ''portupgrade'', and [[portversion]]. Between them and cvsup, you'll have the ability to keep all installed software on your system up to date, so long as it exists in the ports tree.&lt;br /&gt;
&lt;br /&gt;
See also - [[cvsup]] - [[Update_the_ports_tree]] - [[portversion]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installing the Portupgrade suite ==&lt;br /&gt;
&lt;br /&gt;
Installation is very simple:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; su&lt;br /&gt;
Enter password:&lt;br /&gt;
oyabun# cd /usr/ports/sysutils/portupgrade&lt;br /&gt;
oyabun# make install clean&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it's done, you'll have to ''exit and re-enter'' your session as [[superuser]] to use it without typing full pathnames. This assumes you used [[su]] to become root from a different account. If you logged in from the physical console as root, you can exit and re-login, or you can simply su to a new shell. (Lazy!)&lt;br /&gt;
&lt;br /&gt;
== Using portupgrade and portversion ==&lt;br /&gt;
&lt;br /&gt;
Now that that's done, you need to update your ports database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# portsdb -Uu&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will likely take a while.&lt;br /&gt;
&lt;br /&gt;
Now you can use [[portversion]] to see a list of installed programs that are out of date like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# portversion | grep '&amp;lt;'&lt;br /&gt;
expat                       &amp;lt;&lt;br /&gt;
ezm3                        &amp;lt;&lt;br /&gt;
fontconfig                  &amp;lt;&lt;br /&gt;
freetype2                   &amp;lt;&lt;br /&gt;
imake                       &amp;lt;&lt;br /&gt;
libnet-devel                &amp;lt;&lt;br /&gt;
libtool                     &amp;lt;&lt;br /&gt;
oyabun#&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a possible example of the output you'd recieve from portversion. Issuing a portversion command without the ''| grep '&amp;lt;''' would produce a list of ALL installed packages on your machine, with '''&amp;lt;''' for &amp;quot;out of date&amp;quot;, '''=''' for &amp;quot;current&amp;quot;, and '''&amp;gt;''' for &amp;quot;newer&amp;quot;. How can you get &amp;quot;newer&amp;quot; than what's in the ports tree? I don't know exactly, but it will happen to you, and someone who reads this needs to explain it.&lt;br /&gt;
&lt;br /&gt;
Now, to upgrade one of these packages, do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# portupgrade imake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Portupgrade will upgrade the port with the newer version available in the ports tree, and also take care of any dependencies the new version may have - if it needed ANOTHER installed port upgraded to a newer version, for example.&lt;br /&gt;
&lt;br /&gt;
That's it. You'll have to repeat these steps (portversion, then portupgrade on one of the results) a few times to complete update your software, but all in all it's fairly simple and straightforward.&lt;br /&gt;
&lt;br /&gt;
Note - you may sometimes be prompted to run '''pkgdb -F''' to fix inconsistencies with listed dependencies within programs when you issue portversion commands, after upgrading ports. Just do it (''oyabun# pkgdb -F'') and it will take care of the problem, allowing you to issue the portversion command.&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Portupgrade</id>
		<title>Portupgrade</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Portupgrade"/>
				<updated>2004-08-25T03:56:09Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''portupgrade and you'''&lt;br /&gt;
&lt;br /&gt;
portupgrade is a small collection of tools that goes hand in hand with [[cvsup]]. Portupgrade does what it says - upgrades your ports - but it actually means your ''installed'' ports, even packages that were installed as part of the base system. Portupgrade includes two important programs - ''portupgrade'', and [[portversion]]. Between them and cvsup, you'll have the ability to keep all installed software on your system up to date, so long as it exists in the ports tree.&lt;br /&gt;
&lt;br /&gt;
See also - [[cvsup]] - [[Update_the_ports_tree]] - [[portversion]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installing the Portupgrade suite ==&lt;br /&gt;
&lt;br /&gt;
Installation is very simple:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; su&lt;br /&gt;
Enter password:&lt;br /&gt;
oyabun# cd /usr/ports/sysutils/portupgrade&lt;br /&gt;
oyabun# make install clean&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it's done, you'll have to ''exit and re-enter'' your session as [[superuser]] to use it without typing full pathnames. This assumes you used [[su]] to become root from a different account. If you logged in from the physical console as root, you can exit and re-login, or you can simply su to a new shell. (Lazy!)&lt;br /&gt;
&lt;br /&gt;
== Using portupgrade and portversion ==&lt;br /&gt;
&lt;br /&gt;
Now that that's done, you can use [[portversion]] to see a list of installed programs that are out of date like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# portversion | grep '&amp;lt;'&lt;br /&gt;
expat                       &amp;lt;&lt;br /&gt;
ezm3                        &amp;lt;&lt;br /&gt;
fontconfig                  &amp;lt;&lt;br /&gt;
freetype2                   &amp;lt;&lt;br /&gt;
imake                       &amp;lt;&lt;br /&gt;
libnet-devel                &amp;lt;&lt;br /&gt;
libtool                     &amp;lt;&lt;br /&gt;
oyabun#&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a possible example of the output you'd recieve from portversion. Issuing a portversion command without the ''| grep '&amp;lt;''' would produce a list of ALL installed packages on your machine, with '''&amp;lt;''' for &amp;quot;out of date&amp;quot;, '''=''' for &amp;quot;current&amp;quot;, and '''&amp;gt;''' for &amp;quot;newer&amp;quot;. How can you get &amp;quot;newer&amp;quot; than what's in the ports tree? I don't know exactly, but it will happen to you, and someone who reads this needs to explain it.&lt;br /&gt;
&lt;br /&gt;
Now, to upgrade one of these packages, do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# portupgrade imake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Portupgrade will upgrade the port with the newer version available in the ports tree, and also take care of any dependencies the new version may have - if it needed ANOTHER installed port upgraded to a newer version, for example.&lt;br /&gt;
&lt;br /&gt;
That's it. You'll have to repeat these steps (portversion, then portupgrade on one of the results) a few times to complete update your software, but all in all it's fairly simple and straightforward.&lt;br /&gt;
&lt;br /&gt;
Note - you may sometimes be prompted to run '''pkgdb -F''' to fix inconsistencies with listed dependencies within programs when you issue portversion commands, after upgrading ports. Just do it (''oyabun# pkgdb -F'') and it will take care of the problem, allowing you to issue the portversion command.&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Portupgrade</id>
		<title>Portupgrade</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Portupgrade"/>
				<updated>2004-08-25T03:54:27Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''portupgrade and you'''&lt;br /&gt;
&lt;br /&gt;
portupgrade is a small collection of tools that goes hand in hand with [[cvsup]]. Portupgrade does what it says - upgrades your ports - but it actually means your ''installed'' ports, even packages that were installed as part of the base system. Portupgrade includes two important programs - ''portupgrade'', and [[portversion]]. Between them and cvsup, you'll have the ability to keep all installed software on your system up to date, so long as it exists in the ports tree.&lt;br /&gt;
&lt;br /&gt;
See also - [[cvsup]] - [[Update_the_ports_tree]] - [[portversion]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installing the Portupgrade suite ==&lt;br /&gt;
&lt;br /&gt;
Installation is very simple:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; su&lt;br /&gt;
Enter password:&lt;br /&gt;
oyabun# cd /usr/ports/sysutils/portupgrade&lt;br /&gt;
oyabun# make install clean&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it's done, you'll have to ''exit and re-enter'' your session as [[superuser]] to use it without typing full pathnames. This assumes you used [[su]] to become root from a different account. If you logged in from the physical console as root, you can exit and re-login, or you can simply su to a new shell. (Lazy!)&lt;br /&gt;
&lt;br /&gt;
Now that that's done, you can use [[portversion]] to see a list of installed programs that are out of date like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# portversion | grep '&amp;lt;'&lt;br /&gt;
expat                       &amp;lt;&lt;br /&gt;
ezm3                        &amp;lt;&lt;br /&gt;
fontconfig                  &amp;lt;&lt;br /&gt;
freetype2                   &amp;lt;&lt;br /&gt;
imake                       &amp;lt;&lt;br /&gt;
libnet-devel                &amp;lt;&lt;br /&gt;
libtool                     &amp;lt;&lt;br /&gt;
oyabun#&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a possible example of the output you'd recieve from portversion. Issuing a portversion command without the ''| grep '&amp;lt;''' would produce a list of ALL installed packages on your machine, with '''&amp;lt;''' for &amp;quot;out of date&amp;quot;, '''=''' for &amp;quot;current&amp;quot;, and '''&amp;gt;''' for &amp;quot;newer&amp;quot;. How can you get &amp;quot;newer&amp;quot; than what's in the ports tree? I don't know exactly, but it will happen to you, and someone who reads this needs to explain it.&lt;br /&gt;
&lt;br /&gt;
Now, to upgrade one of these packages, do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# portupgrade imake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Portupgrade will upgrade the port with the newer version available in the ports tree, and also take care of any dependencies the new version may have - if it needed ANOTHER installed port upgraded to a newer version, for example.&lt;br /&gt;
&lt;br /&gt;
That's it. You'll have to repeat these steps (portversion, then portupgrade on one of the results) a few times to complete update your software, but all in all it's fairly simple and straightforward.&lt;br /&gt;
&lt;br /&gt;
Note - you may sometimes be prompted to run '''pkgdb -F''' to fix inconsistencies with listed dependencies within programs when you issue portversion commands, after upgrading ports. Just do it (''oyabun# pkgdb -F'') and it will take care of the problem, allowing you to issue the portversion command.&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Portupgrade</id>
		<title>Portupgrade</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Portupgrade"/>
				<updated>2004-08-25T03:40:41Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''portupgrade and you'''&lt;br /&gt;
&lt;br /&gt;
portupgrade is a small collection of tools that goes hand in hand with [[cvsup]]. Portupgrade does what it says - upgrades your ports - but it actually means your ''installed'' ports, even packages that were installed as part of the base system. Portupgrade includes two important programs - ''portupgrade'', and [[portversion]]. Between them and cvsup, you'll have the ability to keep all installed software on your system up to date, so long as it exists in the ports tree.&lt;br /&gt;
&lt;br /&gt;
See also - [[cvsup]] - [[Update_the_ports_tree]] - [[portversion]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installing the Portupgrade suite ==&lt;br /&gt;
&lt;br /&gt;
Installation is very simple:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt; su&lt;br /&gt;
Enter password:&lt;br /&gt;
oyabun# cd /usr/ports/sysutils/portupgrade&lt;br /&gt;
oyabun# make install clean&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it's done, you'll have to ''exit and re-enter'' your session as [[superuser]] to use it without typing full pathnames.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#oyabun exit&lt;br /&gt;
exit&lt;br /&gt;
&amp;gt; su&lt;br /&gt;
Enter password:&lt;br /&gt;
oyabun#&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Portupgrade</id>
		<title>Portupgrade</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Portupgrade"/>
				<updated>2004-08-25T03:33:30Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;placeholder&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Ports_Tree,_Updating</id>
		<title>Ports Tree, Updating</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Ports_Tree,_Updating"/>
				<updated>2004-08-25T03:24:18Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: /* It's updated. Now what? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When updating your FreeBSD system, you'll first want to sync your sources to the live sources offered via [[cvs]]. There is a port [[cvsup]] that you can use to update your other ports and source trees if you want.   If you hail from a Windows environment, you may think of keeping your sources updated as about the first half of the FreeBSD procedure which corresponds to [[Windows Update]].&lt;br /&gt;
&lt;br /&gt;
== Installing cvsup ==&lt;br /&gt;
&lt;br /&gt;
You'll need to have superuser access, so [[su]] to root and then go to your /usr/ports/net/ directory. There are two versions of cvsup available to you: cvsup and cvsup-without-gui (for systems that don't have or need the cvsup GUI). Pick the one that's most apporpriate for you and go into that directory and &amp;quot;make install clean&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    dave@samizdata:~% su -&lt;br /&gt;
    Password:&lt;br /&gt;
    samizdata# cd /usr/ports/net/&lt;br /&gt;
    samizdata# ls cvsup*&lt;br /&gt;
      cvsup:&lt;br /&gt;
      Makefile        distinfo        pkg-descr.nogui scripts&lt;br /&gt;
      README.html     pkg-descr       pkg-plist&lt;br /&gt;
      &lt;br /&gt;
      cvsup-mirror:&lt;br /&gt;
      Makefile        files           pkg-descr       pkg-plist&lt;br /&gt;
      README.html     pkg-deinstall   pkg-install     scripts&lt;br /&gt;
      &lt;br /&gt;
      cvsup-without-gui:&lt;br /&gt;
      Makefile        README.html&lt;br /&gt;
      &lt;br /&gt;
      cvsupit:&lt;br /&gt;
      Makefile        pkg-descr       pkg-plist&lt;br /&gt;
      README.html     pkg-install     pkg-req&lt;br /&gt;
          &lt;br /&gt;
    samizdata# cd cvsup-without-gui/&lt;br /&gt;
    samizdata# ls&lt;br /&gt;
     Makefile        README.html&lt;br /&gt;
    samizdata# make install clean&lt;br /&gt;
&lt;br /&gt;
so, let's say this is a headless server and I don't want X11 on it (which it is, and I don't) so:&lt;br /&gt;
&lt;br /&gt;
    samizdata# cd cvsup-without-gui/&lt;br /&gt;
    samizdata# make install clean&lt;br /&gt;
&lt;br /&gt;
and you'll get a ''lot'' of lines scrolling by; this is the program compiling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So it's installed already, how do I update the ports tree? ==&lt;br /&gt;
&lt;br /&gt;
Not so fast, speed racer. First you need to configure your ''supfile''. Go to /usr/share/examples/cvsup and look through the example files. The easiest way to make a ''supfile'' for your own personal use is to copy the one that want out of the examples and edit it. So from the command line, do a&lt;br /&gt;
    cp /usr/share/examples/ports-supfile /root/ports-supfile&lt;br /&gt;
and you have just copied the ''ports-supfile'' over to the /root/ directory (root's home directory). Now you'll need to edit that file: use your favorite [[text file editor]] such as [[vi]], [[ee]] (commonly aliased under FreeBSD as &amp;quot;edit&amp;quot;), [[joe]], [[nano]], [[pico]] or [[emacs]] to edit the ''ports-supfile''.&lt;br /&gt;
&lt;br /&gt;
In that file, you'll want to search for a string that says &amp;quot;CHANGE_THIS.freebsd.org&amp;quot; and change that &amp;quot;CHANGE_THIS&amp;quot; to the name of a real CVSup server. You can get a list of the servers at [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html#CVSUP-MIRRORS the list of CVSup mirrors on freebsd.org] but they all have the general form of '''cvsup(number).(country).freebsd.org''' such as cvsup1000000.qw.freebsd.org. It will almost always make the process much faster if you choose a mirror nearest you (or the country that you're in, rather.) Save your change to the file and exit your editor.&lt;br /&gt;
&lt;br /&gt;
Once that's done, we're ready to actually update the ports. As root, issue this command:&lt;br /&gt;
&lt;br /&gt;
     cvsup -g -L2 /root/ports-supfile&lt;br /&gt;
&lt;br /&gt;
In a perfect world, that will always work. The only times when it wont are when you don't have connectivity or the server that you're cvsup-ing against is not allowing connections. Strictly speaking, the ''-g'' command isn't necessary from a command line, since I installed cvsup-without-gui and the ''-g'' switch just makes sure that the GUI stuff in the regular CVSup program doesn't run. Since it isn't installed, I could have not given the switch and the command would have run just the same. The ''-L'' switch will give you error information, as well as a sort of progress-output -- the number next to the L (2 in this case) increases or decreases the verbosity of the output (0 is totally silent and 3 will give you everything you never wanted to read and more.) The last argument of the command is the actual ports-supfile that we made.&lt;br /&gt;
&lt;br /&gt;
== It's updated. Now what? ==&lt;br /&gt;
&lt;br /&gt;
Well, go into /usr/ports and find stuff you want to install!&lt;br /&gt;
&lt;br /&gt;
You may also want to install the very useful port management tool [[portupgrade]], which also installs a program called [[portversion]]. You can use portversion to check your existing installed programs against what is available in the ports tree, and then use [[portupgrade]] to upgrade your existing, old, installed software to the new versions found in the ports tree. Together, cvsup, portversion, and portupgrade allow you to make sure you have the latest version of ANY port in the ports tree, including packages installed with the base FreeBSD install that have been updated since your particular version was released.&lt;br /&gt;
&lt;br /&gt;
See also: [[http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html The FreeBSD Handbook's section on cvsup and updating]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/User:Dave</id>
		<title>User:Dave</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/User:Dave"/>
				<updated>2004-08-25T03:12:53Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I do some unix, linux and BSD stuff for a university in South Florida.&lt;br /&gt;
&lt;br /&gt;
I also do the stingray ho. Life is good.&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/User:Pete</id>
		<title>User:Pete</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/User:Pete"/>
				<updated>2004-08-25T03:12:02Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;STAY OUT OF MY MIND!!!111&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Apache2,_Installing</id>
		<title>Apache2, Installing</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Apache2,_Installing"/>
				<updated>2004-08-24T16:09:22Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Apache 2.0'''&lt;br /&gt;
&lt;br /&gt;
See also [[Apache]] - [[Apache2_Configuration]]&lt;br /&gt;
&lt;br /&gt;
We'll walk through the installation for Apache2. It's very simple to install - in earlier versions of Apache, you had to install either mods or different versions depending on whether you wanted to enable certain features (ssl, etc). With Apache2, they are incorporated into the main package, and enabled or disabled when you configure Apache. There are a few exceptions, but most everything you'll need to run a modern feature-rich webserver is included with the Apache2 port.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' As always, before installing any ports, update your ports tree with [[CVSUP]] if it has been a while.&lt;br /&gt;
&lt;br /&gt;
Let's get started:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt;su&lt;br /&gt;
Password: (enter root password)&lt;br /&gt;
oyabun# cd /usr/ports/www&lt;br /&gt;
oyabun# ls | grep apache&lt;br /&gt;
&lt;br /&gt;
apache-contrib&lt;br /&gt;
apache-forrest&lt;br /&gt;
apache-jserv&lt;br /&gt;
apache13&lt;br /&gt;
apache13+ipv6&lt;br /&gt;
apache13-fp&lt;br /&gt;
apache13-modperl&lt;br /&gt;
apache13-modssl&lt;br /&gt;
apache13-modssl+ipv6&lt;br /&gt;
apache13-ssl&lt;br /&gt;
&lt;br /&gt;
apache2&lt;br /&gt;
&lt;br /&gt;
mod_jk-apache2&lt;br /&gt;
mod_jk2-apache2&lt;br /&gt;
&lt;br /&gt;
oyabun# cd apache2&lt;br /&gt;
oyabun# make install clean&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, I changed to the [[superuser]], as we'll be installing software. I changed directory to the '''www''' section of the ports tree, and filtered a listing of that directories contents for all ports that contained the word 'apache' using [[grep]]. The one we want is '''apache2'''. I then changed to that directory, and issued the [[make]] command, with options '''install''' and '''clean''' specified, to install the software and clean up the makefiles when done.&lt;br /&gt;
&lt;br /&gt;
After a seconds, minutes, or hours, depending on whether your hardware is going to waste, reasonable, or a throwback to the early 90's, Apache2's installation will be completed, and you'll be faced with this note:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Available variables you add/set to /etc/rc.conf.&lt;br /&gt;
- apache2_enable (bool):      Set to &amp;quot;NO&amp;quot; by default.&lt;br /&gt;
                              Set it to &amp;quot;YES&amp;quot; to enable apache2.&lt;br /&gt;
- apache2ssl_enable (bool):   Set to &amp;quot;NO&amp;quot; by default.&lt;br /&gt;
                              Set it to &amp;quot;YES&amp;quot; to start apache with SSL&lt;br /&gt;
                              (if &amp;lt;IfDefined SSL&amp;gt; exists in httpd.conf).&lt;br /&gt;
- apache2limits_enable (bool):Set to &amp;quot;NO&amp;quot; by default.&lt;br /&gt;
                              Set it to yes to run `limits $limits_args`&lt;br /&gt;
                              just before apache starts.&lt;br /&gt;
- apache2_flags (str):        Set to &amp;quot;&amp;quot; by default.&lt;br /&gt;
                              Extra flags passed to start command.&lt;br /&gt;
- apache2limits_args (str):   Default to &amp;quot;-e -C daemon&amp;quot;&lt;br /&gt;
                              Arguments of pre-start limits run.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from this, ssl suport is included in Apache2, as opposed to Apache 1.3. I included this output because I have a bad habit of scrolling important stuff like this out of the buffer after installations, and it's nice to have it saved here. You don't need to worry about any of this until you configure Apache.&lt;br /&gt;
&lt;br /&gt;
So, Apache2 is now installed, you just need to actually set it up.&lt;br /&gt;
&lt;br /&gt;
Please visit [[Apache2_Configuration]] to actually configure and start your webserver.&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Apache</id>
		<title>Apache</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Apache"/>
				<updated>2004-08-24T16:01:44Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Apache]] is an (some would say ''the'') open source webserver; used more than any other webserver in the world.  It is available for easy installation from FreeBSD's [[:Category:Ports|ports tree]] in several different flavors, including pre-configured versions with and without [[OpenSSL]], [[mod_php]], [[frontpage extensions]], and lots more.&lt;br /&gt;
&lt;br /&gt;
For most purposes, Apache is absolutely the only webserver worth considering. In very high-volume (or tiny-hardware) contexts that need absolute maximum hardware efficiency at the expense of flexibility and configurability, however, you may wish to consider [[thttpd]], which is designed for absolute bare-bones simplicity for the delivery of static (no CGI, no SSI, no PHP, no nothing) HTML.&lt;br /&gt;
&lt;br /&gt;
See also - [[Apache2_Installation]] - [[Apache2_Configuration]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports and Packages]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Apache</id>
		<title>Apache</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Apache"/>
				<updated>2004-08-24T16:01:23Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Apache]] is an (some would say ''the'') open source webserver; used more than any other webserver in the world.  It is available for easy installation from FreeBSD's [[:Category:Ports|ports tree]] in several different flavors, including pre-configured versions with and without [[OpenSSL]], [[mod_php]], [[frontpage extensions]], and lots more.&lt;br /&gt;
&lt;br /&gt;
For most purposes, Apache is absolutely the only webserver worth considering. In very high-volume (or tiny-hardware) contexts that need absolute maximum hardware efficiency at the expense of flexibility and configurability, however, you may wish to consider [[thttpd]], which is designed for absolute bare-bones simplicity for the delivery of static (no CGI, no SSI, no PHP, no nothing) HTML.&lt;br /&gt;
&lt;br /&gt;
See also - [[Apache2_Installation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports and Packages]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Apache</id>
		<title>Apache</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Apache"/>
				<updated>2004-08-24T16:01:05Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Apache]] is an (some would say ''the'') open source webserver; used more than any other webserver in the world.  It is available for easy installation from FreeBSD's [[:Category:Ports|ports tree]] in several different flavors, including pre-configured versions with and without [[OpenSSL]], [[mod_php]], [[frontpage extensions]], and lots more.&lt;br /&gt;
&lt;br /&gt;
For most purposes, Apache is absolutely the only webserver worth considering. In very high-volume (or tiny-hardware) contexts that need absolute maximum hardware efficiency at the expense of flexibility and configurability, however, you may wish to consider [[thttpd]], which is designed for absolute bare-bones simplicity for the delivery of static (no CGI, no SSI, no PHP, no nothing) HTML.&lt;br /&gt;
&lt;br /&gt;
See also - [[Apache2]] - [[Apache2_Installation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports and Packages]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Apache2,_Installing</id>
		<title>Apache2, Installing</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Apache2,_Installing"/>
				<updated>2004-08-24T16:00:04Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Apache 2.0'''&lt;br /&gt;
&lt;br /&gt;
See also [[Apache]] - [[Apache2_Configuration]]&lt;br /&gt;
&lt;br /&gt;
We'll walk through the installation for Apache2. It's very simple to install - in earlier versions of Apache, you had to install either mods or different versions depending on whether you wanted to enable certain features (ssl, etc). With Apache2, they are incorporated into the main package, and enabled or disabled when you configure Apache. There are a few exceptions, but most everything you'll need to run a modern feature-rich webserver is included with the Apache2 port.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' As always, before installing any ports, update your ports tree with [[CVSUP]] if it has been a while.&lt;br /&gt;
&lt;br /&gt;
Let's get started:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt;su&lt;br /&gt;
Password: (enter root password)&lt;br /&gt;
oyabun# cd /usr/ports/www&lt;br /&gt;
oyabun# ls | grep apache&lt;br /&gt;
&lt;br /&gt;
apache-contrib&lt;br /&gt;
apache-forrest&lt;br /&gt;
apache-jserv&lt;br /&gt;
apache13&lt;br /&gt;
apache13+ipv6&lt;br /&gt;
apache13-fp&lt;br /&gt;
apache13-modperl&lt;br /&gt;
apache13-modssl&lt;br /&gt;
apache13-modssl+ipv6&lt;br /&gt;
apache13-ssl&lt;br /&gt;
&lt;br /&gt;
apache2&lt;br /&gt;
&lt;br /&gt;
mod_jk-apache2&lt;br /&gt;
mod_jk2-apache2&lt;br /&gt;
&lt;br /&gt;
oyabun# cd apache2&lt;br /&gt;
oyabun# make install clean&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, I changed to the [[superuser]], as we'll be installing software. I changed directory to the '''www''' section of the ports tree, and filtered a listing of that directories contents for all ports that contained the word 'apache' using [[grep]]. The one we want is '''apache2'''. I then changed to that directory, and issued the [[make]] command, with options '''install''' and '''clean''' specified, to install the software and clean up the makefiles when done.&lt;br /&gt;
&lt;br /&gt;
After a seconds, minutes, or hours, depending on whether your hardware is going to waste, reasonable, or a throwback to the early 90's, Apache2's installation will be completed, and you'll be faced with this note:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Available variables you add/set to /etc/rc.conf.&lt;br /&gt;
- apache2_enable (bool):      Set to &amp;quot;NO&amp;quot; by default.&lt;br /&gt;
                              Set it to &amp;quot;YES&amp;quot; to enable apache2.&lt;br /&gt;
- apache2ssl_enable (bool):   Set to &amp;quot;NO&amp;quot; by default.&lt;br /&gt;
                              Set it to &amp;quot;YES&amp;quot; to start apache with SSL&lt;br /&gt;
                              (if &amp;lt;IfDefined SSL&amp;gt; exists in httpd.conf).&lt;br /&gt;
- apache2limits_enable (bool):Set to &amp;quot;NO&amp;quot; by default.&lt;br /&gt;
                              Set it to yes to run `limits $limits_args`&lt;br /&gt;
                              just before apache starts.&lt;br /&gt;
- apache2_flags (str):        Set to &amp;quot;&amp;quot; by default.&lt;br /&gt;
                              Extra flags passed to start command.&lt;br /&gt;
- apache2limits_args (str):   Default to &amp;quot;-e -C daemon&amp;quot;&lt;br /&gt;
                              Arguments of pre-start limits run.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from this, ssl suport is included in Apache2, as opposed to Apache 1.3.&lt;br /&gt;
&lt;br /&gt;
So, Apache2 is now installed, you just need to actually set it up.&lt;br /&gt;
&lt;br /&gt;
Please visit [[Apache2_Configuration]] to actually configure and start your webserver.&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Samba,_Configuration</id>
		<title>Samba, Configuration</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Samba,_Configuration"/>
				<updated>2004-08-24T03:16:42Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Samba - Simple Configuration&lt;br /&gt;
&lt;br /&gt;
See also: [[Samba]] - [[Samba_Installation]]&lt;br /&gt;
&lt;br /&gt;
This article will walk you through a quick setup of Samba - creating directories to be shared, telling Samba to share those directories, how to limit access to different shares, and finally, how to set up a windows machine to have unfettered access to appropriate shares based on the currently logged in user. This article assumes you have a fresh, unconfigured install ([[Samba_Installation]]) of Samba to work with.&lt;br /&gt;
&lt;br /&gt;
== Setting up your shares on the machine ==&lt;br /&gt;
&lt;br /&gt;
First we need to decide what we're going to share, or at the very least, where the shares will actually reside. The simplest way to do this is to simply create a new directory in an easy to remember place, say, '''/usr'''. You can either share that new folder directly, or create several new directories within it, and limit access to each directory based on criteria I will make clear later in this article. For now, let's assume you have two sets of documents, public and private, and that you want to limit users' access to those documents based on who they are - they can either access both, or just public. So:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Oyabun# mkdir /usr/smbroot&lt;br /&gt;
Oyabun# mkdir /usr/smbroot/public&lt;br /&gt;
Oyabun# mkdir /usr/smbroot/private&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command creates the '''/usr/smbroot/''' directory, which will hold all of your shares. The second command creates the public directory, which '''all''' users will be able to access, and the third command creates the private directory, which only '''select''' users will be able to access.&lt;br /&gt;
&lt;br /&gt;
Now we need to set [[permissions]] on these directories. The [[permissions]] article goes into great detail about permissions, but a quick run through here will be fine. We'll use [[chown]] to change ownership of these two directories now. We'll assume you have or will set up two groups for your users, one group named '''public''', and another named '''private'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Oyabun# chown :public /usr/smbroot/public&lt;br /&gt;
Oyabun# chown :private /usr/smbroot/private&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the owning group of /usr/smbroot/public to :public. The second command assigns ownership of /usr/smbroot/private to the group :private.&lt;br /&gt;
&lt;br /&gt;
Now we need to set the actual [[permissions]] with [[chmod]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Oyabun# chmod 770 /usr/smbroot/public&lt;br /&gt;
Oyabun# chmod 770 /usr/smbroot/private&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same [[permissions]] for each directory, broken down thusly: The first '''7''' is the 'owner' flag, and 7 means read/write/execute. The owner can do all of those things. The second '''7''' is the group flag, meaning the owning :group can also r/w/x. The third character, '''0''', is in the 'rest of the world' position, meaning anyone who is NOT the owner, and NOT a member of the owning group. They can't read, they can't write, and they can't execute. Since we're not setting up anonymous access, we don't want users who aren't explicitly defined as having access to actually have any access, and this will accomplish that.&lt;br /&gt;
&lt;br /&gt;
== Configuring Samba to use your shares and interface with local Win.X machines ==&lt;br /&gt;
&lt;br /&gt;
Ok, now we have the shares set up appropriately, we just need to define them for Samba. In '''/usr/local/etc/''', there is a file named &amp;quot;'''smb.conf.default'''&amp;quot;. This is a seriously large and complex file with waaaay more options than the average user will ever need to get Samba up and running. I highly suggest you go through it, as it has several examples of methods used to share directories, and access restriction methods. For this article, we'll be writing an [[smb.conf]] from scratch.&lt;br /&gt;
&lt;br /&gt;
'''[global]'''&lt;br /&gt;
&lt;br /&gt;
The first section of your new [[smb.conf]] file should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[global]&lt;br /&gt;
workgroup = WORKGROUP&lt;br /&gt;
server string = NameOfServer&lt;br /&gt;
log file = /var/log/log.%m&lt;br /&gt;
max log size = 50&lt;br /&gt;
security = user&lt;br /&gt;
encrypt passwords = yes&lt;br /&gt;
socket options = TCP_NODELAY&lt;br /&gt;
preferred master = yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''[global]''' is a header in the file, telling Samba all entries after that, before the next [section] are to be globally applied.&lt;br /&gt;
&lt;br /&gt;
'''workgroup = WORKGROUP''' - Specifies which Windows Workgroup to make the server a member of.&lt;br /&gt;
&lt;br /&gt;
'''server string = NameOfServer''' - Names the server. This is the name you'll see in network neighborhood. For example, my smb.conf names my server 'Oyabun'. (cuz it's the boss!)&lt;br /&gt;
&lt;br /&gt;
'''log file = /var/log/log%m''' - Tells Samba to create log files for each machine that connects in the var/log/ directory. For example, if a machine with the name of ''johndesktop'' connected, a log file named '''log.johndesktop''' would be created in /var/log, and appropriate entries for that machine would be made there.&lt;br /&gt;
&lt;br /&gt;
'''max log size = 50''': limits the size of each log files to x kilobytes, in this case 50. This is so you don't find a gig of logs a year down the road.&lt;br /&gt;
&lt;br /&gt;
'''security = user''': This is '''important''', and integral to simple networking between your new Samba server and your Windows machines.&lt;br /&gt;
&lt;br /&gt;
'''ecrypt passwords = yes''': This is also '''important''' - passwords must be encrypted for each machine to successfuly negotiate login credentials with your Samba server.&lt;br /&gt;
&lt;br /&gt;
'''socket options = TCP_NODELAY''': This is not required, but the Samba documentation within smb.conf.default suggests this may yield better performance, so I include it.&lt;br /&gt;
&lt;br /&gt;
'''preferred master = yes''': Windows machines &amp;quot;elect&amp;quot; master browsers, which is a machine which takes on the duties of describing to other machines what all the machine names and locations are. Since your Samba machine is likely to be the sanest machine on your network, it's a good idea to have it 'fudge' the election results and always be the master browser. This option causes Samba to force a browser election when it starts up, and cheats to give it a higher chance of 'winning'.&lt;br /&gt;
&lt;br /&gt;
And that's the global section. Now, on to actually setting up shares.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''[homes]'''&lt;br /&gt;
&lt;br /&gt;
If you want your users to be able to access the home directories of their FreeBSD user accounts, add a [homes] section. If you do NOT want individual users to have private storage areas, do not include this section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[homes]&lt;br /&gt;
comment = Home Directories&lt;br /&gt;
browseable = no&lt;br /&gt;
writeable = yes&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mere existence of [homes] tells Samba to allow users to have access to their home directories via network sharing. If it's not there, they don't have it.&lt;br /&gt;
&lt;br /&gt;
'''comment = Home Directories''' is a description for the [section], and will show up in Windows Explorer under the 'comment' field.&lt;br /&gt;
&lt;br /&gt;
'''browseable = no''' means users other than the owner can't see or browse the share. (I can't see your home directory, you can't see mine, but we're both valid users.) Similar in purpose and execution to the 'My Documents' folder Windows users are familiar with. Each user has their own 'My Documents' folder.&lt;br /&gt;
&lt;br /&gt;
'''writeable = yes''' means users can save files in their home directories from across the network.&lt;br /&gt;
&lt;br /&gt;
That's it, setting up home directories is simple.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
'''[public]'''&lt;br /&gt;
&lt;br /&gt;
Now we'll set up the publicly accessible folder, located at '''/usr/smbroot/public/'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[public]&lt;br /&gt;
comment = Public&lt;br /&gt;
path = /usr/smbroot/public&lt;br /&gt;
public = no&lt;br /&gt;
writeable = yes&lt;br /&gt;
write list = @public&lt;br /&gt;
directory mask = 0770&lt;br /&gt;
create mask = 0007&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''[public]''': &amp;quot;Create a new share named 'Public', which will look like a folder named 'Public' in Network Neighborhood.&lt;br /&gt;
&lt;br /&gt;
'''comment = Public''': Same deal, this fills the 'comment' field in windows explorer / network neighborhood, when you're looking at the share.&lt;br /&gt;
&lt;br /&gt;
'''path = /usr/smbroot/public''': This tells samba exactly where on the local machine to store files for this share. This is pretty important.&lt;br /&gt;
&lt;br /&gt;
'''public = no''': This is sort of counter-intuitive, but you don't want this set to yes.&lt;br /&gt;
&lt;br /&gt;
'''writeable = yes''': This tells Samba to let authorized users write to the directory.&lt;br /&gt;
&lt;br /&gt;
'''write list = @public''': Lists the ''users'' and ''@groups'' allowed to write here. This is important! To define this further, or add more users or @groups, you'd write the line like this:&lt;br /&gt;
&amp;quot;valid users = joe bill @public @friends @dogs&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''directory mask = 0007''': This causes directories created by network users to have permissions of 770, and anyone can delete them. To make only the owner and root@sambaserver have permission to remove them, change this to 1007. The last three digits of the mask '007' in this case, are '''subtracted''' from permissions of 777, digit by digit. So, 777 - 007 = 770.&lt;br /&gt;
&lt;br /&gt;
'''create mask = 0007''': Same deal, only this applies to files. Again, set it to '1007' to only allow the owner and root@sambaserver permission to delete the file.&lt;br /&gt;
&lt;br /&gt;
That's it - you've defined all the important parts of the share for Samba, so it knows where to find it, and how to limit users' access to it.&lt;br /&gt;
&lt;br /&gt;
Test your new config with [[testparm]], which is a Samba tool that lets you validate your smb.conf.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Oyabun# testparm&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I won't list the results here, but you should see a list of your shares. If there are any warnings or error messages, you'll want to analyze and correct the problem. Lastly, testparm will dump your smb.conf to the console.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
'''[private]'''&lt;br /&gt;
&lt;br /&gt;
Now we'll set up the private share. It will actually look just like the public share, with a few small changes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[private]&lt;br /&gt;
comment = Private&lt;br /&gt;
path = /usr/smbroot/private&lt;br /&gt;
public = no&lt;br /&gt;
writeable = yes&lt;br /&gt;
valid users = @private&lt;br /&gt;
write list = @private&lt;br /&gt;
directory mask = 0770&lt;br /&gt;
create mask = 0007&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Obviously we defined the basic stuff like [private] and where the directory is.&lt;br /&gt;
&lt;br /&gt;
'''valid users = @private''' - This prevents anyone who is not a member of @private from having access to this share. Because '''public = no''', people who are NOT members of @private won't even see this share when they browse the server.&lt;br /&gt;
&lt;br /&gt;
That's it, you now have two distinct shares set up, with two distinct sets of criteria to determine who gets access to those shares from a windows machine.&lt;br /&gt;
&lt;br /&gt;
== User accounts in BSD, Samba, and Windows ==&lt;br /&gt;
&lt;br /&gt;
There are two parts to this step, adding matching matching user accounts to the Samba server and the various windows machines, and adding matching Samba passwords to the Samba server for each user. '''Usernames and passwords must match exactly between the client Windows machines and the Samba server.'''&lt;br /&gt;
&lt;br /&gt;
Let's say ''Bob'' logs onto his windows machine with the username &amp;quot;''bob''&amp;quot; and the password &amp;quot;''syeruncle''&amp;quot;. He already has an existing windows account, obviously, so you don't need to set that up, but if he didn't, you would. Bob is going to be a member of the @public group.&lt;br /&gt;
&lt;br /&gt;
The quickest way to do this is to use '''/stand/sysinstall''' to add the user. You can also add users via the command line with [[adduser]]. Make sure you make each user a member of the appropriate group!&lt;br /&gt;
&lt;br /&gt;
''bob'' will be a member of @public&lt;br /&gt;
''greg'' will be a member of @private&lt;br /&gt;
&lt;br /&gt;
Now we need to use [[smbpasswd]] to validate these users in the eyes of Samba.&lt;br /&gt;
&lt;br /&gt;
Make sure you are root before doing the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Oyabun# su bob&lt;br /&gt;
Oyabun# smbpasswd&lt;br /&gt;
New SMB password:&lt;br /&gt;
Retype new SMB password:&lt;br /&gt;
Password changed for user bob.&lt;br /&gt;
Oyabun# exit&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, as root, I switched to bob, then used the [[smbpasswd]] command to define my Samba password. It asked me to enter a password, asked me to confirm it, then accounced that the password was changed. Then I typed '''exit''' to exit the shell-as-bob, return to my root shell.&lt;br /&gt;
&lt;br /&gt;
Repeat this process for ''greg'', entering greg's password.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
Finally, we're done. We have shares set up, user accounts are in place, and everything is ready to go - now we just have to start Samba. This is easy. A startup script was placed in &amp;quot;'''/usr/local/etc/rc.d/'''&amp;quot;, with a likely name of &amp;quot;''samba.sh.default''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Let's rename it, and run it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Oyabun# cd /usr/local/etc/rc.d&lt;br /&gt;
Oyabun# mv samba.sh.default samba.sh&lt;br /&gt;
Oyabun# /usr/local/etc/rc.d/samba start&lt;br /&gt;
SambaOyabun#&lt;br /&gt;
Oyabun#&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, rename the file from samba.sh.default to samba.sh. Then, execute it, using the full path (it will complain otherwise). If all  went well, after execting ''samba.sh start'', you'll see ''Samba'' inserted before the name of your server at the next shell prompt.  This means Samba is indeed running, and that you can now attempt to connect to this machine from your Windows machines. You should do so, testing the various accounts you have set up to make sure they can all connect.&lt;br /&gt;
&lt;br /&gt;
Congrats, you now have a Samba server.&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Samba,_Configuration</id>
		<title>Samba, Configuration</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Samba,_Configuration"/>
				<updated>2004-08-24T02:47:55Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Samba - Simple Configuration&lt;br /&gt;
&lt;br /&gt;
See also: [[Samba]] - [[Samba_Installation]]&lt;br /&gt;
&lt;br /&gt;
This article will walk you through a quick setup of Samba - creating directories to be shared, telling Samba to share those directories, how to limit access to different shares, and finally, how to set up a windows machine to have unfettered access to appropriate shares based on the currently logged in user. This article assumes you have a fresh, unconfigured install ([[Samba_Installation]]) of Samba to work with.&lt;br /&gt;
&lt;br /&gt;
== Setting up your shares on the machine ==&lt;br /&gt;
&lt;br /&gt;
First we need to decide what we're going to share, or at the very least, where the shares will actually reside. The simplest way to do this is to simply create a new directory in an easy to remember place, say, '''/usr'''. You can either share that new folder directly, or create several new directories within it, and limit access to each directory based on criteria I will make clear later in this article. For now, let's assume you have two sets of documents, public and private, and that you want to limit users' access to those documents based on who they are - they can either access both, or just public. So:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Oyabun# mkdir /usr/smbroot&lt;br /&gt;
Oyabun# mkdir /usr/smbroot/public&lt;br /&gt;
Oyabun# mkdir /usr/smbroot/private&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command creates the '''/usr/smbroot/''' directory, which will hold all of your shares. The second command creates the public directory, which '''all''' users will be able to access, and the third command creates the private directory, which only '''select''' users will be able to access.&lt;br /&gt;
&lt;br /&gt;
Now we need to set [[permissions]] on these directories. The [[permissions]] article goes into great detail about permissions, but a quick run through here will be fine. We'll use [[chown]] to change ownership of these two directories now. We'll assume you have or will set up two groups for your users, one group named '''public''', and another named '''private'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Oyabun# chown :public /usr/smbroot/public&lt;br /&gt;
Oyabun# chown :private /usr/smbroot/private&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the owning group of /usr/smbroot/public to :public. The second command assigns ownership of /usr/smbroot/private to the group :private.&lt;br /&gt;
&lt;br /&gt;
Now we need to set the actual [[permissions]] with [[chmod]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Oyabun# chmod 770 /usr/smbroot/public&lt;br /&gt;
Oyabun# chmod 770 /usr/smbroot/private&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same [[permissions]] for each directory, broken down thusly: The first '''7''' is the 'owner' flag, and 7 means read/write/execute. The owner can do all of those things. The second '''7''' is the group flag, meaning the owning :group can also r/w/x. The third character, '''0''', is in the 'rest of the world' position, meaning anyone who is NOT the owner, and NOT a member of the owning group. They can't read, they can't write, and they can't execute. Since we're not setting up anonymous access, we don't want users who aren't explicitly defined as having access to actually have any access, and this will accomplish that.&lt;br /&gt;
&lt;br /&gt;
== Configuring Samba to use your shares and interface with local Win.X machines ==&lt;br /&gt;
&lt;br /&gt;
Ok, now we have the shares set up appropriately, we just need to define them for Samba. In '''/usr/local/etc/''', there is a file named &amp;quot;'''smb.conf.default'''&amp;quot;. This is a seriously large and complex file with waaaay more options than the average user will ever need to get Samba up and running. I highly suggest you go through it, as it has several examples of methods used to share directories, and access restriction methods. For this article, we'll be writing an [[smb.conf]] from scratch.&lt;br /&gt;
&lt;br /&gt;
'''[global]'''&lt;br /&gt;
&lt;br /&gt;
The first section of your new [[smb.conf]] file should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[global]&lt;br /&gt;
workgroup = WORKGROUP&lt;br /&gt;
server string = NameOfServer&lt;br /&gt;
log file = /var/log/log.%m&lt;br /&gt;
max log size = 50&lt;br /&gt;
security = user&lt;br /&gt;
encrypt passwords = yes&lt;br /&gt;
socket options = TCP_NODELAY&lt;br /&gt;
preferred master = yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''[global]''' is a header in the file, telling Samba all entries after that, before the next [section] are to be globally applied.&lt;br /&gt;
&lt;br /&gt;
'''workgroup = WORKGROUP''' - Specifies which Windows Workgroup to make the server a member of.&lt;br /&gt;
&lt;br /&gt;
'''server string = NameOfServer''' - Names the server. This is the name you'll see in network neighborhood. For example, my smb.conf names my server 'Oyabun'. (cuz it's the boss!)&lt;br /&gt;
&lt;br /&gt;
'''log file = /var/log/log%m''' - Tells Samba to create log files for each machine that connects in the var/log/ directory. For example, if a machine with the name of ''johndesktop'' connected, a log file named '''log.johndesktop''' would be created in /var/log, and appropriate entries for that machine would be made there.&lt;br /&gt;
&lt;br /&gt;
Second line: limits the size of each log files to x kilobytes, in this case 50. This is so you don't find a gig of logs a year down the road.&lt;br /&gt;
&lt;br /&gt;
'''security = user''': This is '''important''', and integral to simple networking between your new Samba server and your Windows machines.&lt;br /&gt;
&lt;br /&gt;
'''ecrypt passwords = yes''': This is also '''important''' - passwords must be encrypted for each machine to successfuly negotiate login credentials with your Samba server.&lt;br /&gt;
&lt;br /&gt;
'''socket options = TCP_NODELAY''': This is not required, but the Samba documentation within smb.conf.default suggests this may yield better performance, so I include it.&lt;br /&gt;
&lt;br /&gt;
'''preferred master = yes''': Windows machines &amp;quot;elect&amp;quot; master browsers, which is a machine which takes on the duties of describing to other machines what all the machine names and locations are. Since your Samba machine is likely to be the sanest machine on your network, it's a good idea to have it 'fudge' the election results and always be the master browser. This option causes Samba to force a browser election when it starts up, and cheats to give it a higher chance of 'winning'.&lt;br /&gt;
&lt;br /&gt;
And that's the global section. Now, on to actually setting up shares.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''[homes]'''&lt;br /&gt;
&lt;br /&gt;
If you want your users to be able to access the home directories of their FreeBSD user accounts, add a [homes] section. If you do NOT want individual users to have private storage areas, do not include this section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[homes]&lt;br /&gt;
comment = Home Directories&lt;br /&gt;
browseable = no&lt;br /&gt;
writeable = yes&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mere existence of [homes] tells Samba to allow users to have access to their home directories via network sharing. If it's not there, they don't have it.&lt;br /&gt;
&lt;br /&gt;
'''comment = Home Directories''' is a description for the [section], and will show up in Windows Explorer under the 'comment' field.&lt;br /&gt;
&lt;br /&gt;
'''browseable = no''' means users other than the owner can't see or browse the share. (I can't see your home directory, you can't see mine, but we're both valid users.) Similar in purpose and execution to the 'My Documents' folder Windows users are familiar with. Each user has their own 'My Documents' folder.&lt;br /&gt;
&lt;br /&gt;
'''writeable = yes''' means users can save files in their home directories from across the network.&lt;br /&gt;
&lt;br /&gt;
That's it, setting up home directories is simple.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
'''[public]'''&lt;br /&gt;
&lt;br /&gt;
Now we'll set up the publicly accessible folder, located at '''/usr/smbroot/public/'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[public]&lt;br /&gt;
comment = Public&lt;br /&gt;
path = /usr/smbroot/public&lt;br /&gt;
public = no&lt;br /&gt;
writeable = yes&lt;br /&gt;
write list = @public&lt;br /&gt;
directory mask = 0770&lt;br /&gt;
create mask = 0007&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''[public]''': &amp;quot;Create a new share named 'Public', which will look like a folder named 'Public' in Network Neighborhood.&lt;br /&gt;
&lt;br /&gt;
'''comment = Public''': Same deal, this fills the 'comment' field in windows explorer / network neighborhood, when you're looking at the share.&lt;br /&gt;
&lt;br /&gt;
'''path = /usr/smbroot/public''': This tells samba exactly where on the local machine to store files for this share. This is pretty important.&lt;br /&gt;
&lt;br /&gt;
'''public = no''': This is sort of counter-intuitive, but you don't want this set to yes.&lt;br /&gt;
&lt;br /&gt;
'''writeable = yes''': This tells Samba to let authorized users write to the directory.&lt;br /&gt;
&lt;br /&gt;
'''write list = @public''': Lists the ''users'' and ''@groups'' allowed to write here. This is important! To define this further, or add more users or @groups, you'd write the line like this:&lt;br /&gt;
&amp;quot;valid users = joe bill @public @friends @dogs&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''directory mask = 0007''': This causes directories created by network users to have permissions of 770, and anyone can delete them. To make only the owner and root@sambaserver have permission to remove them, change this to 1007. The last three digits of the mask '007' in this case, are '''subtracted''' from permissions of 777, digit by digit. So, 777 - 007 = 770.&lt;br /&gt;
&lt;br /&gt;
'''create mask = 0007''': Same deal, only this applies to files. Again, set it to '1007' to only allow the owner and root@sambaserver permission to delete the file.&lt;br /&gt;
&lt;br /&gt;
That's it - you've defined all the important parts of the share for Samba, so it knows where to find it, and how to limit users' access to it.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
'''[private]'''&lt;br /&gt;
&lt;br /&gt;
Now we'll set up the private share. It will actually look just like the public share, with a few small changes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[private]&lt;br /&gt;
comment = Private&lt;br /&gt;
path = /usr/smbroot/private&lt;br /&gt;
public = no&lt;br /&gt;
writeable = yes&lt;br /&gt;
valid users = @private&lt;br /&gt;
write list = @private&lt;br /&gt;
directory mask = 0770&lt;br /&gt;
create mask = 0007&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Obviously we defined the basic stuff like [private] and where the directory is.&lt;br /&gt;
&lt;br /&gt;
'''valid users = @private''' - This prevents anyone who is not a member of @private from having access to this share. Because '''public = no''', people who are NOT members of @private won't even see this share when they browse the server.&lt;br /&gt;
&lt;br /&gt;
== User accounts and permissions in BSD and Samba ==&lt;br /&gt;
&lt;br /&gt;
== Configuring a Windows machine with matching settings ==&lt;br /&gt;
&lt;br /&gt;
Ideally, you want the user account and password on a windows machine attempting to make a connection to have a matching user account and password on the Samba server. In fact, if it's a Win9x machine, it's a '''requirement'''. Windows 2000 and XP will both challenge the user to supply proper credentials if their username and password don't match any that Samba and BSD recognize as valid, but Windows 95 and 98 both will simply not work - it's imperative that a matching user account exist on the Samba server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Common Tasks]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Samba,_Configuration</id>
		<title>Samba, Configuration</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Samba,_Configuration"/>
				<updated>2004-08-24T02:34:38Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Samba - Simple Configuration&lt;br /&gt;
&lt;br /&gt;
See also: [[Samba]] - [[Samba_Installation]]&lt;br /&gt;
&lt;br /&gt;
This article will walk you through a quick setup of Samba - creating directories to be shared, telling Samba to share those directories, how to limit access to different shares, and finally, how to set up a windows machine to have unfettered access to appropriate shares based on the currently logged in user. This article assumes you have a fresh, unconfigured install ([[Samba_Installation]]) of Samba to work with.&lt;br /&gt;
&lt;br /&gt;
== Setting up your shares on the machine ==&lt;br /&gt;
&lt;br /&gt;
First we need to decide what we're going to share, or at the very least, where the shares will actually reside. The simplest way to do this is to simply create a new directory in an easy to remember place, say, '''/usr'''. You can either share that new folder directly, or create several new directories within it, and limit access to each directory based on criteria I will make clear later in this article. For now, let's assume you have two sets of documents, public and private, and that you want to limit users' access to those documents based on who they are - they can either access both, or just public. So:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Oyabun# mkdir /usr/smbroot&lt;br /&gt;
Oyabun# mkdir /usr/smbroot/public&lt;br /&gt;
Oyabun# mkdir /usr/smbroot/private&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command creates the '''/usr/smbroot/''' directory, which will hold all of your shares. The second command creates the public directory, which '''all''' users will be able to access, and the third command creates the private directory, which only '''select''' users will be able to access.&lt;br /&gt;
&lt;br /&gt;
Now we need to set [[permissions]] on these directories. The [[permissions]] article goes into great detail about permissions, but a quick run through here will be fine. We'll use [[chown]] to change ownership of these two directories now. We'll assume you have or will set up two groups for your users, one group named '''public''', and another named '''private'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Oyabun# chown :public /usr/smbroot/public&lt;br /&gt;
Oyabun# chown :private /usr/smbroot/private&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the owning group of /usr/smbroot/public to :public. The second command assigns ownership of /usr/smbroot/private to the group :private.&lt;br /&gt;
&lt;br /&gt;
Now we need to set the actual [[permissions]] with [[chmod]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Oyabun# chmod 770 /usr/smbroot/public&lt;br /&gt;
Oyabun# chmod 770 /usr/smbroot/private&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Same [[permissions]] for each directory, broken down thusly: The first '''7''' is the 'owner' flag, and 7 means read/write/execute. The owner can do all of those things. The second '''7''' is the group flag, meaning the owning :group can also r/w/x. The third character, '''0''', is in the 'rest of the world' position, meaning anyone who is NOT the owner, and NOT a member of the owning group. They can't read, they can't write, and they can't execute. Since we're not setting up anonymous access, we don't want users who aren't explicitly defined as having access to actually have any access, and this will accomplish that.&lt;br /&gt;
&lt;br /&gt;
== Configuring Samba to use your shares and interface with local Win.X machines ==&lt;br /&gt;
&lt;br /&gt;
Ok, now we have the shares set up appropriately, we just need to define them for Samba. In '''/usr/local/etc/''', there is a file named &amp;quot;'''smb.conf.default'''&amp;quot;. This is a seriously large and complex file with waaaay more options than the average user will ever need to get Samba up and running. I highly suggest you go through it, as it has several examples of methods used to share directories, and access restriction methods. For this article, we'll be writing an [[smb.conf]] from scratch.&lt;br /&gt;
&lt;br /&gt;
'''[global]'''&lt;br /&gt;
&lt;br /&gt;
The first section of your new [[smb.conf]] file should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[global]&lt;br /&gt;
log file = /var/log/log.%m&lt;br /&gt;
max log size = 50&lt;br /&gt;
security = user&lt;br /&gt;
encrypt passwords = yes&lt;br /&gt;
socket options = TCP_NODELAY&lt;br /&gt;
preferred master = yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''[global]''' is a header in the file, telling Samba all entries after that, before the next [section] are to be globally applied.&lt;br /&gt;
&lt;br /&gt;
The first line tells Samba to create log files for each machine that connects in the var/log/ directory. For example, if a machine with the name of ''johndesktop'' connected, a log file named '''log.johndesktop''' would be created in /var/log, and appropriate entries for that machine would be made there.&lt;br /&gt;
&lt;br /&gt;
Second line: limits the size of each log files to x kilobytes, in this case 50. This is so you don't find a gig of logs a year down the road.&lt;br /&gt;
&lt;br /&gt;
'''security = user''': This is '''important''', and integral to simple networking between your new Samba server and your Windows machines.&lt;br /&gt;
&lt;br /&gt;
'''ecrypt passwords = yes''': This is also '''important''' - passwords must be encrypted for each machine to successfuly negotiate login credentials with your Samba server.&lt;br /&gt;
&lt;br /&gt;
'''socket options = TCP_NODELAY''': This is not required, but the Samba documentation within smb.conf.default suggests this may yield better performance, so I include it.&lt;br /&gt;
&lt;br /&gt;
'''preferred master = yes''': Windows machines &amp;quot;elect&amp;quot; master browsers, which is a machine which takes on the duties of describing to other machines what all the machine names and locations are. Since your Samba machine is likely to be the sanest machine on your network, it's a good idea to have it 'fudge' the election results and always be the master browser. This option causes Samba to force a browser election when it starts up, and cheats to give it a higher chance of 'winning'.&lt;br /&gt;
&lt;br /&gt;
And that's the global section. Now, on to actually setting up shares.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''[homes]'''&lt;br /&gt;
&lt;br /&gt;
If you want your users to be able to access the home directories of their FreeBSD user accounts, add a [homes] section. If you do NOT want individual users to have private storage areas, do not include this section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[homes]&lt;br /&gt;
comment = Home Directories&lt;br /&gt;
browseable = no&lt;br /&gt;
writeable = yes&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mere existence of [homes] tells Samba to allow users to have access to their home directories via network sharing. If it's not there, they don't have it.&lt;br /&gt;
&lt;br /&gt;
'''comment = Home Directories''' is a description for the [section], and will show up in Windows Explorer under the 'comment' field.&lt;br /&gt;
&lt;br /&gt;
'''browseable = no''' means users other than the owner can't see or browse the share. (I can't see your home directory, you can't see mine, but we're both valid users.) Similar in purpose and execution to the 'My Documents' folder Windows users are familiar with. Each user has their own 'My Documents' folder.&lt;br /&gt;
&lt;br /&gt;
'''writeable = yes''' means users can save files in their home directories from across the network.&lt;br /&gt;
&lt;br /&gt;
That's it, setting up home directories is simple.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
'''[public]'''&lt;br /&gt;
&lt;br /&gt;
Now we'll set up the publicly accessible folder, located at '''/usr/smbroot/public/'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[public]&lt;br /&gt;
comment = Public&lt;br /&gt;
path = /usr/smbroot/public&lt;br /&gt;
public = no&lt;br /&gt;
writeable = yes&lt;br /&gt;
write list = @public&lt;br /&gt;
directory mask = 0770&lt;br /&gt;
create mask = 0007&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''[public]''': &amp;quot;Create a new share named 'Public', which will look like a folder named 'Public' in Network Neighborhood.&lt;br /&gt;
&lt;br /&gt;
'''comment = Public''': Same deal, this fills the 'comment' field in windows explorer / network neighborhood, when you're looking at the share.&lt;br /&gt;
&lt;br /&gt;
'''path = /usr/smbroot/public''': This tells samba exactly where on the local machine to store files for this share. This is pretty important.&lt;br /&gt;
&lt;br /&gt;
'''public = no''': This is sort of counter-intuitive, but you don't want this set to yes.&lt;br /&gt;
&lt;br /&gt;
'''writeable = yes''': This tells Samba to let authorized users write to the directory.&lt;br /&gt;
&lt;br /&gt;
'''write list = @public''': Lists the ''users'' and ''@groups'' allowed to write here. This is important! To define this further, or add more users or @groups, you'd write the line like this:&lt;br /&gt;
&amp;quot;valid users = joe bill @public @friends @dogs&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''directory mask = 0007''': This causes directories created by network users to have permissions of 770, and anyone can delete them. To make only the owner and root@sambaserver have permission to remove them, change this to 1007. The last three digits of the mask '007' in this case, are '''subtracted''' from permissions of 777, digit by digit. So, 777 - 007 = 770.&lt;br /&gt;
&lt;br /&gt;
'''create mask = 0007''': Same deal, only this applies to files. Again, set it to '1007' to only allow the owner and root@sambaserver permission to delete the file.&lt;br /&gt;
&lt;br /&gt;
== User accounts and permissions in BSD and Samba ==&lt;br /&gt;
&lt;br /&gt;
== Configuring a Windows machine with matching settings ==&lt;br /&gt;
&lt;br /&gt;
Ideally, you want the user account and password on a windows machine attempting to make a connection to have a matching user account and password on the Samba server. In fact, if it's a Win9x machine, it's a '''requirement'''. Windows 2000 and XP will both challenge the user to supply proper credentials if their username and password don't match any that Samba and BSD recognize as valid, but Windows 95 and 98 both will simply not work - it's imperative that a matching user account exist on the Samba server.&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/File:Samba_Installation_installmenu.png</id>
		<title>File:Samba Installation installmenu.png</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/File:Samba_Installation_installmenu.png"/>
				<updated>2004-08-24T00:48:09Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Samba,_Installation</id>
		<title>Samba, Installation</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Samba,_Installation"/>
				<updated>2004-08-23T20:33:17Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Installing Samba under FreeBSD is simple and painless. The easiest method is to install from ports, which also guarantees you'll get the latest released version. Be sure to use [[CVSUP]] to update your ports tree before installing any software.&lt;br /&gt;
&lt;br /&gt;
See also: [[Samba]] - [[Samba_Configuration]]&lt;br /&gt;
&lt;br /&gt;
All operations listed in this article must be performed by the [[superuser]], so [[su]] to root.&lt;br /&gt;
&lt;br /&gt;
This install procedure will walk you through a basic, simple Samba install. No printers, no complicated options, just samba with some extended logging options which you don't even have to ever look at to run or use samba.&lt;br /&gt;
&lt;br /&gt;
First, find the port:&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# cd /usr/ports/net&lt;br /&gt;
oyabun# ls | grep samba&lt;br /&gt;
gnosamba&lt;br /&gt;
py-samba&lt;br /&gt;
samba&lt;br /&gt;
samba-devel&lt;br /&gt;
samba-libsmbclient&lt;br /&gt;
samba3&lt;br /&gt;
sambasentinel&lt;br /&gt;
oyabun#&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This lists all samba-related ports in the net category. We want the '''samba''' port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# cd samba&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Common Tasks]]&lt;br /&gt;
&lt;br /&gt;
Now, we need to install it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# make install clean&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will start the installation process, downloading and compiling the necessary files. It will '''install''' it (after it asks some questions) and then it will '''clean''' all the work files after it's done.&lt;br /&gt;
&lt;br /&gt;
Shortly, you'll see a menu, which you should configure thusly:&lt;br /&gt;
&lt;br /&gt;
[[Image:Samba_Installation_installmenu.png]]&lt;br /&gt;
&lt;br /&gt;
'''With syslog''' will enable some logging to the syslog, as well as Samba's internal logs. '''Without CUPS''' means you don't want to configure print services right now, you just want Samba to share your files.&lt;br /&gt;
&lt;br /&gt;
Make sure both of those options are selected (by moving the arrows keys and selecting them with space) then hit enter. Samba will now be installed, and barring accidents or problems, you will eventually be dumped back to a shell# prompt.&lt;br /&gt;
&lt;br /&gt;
That's it. You just installed Samba. Now you need to configure it ( [[Samba_Configuration]] ), but you're done with step one.&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/User_talk:Dave</id>
		<title>User talk:Dave</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/User_talk:Dave"/>
				<updated>2004-08-23T20:28:19Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HI A/S/L&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/User_talk:Dave</id>
		<title>User talk:Dave</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/User_talk:Dave"/>
				<updated>2004-08-23T20:27:55Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;HOMO&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Samba,_Installation</id>
		<title>Samba, Installation</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Samba,_Installation"/>
				<updated>2004-08-23T20:26:26Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Installing Samba under FreeBSD is simple and painless. The easiest method is to install from ports, which also guarantees you'll get the latest released version. Be sure to use [[CVSUP]] to update your ports tree before installing any software.&lt;br /&gt;
&lt;br /&gt;
See also: [[Samba]] - [[Samba_Configuration]]&lt;br /&gt;
&lt;br /&gt;
All operations listed in this article must be performed by the superuser, so su to root.&lt;br /&gt;
&lt;br /&gt;
This install procedure will walk you through a basic, simple Samba install. No printers, no complicated options, just samba with some extended logging options which you don't even have to ever look at to run or use samba.&lt;br /&gt;
&lt;br /&gt;
First, find the port:&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# cd /usr/ports/net&lt;br /&gt;
oyabun# ls | grep samba&lt;br /&gt;
gnosamba&lt;br /&gt;
py-samba&lt;br /&gt;
samba&lt;br /&gt;
samba-devel&lt;br /&gt;
samba-libsmbclient&lt;br /&gt;
samba3&lt;br /&gt;
sambasentinel&lt;br /&gt;
oyabun#&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This lists all samba-related ports in the net category. We want the '''samba''' port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# cd samba&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Common Tasks]]&lt;br /&gt;
&lt;br /&gt;
Now, we need to install it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# make install clean&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will start the installation process, downloading and compiling the necessary files. It will '''install''' it (after it asks some questions) and then it will '''clean''' all the work files after it's done.&lt;br /&gt;
&lt;br /&gt;
Shortly, you'll see a menu, which you should configure thusly:&lt;br /&gt;
&lt;br /&gt;
[[Image:Samba_Installation_installmenu.png]]&lt;br /&gt;
&lt;br /&gt;
'''With syslog''' will enable some logging to the syslog, as well as Samba's internal logs. '''Without CUPS''' means you don't want to configure print services right now, you just want Samba to share your files.&lt;br /&gt;
&lt;br /&gt;
Make sure both of those options are selected (by moving the arrows keys and selecting them with space) then hit enter. Samba will now be installed, and barring accidents or problems, you will eventually be dumped back to a shell# prompt.&lt;br /&gt;
&lt;br /&gt;
That's it. You just installed Samba. Now you need to configure it ( [[Samba_Configuration]] ), but you're done with step one.&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Samba,_Installation</id>
		<title>Samba, Installation</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Samba,_Installation"/>
				<updated>2004-08-23T20:26:02Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Installing Samba under FreeBSD is simple and painless. The easiest method is to install from ports, which also guarantees you'll get the latest released version. Be sure to use [[CVSUP]] to update your ports tree before installing any software.&lt;br /&gt;
&lt;br /&gt;
See also: [[Samba]] - [[Samba_Configuration]]&lt;br /&gt;
&lt;br /&gt;
All operations listed in this article must be performed by the superuser, so su to root.&lt;br /&gt;
&lt;br /&gt;
This install procedure will walk you through a basic, simple Samba install. No printers, no complicated options, just samba with some extended logging options which you don't even have to ever look at to run or use samba.&lt;br /&gt;
&lt;br /&gt;
First, find the port:&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# cd /usr/ports/net&lt;br /&gt;
oyabun# ls | grep samba&lt;br /&gt;
gnosamba&lt;br /&gt;
py-samba&lt;br /&gt;
samba&lt;br /&gt;
samba-devel&lt;br /&gt;
samba-libsmbclient&lt;br /&gt;
samba3&lt;br /&gt;
sambasentinel&lt;br /&gt;
oyabun#&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This lists all samba-related ports in the net category. We want the '''samba''' port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# cd samba&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Ports]]&lt;br /&gt;
&lt;br /&gt;
Now, we need to install it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;oyabun# make install clean&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will start the installation process, downloading and compiling the necessary files. It will '''install''' it (after it asks some questions) and then it will '''clean''' all the work files after it's done.&lt;br /&gt;
&lt;br /&gt;
Shortly, you'll see a menu, which you should configure thusly:&lt;br /&gt;
&lt;br /&gt;
[[Image:Samba_Installation_installmenu.png]]&lt;br /&gt;
&lt;br /&gt;
'''With syslog''' will enable some logging to the syslog, as well as Samba's internal logs. '''Without CUPS''' means you don't want to configure print services right now, you just want Samba to share your files.&lt;br /&gt;
&lt;br /&gt;
Make sure both of those options are selected (by moving the arrows keys and selecting them with space) then hit enter. Samba will now be installed, and barring accidents or problems, you will eventually be dumped back to a shell# prompt.&lt;br /&gt;
&lt;br /&gt;
That's it. You just installed Samba. Now you need to configure it ( [[Samba_Configuration]] ), but you're done with step one.&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Samba</id>
		<title>Samba</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Samba"/>
				<updated>2004-08-23T20:25:35Z</updated>
		
		<summary type="html">&lt;p&gt;Pete: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Samba ([http://www.samba.org samba.org]) is an open-source program that, in a nutshell, makes FreeBSD (or any flavor of Unix it has been ported to) look and act like a Windows machine from the perspective of REAL windows machines. &lt;br /&gt;
&lt;br /&gt;
This means Samba can be used to set up network shares (file and printer) that Win.x machines on the same network can access, just as if the FreeBSD machine was an actual Windows server.&lt;br /&gt;
&lt;br /&gt;
This main page will be updated as articles are added, and will act as a portal to the rest of the Samba-related content on this wiki.&lt;br /&gt;
&lt;br /&gt;
These articles will cover installing Samba under FreeBSD, configuring it, and configuring the client windows machines.&lt;br /&gt;
&lt;br /&gt;
[[Samba_Installation]] - &lt;br /&gt;
[[Samba_Configuration]]&lt;br /&gt;
[[Category:Ports]]&lt;/div&gt;</summary>
		<author><name>Pete</name></author>	</entry>

	</feed>