<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.andreas-duffner.de/index.php?action=history&amp;feed=atom&amp;title=Samba</id>
	<title>Samba - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.andreas-duffner.de/index.php?action=history&amp;feed=atom&amp;title=Samba"/>
	<link rel="alternate" type="text/html" href="http://wiki.andreas-duffner.de/index.php?title=Samba&amp;action=history"/>
	<updated>2026-04-07T20:23:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>http://wiki.andreas-duffner.de/index.php?title=Samba&amp;diff=148&amp;oldid=prev</id>
		<title>Andreas: Created page with &quot;== samba via nfs == if you get the drive via nfs, use the following at the exporting server:   addgroup --gid 200 sambashare and change the group id of sambashare at the samba...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.andreas-duffner.de/index.php?title=Samba&amp;diff=148&amp;oldid=prev"/>
		<updated>2016-02-16T11:47:33Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== samba via nfs == if you get the drive via nfs, use the following at the exporting server:   addgroup --gid 200 sambashare and change the group id of sambashare at the samba...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== samba via nfs ==&lt;br /&gt;
if you get the drive via nfs, use the following at the exporting server:&lt;br /&gt;
  addgroup --gid 200 sambashare&lt;br /&gt;
and change the group id of sambashare at the samba server to the same as above.&lt;br /&gt;
If you need to change files (because they belong to the old group):&lt;br /&gt;
 find . -name &amp;quot;*&amp;quot; -gid #OLD -exec chgrp #NEW {} \;&lt;br /&gt;
Source: http://cgi.zdnet.de/forum/viewtopic.php?t=533&lt;br /&gt;
&lt;br /&gt;
I had to change my nfs mount to&lt;br /&gt;
 192.168.0.1:/mnt/&amp;#039;&amp;#039;&amp;#039;samba-root&amp;#039;&amp;#039;&amp;#039;/samba /mnt/samba nfs &amp;#039;&amp;#039;&amp;#039;nolock&amp;#039;&amp;#039;&amp;#039;,rw,addr=192.168.0.1 0 0&lt;br /&gt;
to be able to use it.&lt;br /&gt;
The samba-root/samba is done that way, so we have a root which is writable by the group sambashare.&lt;br /&gt;
nolock is needed so we can write at all. It is not needed, if you just use the nfs directly !&lt;br /&gt;
&lt;br /&gt;
You have to make sure, that the exported directoy - samba in the above case - is owned and readable and writeable by the group sambashare.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
&lt;br /&gt;
add the users which will be allowed samba access:&lt;br /&gt;
 adduser user1&lt;br /&gt;
 adduser user2&lt;br /&gt;
&lt;br /&gt;
Install samba:&lt;br /&gt;
 apt-get install samba&lt;br /&gt;
 apt-get install samba dbus-x11 cups-common rng-tools gnutls-bin libsasl2-modules-otp libsasl2-modules-ldap  openbsd-inetd smbldap-tools ldb-tools ctdb&lt;br /&gt;
&lt;br /&gt;
enter workgroup name&lt;br /&gt;
&lt;br /&gt;
create a new smb.conf from smb.conf.master&lt;br /&gt;
 testparm -s smb.conf.master &amp;gt;smb.conf&lt;br /&gt;
&lt;br /&gt;
data for /etc/samba/smb.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[global]&lt;br /&gt;
        hosts deny = ALL&lt;br /&gt;
        hosts allow = 192.168.0.1 192.168.0.2&lt;br /&gt;
        workgroup = YOURNETWORK&lt;br /&gt;
        server string = %h server&lt;br /&gt;
        obey pam restrictions = Yes&lt;br /&gt;
        pam password change = Yes&lt;br /&gt;
        passwd program = /usr/bin/passwd %u&lt;br /&gt;
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .&lt;br /&gt;
        unix password sync = Yes&lt;br /&gt;
        syslog = 0&lt;br /&gt;
        log file = /var/log/samba/log.%m&lt;br /&gt;
        max log size = 1000&lt;br /&gt;
        printcap name = /etc/printcap&lt;br /&gt;
        dns proxy = No&lt;br /&gt;
        panic action = /usr/share/samba/panic-action %d&lt;br /&gt;
&lt;br /&gt;
[printers]&lt;br /&gt;
        comment = All Printers&lt;br /&gt;
        path = /var/spool/samba&lt;br /&gt;
        create mask = 0700&lt;br /&gt;
        printable = Yes&lt;br /&gt;
        browseable = No&lt;br /&gt;
&lt;br /&gt;
[print$]&lt;br /&gt;
        comment = Printer Drivers&lt;br /&gt;
        path = /var/lib/samba/printers&lt;br /&gt;
&lt;br /&gt;
[samba]&lt;br /&gt;
        comment = This is a test&lt;br /&gt;
        path = /mnt/samba&lt;br /&gt;
        valid users = yourUser&lt;br /&gt;
        force group = sambashare&lt;br /&gt;
        read only = No&lt;br /&gt;
        create mask = 0775&lt;br /&gt;
        directory mask = 0775&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
add the users to the samba db:&lt;br /&gt;
 smbpasswd -a user1&lt;br /&gt;
 smbpasswd -a user2&lt;br /&gt;
&lt;br /&gt;
restart the samba service:&lt;br /&gt;
 /etc/init.d/samba restart&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
&lt;br /&gt;
=== Unable to connect to CUPS server localhost:631 - Connection refused ===&lt;br /&gt;
add to [global]&lt;br /&gt;
 printcap name = /etc/printcap&lt;/div&gt;</summary>
		<author><name>Andreas</name></author>
	</entry>
</feed>