Beta [samba] Samba 3

Black Hole

May contain traces of nut
Try it with username=root and if you have a null password then do not include the password option.
Where? In the [Modsettings]?

Well, the share is now showing up but it isn't populated.

Update: maybe it was a temporary fluke. It's gone again now.
 
Last edited:

Black Hole

May contain traces of nut
It's back. I've set a root password. It's still unpopulated.

This really isn't ready for non-beta, it needs to "just work" on default settings like the old one just worked.
 
OP
X

xyz321

Well-Known Member
I don't use network-shares-automount but I think It should be under [ModSettings]/smb/<mount name>/

Edit Hold on this - I will investigate further.
 
Last edited:
OP
X

xyz321

Well-Known Member
Here is a sanity check to prove that cifs works. The problem seems to be in deciphering network-shares-automount.
Code:
pvr# cd /tmp
pvr# mkdir test
pvr# mount "//localhost/My Video" test/ -o "unc=\\\\localhost\\My Video,username=root"
pvr#
 

/df

Well-Known Member
... the executable is still 10M ...
What on earth is in there that makes it almost twice the size of a modern Linux x86 kernel (apples and oranges, I know)? Is there some giant portability layer that's statically linked including functions that would never be called? Maybe so, and the linked page links to patches and build options that took 3MB out of the smbd binary, which might be of interest if not already used.

Perhaps v4 is more intelligent about this.
 

Black Hole

May contain traces of nut
I don't want to bang on about this, but so far as I can see we need an improved samba to be a drop-in replacement for the existing samba without breaking anything. That means it must work in the existing environment, or must automatically tweak the existing environment so that it works.

NSA and cifs are at the opposite end of the wire to samba, so clearly an update to the samba package cannot influence NSA and/or cifs at all.

If this Samba3 implementation cannot be tweaked to play nicely with the existing NSA/cifs, NSA and/or cifs need equivalent updates and the user will need to be instructed to update them on all affected machines. Alternatively, as Samba3 seems only to be of benefit for access from outside the HDR-FOX ecosystem (ie from Windows), is there a way the existing samba and a new samba3 package (rather than an update to samba) could co-exist (SMB1 requests served by samba, SMB2 requests by samba3)?

As it stands, Samba3 is an interesting exercise in compiling code for the HDR-FOX as opposed to a release candidate.
 
Last edited:
OP
X

xyz321

Well-Known Member
There are a couple of problems here. One is a bug in network-shares-automount which does not handle null passwords. Null passwords are deprecated anyway so for people who need usernames/passwords it is probably best to set a password using smbpasswd

For backward compatibility, samba3 will still work with an old samba 2 smb.conf file but it needs a slight tweak to the package to change the handling of those old files.
If an old smb.conf file is used it will still work with cifs/network-shares-automount without any changes to the configuration. A problem arises if the old smb.conf which is installed has not been modified from the samba 2 packaged version, it will be replaced by the new samba 3 version on installation of samba 3, instead of creating the smb.conf-opkg file.
 

Black Hole

May contain traces of nut
One is a bug in network-shares-automount which does not handle null passwords
The defaults in [Modsettings] are user=User and password=Password. Could these not be handled automatically by the samba package (as they seem to have been all this time)?
 

MymsMan

Ad detector
Is the problem caused by the security=user line in the new smb.conf while it was security=share in the old version?

Would switching back to Share resolve the need for user and password in NSA?
Would it be best to default to Share in the default configuration with a suggestion to use security=user and change the Root password for additional security?
 

Black Hole

May contain traces of nut
I've set a root password. It's still unpopulated.
This is weird. When I said "unpopulated", I actually have a convolution of two separate effects resulting in that conclusion.

1. If I setfolder=My Video, I get a working share from MEDIA >> Storage >> USB. However, I was monitoring the share using WebIf >> Browse Media Files >> Media, and in WebIF the share is not populated! Normally, using the existing samba package, it would be.

2. Normally, my share point is a folder under media called Shares, which contains short-cut symbolic links to specific folders within the media tree. This does not work in Samba3 (yes, I have imported the share point into smb.conf).
 
Last edited:
OP
X

xyz321

Well-Known Member
The defaults in [Modsettings] are user=User and password=Password. Could these not be handled automatically by the samba package (as they seem to have been all this time)?
With the samba 3 package using a samba 2 configuration the values of these options ("User" and "Password" in this case) are ignored.
I do not have a user named User on this box.
Code:
pvr# opkg remove samba
Removing package samba from root...
Not deleting modified conffile /mod/etc/smb.conf.

pvr# rm /mod/etc/smb.conf

pvr# opkg install samba_2.2.12-6_mipsel.opk 
Installing samba (2.2.12-6) to root...
Configuring samba.
Collected errors:
 * resolve_conffiles: Existing conffile /mod/etc/secrets.tdb is different from the conffile in the new package. The new conffile will be placed at /mod/etc/secrets.tdb-opkg.

pvr# sed -i -e 's/workgroup = WORKGROUP/workgroup = Home/' /mod/etc/smb.conf

pvr# opkg install samba_3.6.25-1_mipsel.opk 
Upgrading samba on root from 2.2.12-6 to 3.6.25-1...
Removing obsolete file /mod/etc/secrets.tdb.
Removing obsolete file /mod/share/codepages/unicode_map.850.
Removing obsolete file /mod/share/codepages/unicode_map.ISO8859-1.
Removing obsolete file /mod/share/codepages/codepage.850.
Not deleting modified conffile /mod/etc/secrets.tdb.
Configuring samba.
Collected errors:
 * file_md5sum_alloc: Failed to open file /mod/etc/secrets.tdb: No such file or directory.
 * resolve_conffiles: Existing conffile /mod/etc/smb.conf is different from the conffile in the new package. The new conffile will be placed at /mod/etc/smb.conf-opkg.

pvr# mkdir /tmp/test

pvr# mount "//localhost/Media" /tmp/test -o "unc=\\\\localhost\\Media,user=User,password=Password"

pvr# ls /tmp/test
My Music/ My Photo/ My Video/ drive1/
Note that the cifs documentation has username but network-shares automount uses user for the cifs mount option. Both appear to work.
 

Black Hole

May contain traces of nut
...and so does samba 3 with the original samba 2 configuration file.
In which case the behaviour needs to be replicated in the Samba 3 conf.

How do you account for the 'Fox Media list showing content but the WebIF media browser not?
 
OP
X

xyz321

Well-Known Member
So it does. Is the problem because guest user = root has been commented out?
There are a few changes to smb.conf and the smb-hotplug.conf file also has valid users = root settop added to each share when a samba 3 configuration file is used.

These changes were included because some people were asking for restricted access (which was broken in samba_2.2.12-6).
 

Black Hole

May contain traces of nut
There are a few changes to smb.conf and the smb-hotplug.conf file also has valid users = root settop added to each share when a samba 3 configuration file is used.

These changes were included because some people were asking for restricted access (which was broken in samba_2.2.12-6).
Fair enough, but you need a user-selectable option so that interoperability is not destroyed. Give those who want to restrict access the means to add it rather than everyone else having to take it away.
 

Black Hole

May contain traces of nut
I need a clear out (back to standard), check everything is working, and start again. It's very odd that I can access Samba3 shares through the UI but not the WebIF – nobody has commented on that.
 
Top