<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>gHacks technology news &#187; workgroup</title> <atom:link href="http://www.ghacks.net/tag/workgroup/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Fri, 19 Mar 2010 17:29:08 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Get To Know Linux: Understanding smb.conf</title><link>http://www.ghacks.net/2009/02/06/get-to-know-linux-understanding-smbconf/</link> <comments>http://www.ghacks.net/2009/02/06/get-to-know-linux-understanding-smbconf/#comments</comments> <pubDate>Fri, 06 Feb 2009 21:16:56 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[software]]></category> <category><![CDATA[domain]]></category> <category><![CDATA[file-sharing]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[shares]]></category> <category><![CDATA[smb.conf]]></category> <category><![CDATA[workgroup]]></category><guid isPermaLink="false">http://www.ghacks.net/?p=10373</guid> <description><![CDATA[Next to the xorg.conf file (read my Get To Know Linux: Understanding xorg.conf for more) the smb.conf file might be the most misunderstood of all files. Part of the reason for this is because the default file is, well, rather large and confusing. When you compare what you need vs what you have (in the [...]]]></description> <content:encoded><![CDATA[<p>Next to the xorg.conf file (read my <a title="Get To Know Linux: Understanding xorg.conf" href="http://www.ghacks.net/2009/02/04/get-to-know-linux-understanding-xorgconf/" target="_blank">Get To Know Linux: Understanding xorg.conf for more</a>) the smb.conf file might be the most misunderstood of all files. Part of the reason for this is because the default file is, well, rather large and confusing. When you compare what you <strong>need</strong> vs what you <strong>have</strong> (in the default at least), you will be surprised at how simple Samba can be to configure.</p><p>After Samba is installed the smb.conf file will be around 533 lines long. Fear not. It&#8217;s much easier than it seems.</p><p><span id="more-10373"></span></p><p>The smb.conf file is broken into sections. Each section will start with a line that looks like:</p><p>[TITLE]</p><p>Where TITLE is the actual title of the block. Each block represents either a configuration or a  share that other machines can connect to. You will, at minimum, have a global block and a single share.</p><p><strong>Global</strong></p><p>The global block is one of the more important blocks in your smb.conf file. This block defines the global configuration of your Samba server. This block begins with:</p><p><em>[global]</em></p><p>Within your blocks your configuration lines will be made up of:</p><p><em>option = value</em></p><p>statements.</p><p>The most important statements you will need in your global block are:<br /> <code>netbios name= NAME<br /> workgroup = WORKGROUP_NAME<br /> security = SECURITY_TYPE<br /> encrypt passwords = YES/NO<br /> smb passwd file = /path/to/smbpasswd<br /> interfaces = ALLOWED_ADDRESSES<br /> </code><br /> The values for each option above should be self explanatory. But there is one thing to note. If you are encrypting passwords you will need to add users (with passwords) with the smbpasswd command.<br /> Within the global block one of the more important options is the security option. This option refers to authentication (how users will be able to log in). There are five different types of security:</p><ul><li> ADS &#8211; Active Directory Domain</li><li> Domain &#8211; User verification through NT Primary or Backup Domain</li><li> Server &#8211; Samba server passes on authentication to another server</li><li> Share &#8211; Users do not have to enter username or password (until they try to access a specific directory)</li><li> User &#8211; Users must provide valid username/password. This is the default.</li></ul><p><strong>Share Blocks</strong></p><p>The next blocks will refer to individual shares. You will need a different block for each directory you want to share to Samba users. A typical share block will look like this:<br /> <code>[SHARE NAME]<br /> comment = COMMENT<br /> path = /path/to/share<br /> writeable = YES/NO<br /> create mode = NUMERIC VALUE<br /> directory mode = NUMERIC VALUE<br /> locking = YES/NO</code></p><p>Everything in caps above will be defined according to your needs. The tricky entries will be the create and directory modes. What this does is define permissions for any file created as well as the share directories. So the values will be in the form of 0700 or 0600 (depending upon your permission needs). Remember, you will need a share block for every directory you want to share out.</p><p>Naturally there are plenty of options that can be used in Samba. Many of these options will fall in the global block.</p><p><strong>Printer Block</strong></p><p>You can also define a block to share out printers. This block will start with:</p><p>[printers]</p><p>and will contain options like:<br /> <code>comment = COMMENT<br /> path = /PATH/TO/PRINTER/SPOOL<br /> browseable = YES/NO<br /> guest ok = YES/NO<br /> writable = YES/NO<br /> printable = YES/NO<br /> create mode = NUMERIC VALUE</code></p><p><strong>Sample smb.conf</strong></p><p>I have an external drive that I mount to <strong>/media/music</strong> and I share out to my home network with the following <strong>smb.conf </strong>file:<br /> <code>[global]<br /> netbios name = MONKEYPANTZ<br /> workgroup = MONKEYPANTZ<br /> security = user<br /> encrypt passwords = yes<br /> smb passwd file = /etc/samba/smbpasswd<br /> interfaces = 192.168.1.1/8<br /> [wallen music]<br /> comment = Music Library<br /> path = /media/music<br /> writeable = yes<br /> create mode = 0600<br /> directory mode = 0700<br /> locking = yes<br /> </code><br /> And that&#8217;s it. That is my entire <strong>smb.conf</strong> file. Granted I am only sharing out a single directory, but it shows how simple <strong>smb.conf</strong> can be to configure.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/02/06/get-to-know-linux-understanding-smbconf/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 3/13 queries in 0.004 seconds using disk

Served from: www.ghacks.net @ 2010-03-19 18:05:06 -->