Configure Samba for a Workgroup in the local LAN

A fairly comprehensive HowTo for Samba is available in the Articles section of the forums.

It’s focused on Workgroups.

I’ve marked it as “other version” because it really covers all versions (Samba doesn’t change much with time).

Follow this link: https://forums.opensuse.org/content.php/199-Configure-Samba-for-Local-Lan-Workgroup

I have blocked comment attaching to the Article. If you have questions or comments, please post them here and I will be glad to respond.

Regards
swerdna

Do you have any thoughts on “Samba NT4 domain” versus “Samba Active Directory (AD)”? <https://wiki.samba.org/index.php/Required_Settings_for_Samba_NT4_Domains>

  • This question is prompted by issues arising due to Windows 10 deployment.

No I don’t. I have focus here on the more mundane: the common workgroup. And I haven’t (ever) encountered your topic, so if you need an informed opinion, you should start a thread about it in the broader forum (where your issue would be more easily seen).

Luck.

No need – there are enough ongoing discussions such as: Network/Internet: LEAP 42.1 Problems with getting Windows 10 computers to join Samba domain.

Hi:
Quite a while ago you helped me to set up a smb.conf for my Leap 42.1 which worked well. Somehow perhaps due to updating of samba it has stopped working now in both Leap 42.1 & 42.2 which i lately installed on another partition and copied smb.conf to it from 42.1. Unfortunately it is not working in either one yet. Here is a copy of that smb.conf. I would be pleased if you could again help to solve this issue. Thanks in advance!

# 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.
[global]
        workgroup = MSHome24G
        name resolve order = bcast host lmhosts wins
        netbios name = LeapBox
        local master = yes
        preferred master = auto
        os level = 64
        server string = 
        printcap name = cups
        cups options = raw
        use client driver = yes
        map to guest = Bad User
        usershare allow guests = Yes
        usershare max shares = 100

[printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No
    guest ok = Yes

[print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @ntadmin root
    force group = ntadmin
    create mask = 0664
    directory mask = 0775
    guest ok = Yes

[Documents]
    comment = documents
    guest ok = Yes
    force user = mahmood
    inherit acls = Yes
    path = /home/mahmood/Documents
    read only = No

[Downloads]
    comment = downloads
    guest ok = Yes
    force user = mahmood
    path = /home/mahmood/Downloads
    read only = No

#[Home]
#    comment = Home Directory
#    guest ok = Yes
#    force user = mahmoods
#    path = /home
#    read only = No

[Kmoney]
    comment = kmoney
    guest ok = Yes
    force user = mahmood
    path = /home/mahmood/Kmoney
    read only = No

[Music]
    comment = music
    guest ok = Yes
    force user = mahmood
    path = /home/mahmood/Music
    read only = No

[Pictures]
    comment = pictures
    guest ok = Yes
    force user = mahmood
    path = /home/mahmood/Pictures
    read only = No

[Videos]
    comment = videos
    guest ok = Yes
    force user = mahmood
    path = /home/mahmood/Videos
    read only = No

Hello. Anybody here!
Is there anything wrong with the request in above post which is left with no response?
Thanks!

Possibly wait for swerdna to get the time to respond, or probably better to start a new thread of your own with a well-worded title to get more people to see it.

I don’t see anything wrong with smb.conf. So maybe check (1) the daemons and (2) the ports through the firewall. There is a mini howto for each of these two in the Article I posted on this link: https://forums.opensuse.org/content.php/199-Configure-Samba-for-Local-Lan-Workgroup

So check the two issues and let us know how it went.

Quote Originally Posted by marco07 View Post
Hi:
Quite a while ago you helped me…

Surely not the post from mid 2008??

No. Definitely not. By a while ago, I meant a few month or at any case less than a year ago when I installed leap 42.1. As i said in my OP it was working well up to a time when samba was updated.

Of course, I see it now: Opensuse 42.1 leap - File sharing Issue - Network/Internet - openSUSE Forums quite a big job.

At first I had this in mind: No workgroup name in Network Folder /Samba Shares - Network/Internet - openSUSE Forums

You and I must be amongst the longest members still gracing these forums.

You are right! I have been here for quite a long time and am quite appreciative of this Forum. I am not a real techie, so, whenever I got issues with my openSUSE installation I posted here and got help. Thanks to all of you dedicated folks who keep this good job going and helping a lot of Linux user enthusiasts.
Keep it up folks!!!

P. S. Since the problem i am encountering with my Lan & samba now, is similar to that in my previous thread (the 1st thread you refereed to above) I am going to use that thread to continue with the issue I still have. Please watch for my reply regarding the result of your suggestions in post #8 above.
Thanks!

A Samba share of KNetAttach (KDE) virtual folder:

Context:
Using KNetAttacht (Network Folder Wizard in KDE), it is possible to integrate a remote network folder within the KDE desktop – securely over an insecure public Internet connection via a SSH tunnel; eg https://docs.kde.org/stable5/en/kde-workspace/knetattach/knetattach.pdf
The SSH tunnelled files, can then be viewed as a virtual folder, for example, with Dolphin under Network. In this form they take a distinct and separate entry, from say the local Samba Shares.

My question:
It is possible to mount such a virtual folder as created by KNetAttacht, as a Samba share, such that the contained files can then be shared over the local LAN, like other Samba shares located on the local physical disk ? eg. to local Windows machines.
I have searched on this topic, but am unable to find anything. Not being very knowledgeable on such topics, I do not know if such a Samba mount of a virtual folder is even possible or for example, how would I construct a path statement in the smb.conf file ?.

Motivation:
In the early days of Windows 7, it was possible to SSH tunnel over the Internet to a Linux SSH server, to mount a Samba file share in a windows file manager – It appears nowdays, Microsoft now make this very difficult – no longer practical to simply do – hence my interest in constructing a SSH tunnel from a remote linux pc to a local linux pc and then locally onwards sharing using Samba.

Thank-you for your interest and any suggestions and welcomed assistance,

Hi [and welcome to the forums].

This is an interesting issue. To attach the question at the end of a long and old thread gives the post low visibility. We can’t detach your question and make it into a new thread with high visibility. So I recommend that you start a new thread and ask the same question there. I would be keen to see what the options are (from the more knowledgeable folk).

rpm - qa | grep samba

should be

rpm -qa | grep samba

without the space " " between the single hyphen/single dash/minus “-” and the aberrations for the function/options --query and --all.
[If it is not there by intent
to filter those who do not know the difference between both lines above[SIZE=1]
/who like to do copy and paste…*
from using samba at all…]
*
And a minor one: Why is searching done by a terminal command and (in case) installing by the Yast Software Management-module? Why not both by the Yast module or both by terminal commands?

Typo, thanks. It’s fixed.

And a minor one: Why is searching done by a terminal command and (in case) installing by the Yast Software Management-module? Why not both by the Yast module or both by terminal commands?

Because the terminal command is a quick way to see if it’s installed. And if the user has not got it installed for some strange reason, then the more sophisticated Yast interface should be used by new users who aren’t up to speed with Linux.

There is mistake in https://forums.opensuse.org/content.php/199-Configure-Samba-for-Local-Lan-Workgroup regarding

[WilliamsShare]

. There should this:

[WilliamsShare]
        path = /path_to/shared_directory

Hello,
after update to openSUSE 42.3 (from 42.2) my Windows users can not login/used secured samba shares (guest/anonymous access works). I followed instruction in https://forums.opensuse.org/content.php/199-Configure-Samba-for-Local-Lan-Workgroup but on windows it fails:

C:\>net use W: \\level2\WilliamsShare /user:william
Enter the password for 'william' to connect to 'level2':
System error 86 has occurred.

The specified network password is not correct.

But when I tried it on openSUSE it works:

smbclient //level2/WilliamsShare -U william
Enter SPS\william's password:
Domain=[LEVEL2] OS=] Server=]
smb: \> ls
  .                                   D        0  Sat Aug 19 10:38:47 2017
  ..                                  D        0  Sat Aug 19 10:40:33 2017

                78654384 blocks of size 1024. 45540796 blocks available
