Samba custom share

I’ve come to my wit’s end with following situation:
I have a server with opensuse 11.4 installed and samba running on it. Then, there are numerous windows clients that I need to make the server visible to. I can see the shares I create in /etc/samba/smb.conf and can open, browse, read, write etc. my home directory.
But I fail at opening a directory outside of /home, either symlinked or as a separate share.
What I’m trying to accomplish: I need several users with home directories (that’s done and working) and either as separate shares or as symlinks to outside directories, several shares common to all the users so that they can share data.
the smb.conf file looks as follows (the offending share being the last, Fotky, pointing to /srv/foto (having attributes 775):

smb.conf is the main Samba configuration file. You find a full commented

version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the

samba-doc package is installed.

Date: 2011-07-28

[global]
workgroup = CENTRUM
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \%L\profiles.msprofile
logon home = \%L%U.9xprofile
logon drive = X:
usershare allow guests = Yes
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = No
domain master = No
netbios name = ERU
security = user
wins support = Yes
wins server = 192.168.1.9
server string = Server
unix extensions = no
follow symlinks = Yes
wide links = Yes
encrypt passwords = Yes
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = Yes
read only = No
inherit acls = Yes
follow symlinks = Yes
wide links = Yes
[profiles]
comment = Network Profiles Service
path = %H
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700
follow symlinks = Yes
wide links = Yes

[Fotky]
comment = Fotografie
path = /srv/foto/
writable = yes
valid users = jodvarka
read only = No

I can provide more feedback but have no more ideas about to do that. Read the manual, tried connecting from linux/windows, searched the logs and I’m still clueless.

tail /var/samba/log.smbd:

[2011/11/24 12:33:06.989872, 1] smbd/service.c:678(make_connection_snum)
create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2011/11/24 12:33:06.992368, 1] smbd/service.c:678(make_connection_snum)
create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2011/11/24 12:33:13.566427, 1] smbd/service.c:678(make_connection_snum)
create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2011/11/24 12:33:13.569383, 1] smbd/service.c:678(make_connection_snum)
create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2011/11/24 12:33:18.835378, 1] smbd/service.c:1070(make_connection_snum)
lektor (::ffff:192.168.1.55) connect to service profiles initially as user jodvarka (uid=1000, gid=100) (pid 4013)

tail /var/samba/log.nmbd:

Unable to find the Domain Master Browser name CENTRUM<1b> for the workgroup CENTRUM.
Unable to sync browse lists in this workgroup.
[2011/11/24 12:20:48.634207, 0] nmbd/nmbd_browsesync.c:350(find_domain_master_name_query_fail)
find_domain_master_name_query_fail:
Unable to find the Domain Master Browser name CENTRUM<1b> for the workgroup CENTRUM.
Unable to sync browse lists in this workgroup.
[2011/11/24 12:35:47.812443, 0] nmbd/nmbd_browsesync.c:350(find_domain_master_name_query_fail)
find_domain_master_name_query_fail:
Unable to find the Domain Master Browser name CENTRUM<1b> for the workgroup CENTRUM.
Unable to sync browse lists in this workgroup.

Thanks for … just about anything.

On Thu November 24 2011 05:46 am, ggoblin wrote:

