[How-To] Samba 4

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

[How-To] Samba 4

Postby moonman » Sun Mar 03, 2013 7:33 am

Samba 4 is in the official repositories. This package has been pulled from the aur because there's no more need in it. To switch to the official one:

Disable and stop old services:
$this->bbcode_second_pass_code('', 'systemctl disable smb nmb
systemctl stop smb nmb')

Backup your config:$this->bbcode_second_pass_code('', '
cp /etc/samba/smb.conf /tmp')

Remove samba4 from aur:
$this->bbcode_second_pass_code('', 'pacman -R samba4 libwbclient4 smbclient4 cifs-utils4')

Install the official samba (this will pull all the required dependencies as well)
$this->bbcode_second_pass_code('', 'pacman -Sy samba')

Copy your backedup config back:
$this->bbcode_second_pass_code('', 'cp /tmp/smb.conf /etc/samba/')

Reenable and start all the services (the official systemd services come with the d again):
$this->bbcode_second_pass_code('', 'systemctl enable smbd nmbd
systemctl start smbd nmbd')

I'm leaving the below here for reference (including the example config).
____________________________________________________________________________________________________________
We've brought samba version 4 into the repository, maybe it will solve some of the problems you guys are having with samba 3.
IT WILL remove all samba3 packages, so make sure to backup the config file before installation.

Install:
$this->bbcode_second_pass_code('', 'pacman -Sy samba4')

- "security = share" has been removed in samba 4. If you are looking to have unprotected shares, use this instead:

$this->bbcode_second_pass_code('', ' security = user
map to guest = Bad User
')

- service files are called smb.service and nmb.service instead of smbd.service and nmbd.service

Here's an example config:

$this->bbcode_second_pass_code('', '[global]
workgroup = WORKGROUP
server string = ALARM
netbios name = ALARM
security = user
map to guest = Bad User
guest account = root
load printers = yes
printing = bsd
printcap name = /dev/null
disable spoolss = yes
log file = /var/log/samba/%m.log
max log size = 50
use sendfile = true

[media]
path = /media
read only = no
public = yes
writable = yes
force user = root
')

It also seems samba 4 is a little quicker: 45 MByte/s from GoFlex Home to my PC.
Last edited by moonman on Sat Apr 13, 2013 5:53 am, edited 4 times in total.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: [How-To] Samba 4

Postby tedm » Sun Mar 03, 2013 5:56 pm

Thanks moonman, I may upgrade to this today. Is there a memory difference in ver 4 vs the older nmbd/smbd modules? Thanks!
tedm
 
Posts: 88
Joined: Tue Jan 01, 2013 1:12 am

Re: [How-To] Samba 4

Postby yazyazoo » Sun Mar 03, 2013 6:10 pm

Where should we put the config file?
yazyazoo
 
Posts: 78
Joined: Fri Sep 07, 2012 5:19 pm

Re: [How-To] Samba 4

Postby moonman » Sun Mar 03, 2013 6:50 pm

Config file location is the same: /etc/samba/smb.conf
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: [How-To] Samba 4

Postby yazyazoo » Sun Mar 03, 2013 7:30 pm

To start and save is it

systemctl start smb nmb

systemctl enable smb.service
yazyazoo
 
Posts: 78
Joined: Fri Sep 07, 2012 5:19 pm

Re: [How-To] Samba 4

Postby moonman » Sun Mar 03, 2013 7:32 pm

Yes, but you need to enable nmb as well
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: [How-To] Samba 4

Postby yazyazoo » Sun Mar 03, 2013 8:24 pm

Would it be this command?

systemctl enable nmb.service
yazyazoo
 
Posts: 78
Joined: Fri Sep 07, 2012 5:19 pm

Re: [How-To] Samba 4

Postby pepedog » Sun Mar 03, 2013 11:33 pm

Yes.
.service is optional
You can do both together
$this->bbcode_second_pass_code('', 'systemctl enable smb nmb')
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: [How-To] Samba 4

Postby servili007 » Mon Mar 04, 2013 2:06 am

Seriously guys? :D I just spent the last couple days trying to get this compiled (natively) and getting around some doc issues that were stopping everything dead. I finished my working packages around the same time that this was posted. Well, that's what I get for putting my weekend into linux.
servili007
 
Posts: 8
Joined: Mon Feb 25, 2013 6:25 am

Re: [How-To] Samba 4

Postby moonman » Mon Mar 04, 2013 2:59 am

I compiled this a week ago and had been trying to get this into the repo without dependency issues. FIY, you could've compiled it from aur, actually most of the stuff is in aur.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Next

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 2 guests