smb: \> md cat_and_mouse
smb: \> ls
  .                                   D        0  Sat Aug 19 10:44:30 2017
  ..                                  D        0  Sat Aug 19 10:40:33 2017
  cat_and_mouse                       D        0  Sat Aug 19 10:44:30 2017

                78654384 blocks of size 1024. 45540720 blocks available

What am I doing wrong?

I’m searching desperately for any hints, howto join a OpenSUSE Leap 42.3 (or SLES 12 SP3) Server to a AD Domain, which requires TLS (located in a DMZ)
Searches via Google did not really help and for sure, there is
some adaption of ldap.conf required.
Any help would be really appreciated …
Many thanks
Klaus

I recently installed Leap 15 KDE, and followed the recommendations at https://forums.opensuse.org/content.php/199-Configure-Samba-for-Local-Lan-Workgroup.

Samba works correctly if firewalld is disabled. If firewalld is enabled and active, incoming samba connections work, but outgoing ones do not.

Leap 15’s firewall configuration is a bit different from what is described in the HOWTO. In YaST===>Security and Users===>Firewall (Configure a firewall), I set the network Device to External. I checked services samba and samba-client to be allowed. Service Netbios server seems to not exist.

The smb.conf file is

# 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.
[global]
    netbios name = T61-oS15KDE
    workgroup = CANDH
    server string = ""
    name resolve order = bcast host lmhosts wins
    local master = yes
    preferred master = auto
    os level = 65
    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 = P:
    usershare allow guests = No
    ldap admin dn = 
    wins server = 
    wins support = No
[homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = No
    read only = No
    inherit acls = Yes
[profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
    store dos attributes = Yes
    create mask = 0600
    directory mask = 0700
[users]
    comment = All users
    path = /home
    read only = No
    inherit acls = Yes
    veto files = /aquota.user/groups/shares/
[groups]
    comment = All groups
    path = /home/groups
    read only = No
    inherit acls = Yes
[printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No
[print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @ntadmin root
    force group = ntadmin
    create mask = 0664
    directory mask = 0775


What do I need to set to get samba out through the firewall?

Thanks,
Howard