>
> I’ve come to my wit’s end with following situation:
> I have a server with opensuse 11.4 installed and samba running on it.
> Then, there are numerous windows clients that I need to make the server
> visible to. I can see the shares I create in /etc/samba/smb.conf and can
> open, browse, read, write etc. my home directory.
> But I fail at opening a directory outside of /home, either symlinked or
> as a separate share.
> What I’m trying to accomplish: I need several users with home
> directories (that’s done and working) and either as separate shares or
> as symlinks to outside directories, several shares common to all the
> users so that they can share data.
> the smb.conf file looks as follows (the offending share being the last,
> Fotky, pointing to /srv/foto (having attributes 775):
>> # smb.conf is the main Samba configuration file. You find a full
>> commented
>> # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if
>> the
>> # samba-doc package is installed.
>> # Date: 2011-07-28
>> [global]
>> workgroup = CENTRUM
>> passdb backend = tdbsam
>> printing = cups
>> printcap name = cups
>> printcap cache time = 750
>> cups options = raw
>> map to guest = Bad User
>> include = /etc/samba/dhcp.conf
>> logon path = \%L\profiles.msprofile
>> logon home = \%L%U.9xprofile
>> logon drive = X:
>> usershare allow guests = Yes
>> add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody
>> -s /bin/false %m$
>> domain logons = No
>> domain master = No
>> netbios name = ERU
>> security = user

wins support and wins server are mutually set on the same machine. If you want
your samba to be a wins server then set wins support = yes and leave wins
server blank. If another machine is a wins server, then leave wins support
blank (or no) and point wins server to the IP of your wins server.
>> wins support = Yes
>> wins server = 192.168.1.9
>> server string = Server
>> unix extensions = no
>> follow symlinks = Yes
>> wide links = Yes
>> encrypt passwords = Yes
>> [homes]
>> comment = Home Directories
>> valid users = %S, %D%w%S
>> browseable = Yes
>> read only = No
>> inherit acls = Yes
>> follow symlinks = Yes
>> wide links = Yes
>> [profiles]
>> comment = Network Profiles Service
>> path = %H
>> read only = No
>> store dos attributes = Yes
>> create mask = 0600
>> directory mask = 0700
>> follow symlinks = Yes
>> wide links = Yes
>>
>> [Fotky]
>> comment = Fotografie
>> path = /srv/foto/
>> writable = yes
>> valid users = jodvarka
>> read only = No
>
> I can provide more feedback but have no more ideas about to do that.
> Read the manual, tried connecting from linux/windows, searched the logs
> and I’m still clueless.
>
> tail /var/samba/log.smbd:
>> [2011/11/24 12:33:06.989872, 1]
>> smbd/service.c:678(make_connection_snum)
>> create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
>> [2011/11/24 12:33:06.992368, 1]
>> smbd/service.c:678(make_connection_snum)
>> create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
>> [2011/11/24 12:33:13.566427, 1]
>> smbd/service.c:678(make_connection_snum)
>> create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
>> [2011/11/24 12:33:13.569383, 1]
>> smbd/service.c:678(make_connection_snum)
>> create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
>> [2011/11/24 12:33:18.835378, 1]
>> smbd/service.c:1070(make_connection_snum)
>> lektor (::ffff:192.168.1.55) connect to service profiles initially as
>> user jodvarka (uid=1000, gid=100) (pid 4013)
>
> tail /var/samba/log.nmbd:
>> Unable to find the Domain Master Browser name CENTRUM<1b> for the
>> workgroup CENTRUM.
>> Unable to sync browse lists in this workgroup.
>> [2011/11/24 12:20:48.634207, 0]
>> nmbd/nmbd_browsesync.c:350(find_domain_master_name_query_fail)
>> find_domain_master_name_query_fail:
>> Unable to find the Domain Master Browser name CENTRUM<1b> for the
>> workgroup CENTRUM.
>> Unable to sync browse lists in this workgroup.
>> [2011/11/24 12:35:47.812443, 0]
>> nmbd/nmbd_browsesync.c:350(find_domain_master_name_query_fail)
>> find_domain_master_name_query_fail:
>> Unable to find the Domain Master Browser name CENTRUM<1b> for the
>> workgroup CENTRUM.
>> Unable to sync browse lists in this workgroup.
>
> Thanks for … just about anything.
>
ggoblin;
Try following this howto:
http://opensuse.swerdna.org/suselanprimer.html

You may need to adjust your name resolve order for good operattion. Non of
this is likely your main problem. Samba must obey the normal nix permissions.
I suspect jodvarka does not have permission to access /srv/foto/. You must
also create your samba users with:


su
smbuser -a <username>

By default windows always sends the users name and password for authentication.


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

On Thu November 24 2011 10:38 am, PV wrote:

> On Thu November 24 2011 05:46 am, ggoblin wrote:
<snip>>
> wins support and wins server are mutually set on the same machine. If you
want
> your samba to be a wins server then set wins support = yes and leave wins
> server blank. If another machine is a wins server, then leave wins support
> blank (or no) and point wins server to the IP of your wins server.
>>> wins support = Yes
>>> wins server = 192.168.1.9

<snip>
OPPS. the above should read wins support and wins server are mutually exclusive
you should never set both on the same machine.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

You should fix the wins server stuff that Venzkep mentioned and the samba user database.

For the photos, I see an access problem: To have “valid users = jodvarka” demands that only the user jodvarka will have access.

I suspect that you want all authenticated users to have access, is that right? If that’s the case then you can make the directory foto owned by any valid openSUSE Linux user e.g. for discussion make it billybob . Chown the directory to billybob:users and chmod the permissions to 750 drwxr-x— Then this will work OK:

[Fotky]
comment = Fotografie
path = /srv/foto/
writable = yes
force user = billybob
read only = No

All people with a username/password in the samba user database will have rw access to the directory. More examples here: Secure Read-write Shares; no Guest Access (requires authentication)

I read your link, double checked the user (already existing), double checked the permissions (775) and finally, just to save the rest of my hair, went on with lower opensuse version, downgraded from 11.4 to 11.2 (which I have at home, I’m lazy person when it comes to upgrading versions - at my home server samba works as expected).

And lo and behold - it works right out of the box. The problem solved, using exactly same conf file as before, exactly same directory with permissions. There must be something buried even deeper and it somehow intrigues me to find it out, but I don’t have that system anymore… If anyone is interested, going down from samba 3.5.7-3.5.1 to 3.4.3-3.8.1 solved the issue without any more work. As a sidenote, even when you say wins support and server are mutually exclusive, I was able to see my home share (/home/jodvarka) but not anything outside /home, which made me a puzzled penguin.

Thanks for your time, guys :slight_smile:

On 11/28/2011 8:06 AM, ggoblin wrote:
>
<snip>
> solved the issue without any more work. As a sidenote, even when you say
> wins support and server are mutually exclusive, I was able to see my
> home share (/home/jodvarka) but not anything outside /home, which made
> me a puzzled penguin.
>
> Thanks for your time, guys :slight_smile:
>
>
ggoblin;

Please read the WINS section in Chapter 10, Network Browsing, of “The Official Samba 3.5.x HOWTO and
Reference Guide”

http://us2.samba.org/samba/docs/man/Samba-HOWTO-Collection/NetworkBrowsing.html

The Howto has not yet been updated for Samba3.6.x, but this stuff has not changed in years.


P.V.
“We’re all in this together, I’m pulling for you” Red Green