Samba usershares aren't working

Heey everyone,

I’m fairly new to Suse and Yast, so I’m not sure if there’s something wrong I’m doing here, but here goes -

Basically, I’m trying to set it up so that I can share folders from Dolphin. That is, right-click a folder -> Properties -> Share tab - tick the boxes. So I fired up Yast, clicked Samba Server, and checked the two boxes to “Allow Users to Share Their Directories” and “Allow Guest Access”, making sure the Permitted Group is “users”.

I logged out and back in, went through the options in Dolphin, and the little network icon appeared on my folder, but the Windows PC can’t find the share (And neither can my old Android phone I’m using to quickly test this at my desk using Lidroid FM). When I closed and re-opened Dolphin, the icon had gone and the boxes to tick to share the folder were unticked again.

I’ve also added a Samba User, using pdbedit. I’ve also tried logging my out/in, as well as rebooting the whole system (Samba is set to load on boot in Yast).

I’m using OpenSuse 13.2 KDE edition, and it’s a fairly new install so I haven’t had a chance dig in and start yanking at wires to break stuff yet, so I’m not sure what to do here!

I should probably note, my /home folder is actually from an older Linux install (Arch) which I kept when I paved over it with OpenSuse. Not sure if that’ll cause any issues (Does Samba leave any files in /home?) but I’ll mention it just in case.

There’s something else I did that was possibly a bit dumb. I removed my /etc/samba/smb.conf, and un-and-re-installed samba hoping it’d create me another commented one that Yast can write in. Turns out it didn’t, though Yast seems to have happily recreated the file and added the lines to do with the buttons I click. This was after the above problem, in an attempt to sort of start from scratch, but it doesn’t seem to have worked.

Is there much I can do to salvage this situation? :smiley: Any help would be appreciated, thanks all!

Do

su
zypper install samba-doc

once you have done that you should have all eexamples all you have to do is copy

/usr/share/doc/packages/samba/examples/smb.conf.default to /etc/samba/

then you will have the default smb.conf, remember to rename it to smb.conf and not keep it as smb.conf.default

zypper in -f samba-client

Will also restore /etc/samba/smb.conf

Thanks both - I did zypper install samba-doc and restored the original smb.conf :smiley:

I’ve done absolutely nothing but go into Yast, into the Samba Server, and ticked the two boxes ‘Allow Users to Share Their Directories’ and ‘Allow Guest Access’. I went through the options in Dolphin to share the folder I want to.

The Samba clients (IE. my mums Windows laptop and my Android phone) still aren’t seeing my folder (Plus when I close and re-open Dolphin the folder loses its Network icon again). The clients also aren’t seeing any of the default Enabled folders.

I also tried adding another folder to test that, and that folder doesn’t show up either! I’m restarting the smb daemon every time I change something (Do I need to do this, or does Yast do it itself?) by running systemctl restart smb nmb.

Hello

I have no idea about yast, i usually just edit the smb.conf file myself and restart smbd and nmbd services.

here is the tail of my config which shares a folder called Share with no login

[Share]
        path = /srv/samba/Share
        writable = yes
        guest ok = yes
        guest only = yes
        create mode = 0777
        directory mode = 0777
        browseable=yes

Obviously /srv/samba/Share must exist the permissions i have on it are 777 with nobody:nogroup as owner, firewall might require netbios smbd and nmbd ports open. I know this isnt what you require but i prefer doing it all manually anyway :smiley:

I’ve tried following instructions I found on https://wiki.archlinux.org/index.php/Samba#Creating_usershare_path to allow myself to share folders from Dolphin by editing smb.conf manually, and I’m still getting nowhere :frowning:

I’m starting to wonder if there’s something on my system for some reason stopping samba from doing its thing. The Yast window warns me about a firewall, but I don’t have one enabled.

Not sure if this is relevant, but I ran ‘dolphin’ in a terminal to see what sort of errors it spits out. I came up with this:

dolphin(10836) KSambaSharePrivate::add: We got some errors while running 'net usershare add' ("usershare", "add", "Movies", "/home/eddie/Videos/Movies", "", "Everyone:f,eddie:f,sambauser:f", "guest_ok=y") 
dolphin(10836) KSambaSharePrivate::add: "net usershare add: cannot convert name "Everyone" to a SID. NT_STATUS_IO_TIMEOUT.

I get a similar error if I only give user ‘eddie’ access to it (despite that user being a samba user on my computer).

I took your Samba config and added it to the end of my smb.conf (changing the path to a directory that actually exists :wink: ). I tried connecting to it from my Android client, and it tells me the IP is unreachable or isn’t a Samba server (And it doesn’t show up in the auto-discovered list). I’ll try a Windows box next and see if that works.

EDIT: Windows box doesn’t pick it up either.

Hmmmm, never used this opensuse as a samba server before but have just set it up now with


mkdir -p /srv/samba/Share
cd /srv/samba
chown nobody:nogroup /Share
chmod 777 /Share

adding 

[Share]
        path = /srv/samba/Share
        writable = yes
        guest ok = yes
        guest only = yes
        create mode = 0777
        directory mode = 0777
        browseable=yes

to the bottom of /etc/samba/smb.conf

passwd -a (insert username) 
enter password twice
systemctl restart smb.service

With a firewall on it wont connect, i have not setup the ports, but with firewall off it
it connects just fine via my slack box and my phone.

If you DO have a firewall on then allow Internal Zone Netbios Server, Samba Client, Samba Server

Well, I followed your instructions 'till the ‘passwd’ command, which basically acted like I didn’t give it enough arguments (I typed ‘passwd -a myusername’).

As I said, I don’t have a firewall turned on.

I’m really starting to wonder if Samba is somehow borked on my machine. I did re-use my /home drive for this install, and in there is a ‘samba’ user directory. Could something be in there that’s causing some sort of breakage? (I imagine not, as I looked in there and it was empty…)

Are there any other files that I could clean out, that would essentially give me a completely blank slate with which to setup Samba from the ground up?

My end-goal here is to have the usershares functionality working in Dolphin, but right now I can’t even get Samba to share any folders at all, which is confusing me to say the least!

Try adding the -L

**smbpasswd -L -a** USERNAME 

And there lay my confusion - The original post said ‘passwd’ not ‘smbpasswd’ :smiley:

Anyway - I’m still unable to connect to my Samba share, I’ve just done everything above and rebooted, and have also tried a couple of different smb.conf files (Both the examples from samba-doc, one from a friend that he is using as we speak so we know it works, with filepaths changed to suit).

When I try to connect using the CLI smbclient from my laptop, I’m getting the error -

protocol negotiation failed: NT_STATUS_IO_TIMEOUT

Me and a friend have been trying to figure it out, and he kept going back to ‘its your firewall’, however I don’t have the firewall started in Yast. However, it seems that Samba is running, and something is stopping things from being able to connect to it. What could this be… :\

On 1/16/2015 11:16 PM, Piece Maker wrote:
>
> And there lay my confusion - The original post said ‘passwd’ not
> ‘smbpasswd’ :smiley:
>
> Anyway - I’m still unable to connect to my Samba share, I’ve just done
> everything above and rebooted, and have also tried a couple of different
> smb.conf files (Both the examples from samba-doc, one from a friend that
> he is using as we speak so we know it works, with filepaths changed to
> suit).
>
> When I try to connect using the CLI smbclient from my laptop, I’m
> getting the error -
>
>
> Code:
> --------------------
> protocol negotiation failed: NT_STATUS_IO_TIMEOUT
> --------------------
>
>
> Me and a friend have been trying to figure it out, and he kept going
> back to ‘its your firewall’, however I don’t have the firewall started
> in Yast. However, it seems that Samba is running, and something is
> stopping things from being able to connect to it. What could this be…
> :
>
>
Piece Maker;
Can you ping your linux machine?
From another Linux machine use:


ping -c3 <IP openSUSE>

From a Windows Machine use the Command Prompt and


ping <IP openSUSE>

If you can ping by IP can you connect by IP with smbclient?
Are you positive the the firewall is off?
What is the results of?


systemctl status SuSEfirewall2

Mind the spelling, Linux is case sensitive.
What are the results of:


systemctl status smb
systemctl status nmb

If you are still having trouble post the contents of
/etc/samba/smb.conf. You can “sanitize” any sensitive information.


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

The ping worked, the time was 2011ms which I dunno if that’s fast or slow. I can also ssh into my Suse machine, but it takes a LONG time to connect.

If you can ping by IP can you connect by IP with smbclient?
Are you positive the the firewall is off?
What is the results of?

systemctl status SuSEfirewall2

Mind the spelling, Linux is case sensitive.

SuSEfirewall2.service - SuSEfirewall2 phase 2
   Loaded: loaded (/usr/lib/systemd/system/SuSEfirewall2.service; enabled)
   Active: inactive (dead) since Sat 2015-01-17 05:25:22 GMT; 11h ago
 Main PID: 4602 (code=exited, status=0/SUCCESS)

Seems to be off!

What are the results of:

systemctl status smb
systemctl status nmb

If you are still having trouble post the contents of
/etc/samba/smb.conf. You can “sanitize” any sensitive information.

smb.ssmb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled)
   Active: active (running) since Sat 2015-01-17 05:17:32 GMT; 12h ago
 Main PID: 9141 (smbd)
   Status: "smbd: ready to serve connections..."
   CGroup: /system.slice/smb.service
           ├─9141 /usr/sbin/smbd -D
           └─9142 /usr/sbin/smbd -D
nmb.service - Samba NMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled)
   Active: active (running) since Sat 2015-01-17 05:24:01 GMT; 12h ago
 Main PID: 30232 (nmbd)
   Status: "nmbd: ready to serve connections..."
   CGroup: /system.slice/nmb.service
           └─30232 /usr/sbin/nmbd -D

This is an smb.conf I stole off a friend ‘just to test’ -

[global]
    server string = %h server (Samba, Ubuntu)
    map to guest = Bad User
    obey pam restrictions = yes
    pam password change = yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *enter/snew/s*/spasswrd:* %n
 *Retype/snew/s*/spassword:* %n
 *password/supdated\ssuccessfully* .
    unix password sync = yes
    syslog = o
    log file = /var/log/samba/log.%m
    max log size = 1000
    dns proxy = no
    usershare allow guest = yes
    panic action = /usr/share/samba/panic-action %d
    usershare allow guests = Yes
    wins support = No
    usershare max shares = 100
    security = domain
    ldap admin dn = 
    passdb backend = smbpasswd
    wins server = 
    workgroup = WORKGROUP

[sda4]
    comment = public folder
    valid users = eddie
    available = yes
    path = /home/eddie/Videos/TV
    read only = No
    create mask = 0777
    directory mask = 0777
    browseable = yes
    writable = yes
    guest ok = Yes

;  
[Music]
    comment = public folder
    available = yes
    path = /home/eddie/Videos/Movies
    read only = No
    create mask = 0777
    directory mask = 0777
    browseable = yes
    writable = yes
    guest ok = Yes

This is the smb.conf I was trying before that - it’s basically stock, except for ticking the usershare boxes in Yast.

#
# Copyright (c) 1999-2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All rights reserved.
#
# /etc/samba/smb.conf is the main Samba configuration file.  See the manual
# page of smb.conf and the included documentation in
# /usr/share/doc/packages/samba in order to understand the options listed here
# and many more features.
#
# Lines in this file which starts with ; and # are ignored by Samba while
# parsing it.  Therefor both signs mark a comment, but here we use a # to
# indicate a real comment and ; for a deactivated option.  To activate such a
# feature just remove the leading semicolon.
#
# We suggest to use the command 'testparm' after any changes you made.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#

[global]

#    panic action = export DISPLAY=localhost:0; /usr/bin/X11/xterm -e gdb /proc/%d/exe %d || /bin/sleep

# default:
#    smb ports = 139 445

# to disable netbios also disable nmbd!
#    disable netbios = Yes

#    utmp = Yes
    workgroup = WORKGROUP

# choose your passdb backend
# options: smbpasswd, tdbsam, ldapsam, plugin
# default: passdb backend = tdbsam
    passdb backend = tdbsam
#    algorithmic rid base = 100000
#    identifier:mysql host                     - host name, defaults to 'localhost'
#    identifier:mysql password
#    identifier:mysql user                     - defaults to 'samba'
#    identifier:mysql database                 - defaults to 'samba'
#    identifier:mysql port                     - defaults to 3306
#    identifier:table                          - Name of the table containing users


# save lookup time...
#    username level = 0

#    debuglevel = 3 tdb:10 printdriver:10 lanman:10 smb:10 rpc_parse:10 rpc_srv:10 rpc_cli:10 passdb:10 sam:10 auth:10 winbind:10 vfs:10
#    debuglevel = 10
#    time server = Yes

# Please uncomment the following entry and replace the IP address and
# netmask with the values of your network interface configuration.
#    interfaces = 127.0.0.1 192.0.2.0/24 eth0
# By this limit also NMB name servie to the listed interfaces above.  Before
# activating this, read carefully the 'bind interfaces only' section of the
# smb.conf man page.
#    bind interfaces only = true

# This enables MS Distributed File System. 
#    host msdfs = Yes

# CUPS is the current default printing system.
    printing = cups
    printcap name = cups
# Rescan for new or obsolet printers after every 12 & 1/2 minutes.
    printcap cache time = 750
# Send all print jobs with option 'raw' to CUPS.  This disables any filter on
# the CUPS level.  You only need such a filter if the output generated on the
# Microsoft side (e.g. from a generic PostScript driver) must be transformed
# to a format (e.g. PCL or vendor specific) supported by the attached printer.
    cups options = raw
# If you don't want all your printers automatically shared to Samba clients,
# set load printers to no and create extra individual printer shares manually.
#    load printers = No
# This tells Samba to use the file smbusers for user mapping.  It's disabled
#    as a root = Administrator results in files owned by root and not
# Administrator as it was intended.
#    username map = /etc/samba/smbusers

# Guest handling
    map to guest = Bad User
#    restrict anonymous = 0

# Is this a WINS server?
#    wins support = Yes
# If you want Samba to use an existing WINS server, please uncomment the
# following line and replace the IP address with the one of your WINS server.
#    wins server = 192.0.2.13
    include = /etc/samba/dhcp.conf

# Is this a BDC?
#    local master = Yes
#    domain master = No
#    domain logons = Yes
#    security = user

# Is this a PDC?
#    local master = Yes
#    domain master = Yes
#    domain logons = Yes
#    security = user

# Is this a domain member?
#    local master = No
#    domain master = No
#    domain logons = No
#    security = ads
#    security = domain


# Generic logon script? (passdb).  See also the netlogon example share.
#    logon script = test.bat

# Where to store NT user profiles? (passdb)
    logon path = \\%L\profiles\.msprofile
# Where to store 9x/ ME roaming  profiles
    logon home = \\%L\%U\.9xprofile

# Where is a user's home directory and where should it be mounted ? (passdb)
    logon drive = P:

# how to handle local file-caching (offline mode)
# csc policy (one of manual (manual), documents, programs, disable)
#    csc policy = manual

# This allows machine-account-creation on-the-fly.
# You need to create a root samba-user (never ever with the unix root pwd !!!)
# root has to be domain admin. and you need a group "machines"
#    add user script = ldapsmb -a -u "%u"
#    delete user script = ldapsmb -d -u "%u"
#    add machine script = ldapsmb -a -w "%u"
#    add group script = ldapsmb -a -g "%g"
#    delete group script = ldapsmb -d -g "%g"
#    add user to group script = ldapsmb -j -u "%u" -g "%g"
;delete user from group script = ldapsmb -j -u "%u" -g "%g"
#    set primary group script = ldapsmb -m -u "%u" -gid "%g"

#########################################################################

#    add share command = /var/lib/samba/scripts/modify_samba_config.pl
#    delete share command = /var/lib/samba/scripts/modify_samba_config.pl

#    shutdown script = ldapsmb --shutdown="%m %t %r %f"
#    abort shutdown script = ldapsmb --abortshutdown

# Syncs passwords from windows to unix. mind the local pwd limits (length 5-8)
#    passwd chat debug = Yes
#    unix password sync = True
#    passwd program = /usr/bin/passwd %u
#    passwd chat = *password* %n
 *password* %n
 *changed*

# --- winbind --- 
# Don't forget to prepare your /etc/nsswitch.conf and your /etc/pam.d files
# this will only work if you have joined your NT-domain
#    winbind separator = +
#    winbind use default domain = Yes
#    winbind cache time = 600
#    template shell = /bin/bash
#    template homedir = /home/%U
#    idmap uid = 10000-20000
#    idmap gid = 10000-20000
#    idmap backend = ldap:ldap://localhost
#    winbind enum groups = Yes
#    winbind enum users = Yes
#    security = domain
#    security = ads
# Where do we get our user information from?
#    password server = win2ksrv

# --- ldapsam --- 
# add rootpw to secrets.tdb with "smbpasswd -w secret"
#    ldap admin dn = cn=Administrator,dc=example,dc=net
#    ldap suffix = dc=example,dc=net
#    ldap machine suffix = ou=Computers
#    ldap group suffix = ou=Group
#    ldap idmap suffix = ou=Idmap
#    ldap user suffix = ou=People
;  ldap tls/ssl (yes, no (default), start_tls)
#    ldap ssl = Yes
#    ldap passwd sync = Yes

# --- Active Directory integration ---
#    realm = MY.REALM.DE
#    security = ads

# --- net usershare ---
    usershare max shares = 100
    usershare allow guests = Yes


[homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = No
    read only = No
    inherit acls = Yes

# Setup an extra share for the profiles to add extra attributes.
[profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
# Take care to mount the user homes with the option user_xattr.
    store dos attributes = Yes
    create mask = 0600
    directory mask = 0700

# Used as directory for batch or command files of the logon script parameter.
# [netlogon]
#    comment = User netlogon scripts
#    path = /var/lib/samba/netlogon
#    browseable = No

# A share to export all user directories; appropriate permissions required.
[users]
    comment = All users
    path = /home
    read only = No
    inherit acls = Yes
# Exclude a groups and other shares
    veto files = /aquota.user/groups/shares/

# Create all directories for groups below /home/groups and export this
# directries as one share
[groups]
    comment = All groups
    path = /home/groups
    read only = No
    inherit acls = Yes

# A simple PostScript to PDF converter provided to SMB clients
# This doesn't work if 'printing = cups' as it is our default.
# [pdf]
#    comment = PDF creator
#    path = /var/tmp
#    printable = Yes
#    print command = /usr/bin/smbprngenpdf -J '%J' -c %c -s %s -u '%u' -z %z
#    create mask = 0600

# The following share gives all users access to the Server's CD drive,
# assuming it is mounted under /media/cdrom.
# [cdrom]
#    comment = Linux CD-ROM
#    path = /media/cdrom
#    locking = No
# With the next two lines you could automatically mount or umount the CD if a
# connection to the share is established or closed.
#    preexec = /bin/mount /media/cdrom
#    postexec = /bin/umount /media/cdrom


[printers]
    comment = All Printers
    path = /var/tmp
# Make printers accessible without user authentication.
#    guest ok = Yes
    printable = Yes
    create mask = 0600
    browseable = No

# This share provides printer driver down- and upload in an Windows NT-style
# point-and-print way.  For more detailed information consult the Printing
# Support Section of the Samba-HOWTO-Collection.  For uploading take extra
# care to add the printer admins to the group lp.
[print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
# Make printer drivers accessible without user authentication.
#    guest ok = Yes
    write list = @ntadmin root
    force group = ntadmin
    create mask = 0664
    directory mask = 0775

Thanks for the help! :slight_smile:

On 1/17/2015 11:36 AM, Piece Maker wrote:
>
> venzkep;2689658 Wrote:
>>
>> Piece Maker;
<snip>
> The ping worked, the time was 2011ms which I dunno if that’s fast or
> slow. I can also ssh into my Suse machine, but it takes a LONG time to
> connect.
>
If this is the total time 2011ms is OK. If it is the time for individual responses, it’s horrid
<snip
>
>
> Code:
> --------------------
> SuSEfirewall2.service - SuSEfirewall2 phase 2
> Loaded: loaded (/usr/lib/systemd/system/SuSEfirewall2.service; enabled)
> Active: inactive (dead) since Sat 2015-01-17 05:25:22 GMT; 11h ago
> Main PID: 4602 (code=exited, status=0/SUCCESS)
> --------------------
>
>
> Seems to be off!
>
Yes
<snip>

> Code:
> --------------------
> smb.ssmb.service - Samba SMB Daemon
> Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled)
> Active: active (running) since Sat 2015-01-17 05:17:32 GMT; 12h ago
> Main PID: 9141 (smbd)
> Status: “smbd: ready to serve connections…”
> CGroup: /system.slice/smb.service
> ├─9141 /usr/sbin/smbd -D
> └─9142 /usr/sbin/smbd -D
> --------------------
>
>
>
> Code:
> --------------------
> nmb.service - Samba NMB Daemon
> Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled)
> Active: active (running) since Sat 2015-01-17 05:24:01 GMT; 12h ago
> Main PID: 30232 (nmbd)
> Status: “nmbd: ready to serve connections…”
> CGroup: /system.slice/nmb.service
> └─30232 /usr/sbin/nmbd -D
> --------------------

Good!
>
> This is an smb.conf I stole off a friend ‘just to test’ -
>
>
> Code:
> --------------------
> [global]
> server string = %h server (Samba, Ubuntu)
> map to guest = Bad User
> obey pam restrictions = yes
> pam password change = yes
> passwd program = /usr/bin/passwd %u
> passwd chat = enter/snew/s/spasswrd:* %n
Retype/snew/s/spassword:* %n
password/supdated\ssuccessfully .
> unix password sync = yes
> syslog = o
> log file = /var/log/samba/log.%m
> max log size = 1000
> dns proxy = no
> usershare allow guest = yes
> panic action = /usr/share/samba/panic-action %d
> usershare allow guests = Yes
> wins support = No
> usershare max shares = 100
> security = domain
> ldap admin dn =
> passdb backend = smbpasswd
> wins server =
> workgroup = WORKGROUP
>
<snip>

This can not work. “security = domain” should only be used on a member server of an NT or Samba Domain. NEVER on a
simple workgroup setup. You also have the password backend set to smbpasswd. This is a clear texf file and unless you
reran smbpasswd with this config file it will be empty. The original config used the tdb backend.

>
> This is the smb.conf I was trying before that - it’s basically stock,
> except for ticking the usershare boxes in Yast.

This looks fairly good. There is a bit of extra stuff that does no harm and with the defaults it should work.
With the comments removed, this is what I found.

> [global]

> workgroup = WORKGROUP
> passdb backend = tdbsam
> printing = cups
> printcap name = cup
> 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 max shares = 100
> usershare allow guests = Yes
>
>
> [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
> --------------------

> Thanks for the help! :slight_smile:

Your original samb.conf should have worked fairly well. There may have been some name resolution problems and I would
suggest you add to the [global] section the following parameter:


name resolve order = bcast host lmhosts

By default broad casts (bcast) are last and often name resolution fails before you get that far.
That could be the cause of this error:

Code:

protocol negotiation failed: NT_STATUS_IO_TIMEOUT

If you were using IP it could be something else. Have you disabled AppArmor for testing purposes?
Use your original smb.conf with the above name resolve parameter added. Then post the results of:


smbclient -L <IP of Server>
smbclient -L <ServerName>

When asked for a password use the smbpasswd of the user that executes the command.
Run these on both the client and server. Post the exact results not a summary.
By default the > is the same as the host name(first part of the DNS name) so long as it conforms to netbios
standards (up to 15 ASCII characters). If the host name does not comply you can add a netbios name. To add the name in
the [global] section of /etc/samba/smb.conf add the parameter:


netbios name = <MYSERVER>

Once you can contact the server we can work on the shares.

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

Alright, I’ve added that and restarted smb.service.

If you were using IP it could be something else. Have you disabled AppArmor for testing purposes?

I have, though it isn’t disabled right now. I’ll do that before going further!

Use your original smb.conf with the above name resolve parameter added. Then post the results of:

smbclient -L
smbclient -L

When asked for a password use the smbpasswd of the user that executes the command.
Run these on both the client and server. Post the exact results not a summary.
By default the > is the same as the host name(first part of the DNS name) so long as it conforms to netbios
standards (up to 15 ASCII characters).

I’m not giving you a summary here, this is exactly the output of trying the smbclient command on both my laptop and the desktop supposedly running the samba shares -


Enter eddie's password: 
protocol negotiation failed: NT_STATUS_IO_TIMEOUT

Nothing else is outputted. I should note that this happens no matter what I type in at the password prompt (IE. if I intentionally type it wrong/leave it blank).

On 1/17/2015 7:16 PM, Piece Maker wrote:
>
> venzkep;2689761 Wrote:
>>
>> Your original samb.conf should have worked fairly well. There may have
>> been some name resolution problems and I would
>> suggest you add to the [global] section the following parameter:
>>>
> Code:
> --------------------
> > >
> > name resolve order = bcast host lmhosts
> >
> --------------------
>>>
>> By default broad casts (bcast) are last and often name resolution
>> fails before you get that far.
>> That could be the cause of this error:
>
> Alright, I’ve added that and restarted smb.service.
>
>
>> If you were using IP it could be something else. Have you disabled
>> AppArmor for testing purposes?
>
> I have, though it isn’t disabled right now. I’ll do that before going
> further!
>
>> Use your original smb.conf with the above name resolve parameter added.
>> Then post the results of:
>>>
> Code:
> --------------------
> > >
> > smbclient -L <IP of Server>
> > smbclient -L <ServerName>
> >
> --------------------
>>>
>> When asked for a password use the smbpasswd of the user that executes
>> the command.
>> Run these on both the client and server. Post the exact results not a
>> summary.
>> By default the <ServerName>> is the same as the host name(first part
>> of the DNS name) so long as it conforms to netbios
>> standards (up to 15 ASCII characters).
>
> I’m not giving you a summary here, this is exactly the output of trying
> the smbclient command on both my laptop and the desktop supposedly
> running the samba shares -
>
>
> Code:
> --------------------
>
> Enter eddie’s password:
> protocol negotiation failed: NT_STATUS_IO_TIMEOUT
> --------------------
>
>
> Nothing else is outputted. I should note that this happens no matter
> what I type in at the password prompt (IE. if I intentionally type it
> wrong/leave it blank).
>
>
I assume you went back to the original smb.conf save the one parameter. Is that correct?

I am puzzled if this fails on the desktop itself using its own IP and with AppArmor disabled.

Can you verify that with AppArmor disabled, using the desktop itself and the desktop’s IP, that the smbclient command fails?
This is what happens when I try it.


venzke@euler3:~> smbclient -L 192.168.0.104
Enter venzke's password:
Domain=[MYDOMAIN] OS=] Server=]

Sharename       Type      Comment
---------       ----      -------
print$          Disk      Printer Drivers
IPC$            IPC       IPC Service (Samba on euler3)
BrotherHL4570CDW Printer   Color Laser
venzke          Disk      Home Directories
Domain=[MSHOME] OS=] Server=]

Server               Comment
---------            -------

Workgroup            Master
---------            -------
venzke@euler3:~>

Even if I give smbclient a bad password or a bad IP there is not a time_out error


venzke@euler3:~> smbclient -L 192.168.0.104
Enter venzke's password:
session setup failed: NT_STATUS_LOGON_FAILURE
venzke@euler3:~> ^C
venzke@euler3:~> smbclient -L 192.168.0.8
Enter venzke's password:
Connection to 192.168.0.8 failed (Error NT_STATUS_HOST_UNREACHABLE)
venzke@euler3:~>


With no firewall, AppArmor disabled and smbd started you should get something besides a time_out error on the desktop
itself. Maybe it’s time to reinstall the Samba package.

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

Yes, I installed samba-doc, and copied /usr/share/doc/packages/samba/examples/smb.conf.SUSE over to /etc/samba/smb.conf, which gave me a ‘stock’ smb.conf, and then ticked the two usershare boxes in Yast. I’ve also tried unticking them just to make sure it’s not that…

Can you verify that with AppArmor disabled, using the desktop itself and the desktop’s IP, that the smbclient command fails?

With no firewall, AppArmor disabled and smbd started you should get something besides a time_out error on the desktop
itself. Maybe it’s time to reinstall the Samba package.

Yes that’s exactly what’s happening! :slight_smile:

Would reinstalling Samba be enough? Is there anything extra I’d need to do to clear any (apparently bad) configurations, besides smb.conf?

would a simple zypper in samba be enough? I’m not really well-versed on Zypper and all its magic flags yet… :shame:

Alright, so I went into Software Management and pretty much removed (and then re-installed) every package with the word ‘samba’ in it, between doing so I removed everything in /etc/samba/ and then re-copied the smb.conf.SUSE file back into it (changing the name to smb.conf). I’ve rebooted, gone into Yast and just allowed it to start up Samba again, checked that smb.service is running (it is) and!..

Still the same error when I try to connect from a client.

Could this possibly be a problem outside of Samba? I wouldn’t even know where to start checking for this though. We already checked the Firewall (it’s turned off), we’ve checked AppArmor (turned off), and I can ping my PC as well as SSH into it, so presumably the network card isn’t at fault.

On 1/18/2015 1:36 PM, Piece Maker wrote:
>
> Alright, so I went into Software Management and pretty much removed (and
> then re-installed) every package with the word ‘samba’ in it, between
> doing so I removed everything in /etc/samba/ and then re-copied the
> smb.conf.SUSE file back into it (changing the name to smb.conf). I’ve
> rebooted, gone into Yast and just allowed it to start up Samba again,
> checked that smb.service is running (it is) and!..
>
> Still the same error when I try to connect from a client.
>
> Could this possibly be a problem outside of Samba? I wouldn’t even
> know where to start checking for this though. We already checked the
> Firewall (it’s turned off), we’ve checked AppArmor (turned off), and I
> can ping my PC as well as SSH into it, so presumably the network card
> isn’t at fault.
>
>
I’m still not clear if you receive the timeout error on the server(desktop) itself. I’ve asked that you check from the
desktop just so that we know what to be looking at. If the timeout only occurs on the client it could be a firewall on
the client, wrong subnet, failing cables/switches, IPv4/IPv6 problem or name resolution to name a few. Each of these
can be checked, but we first need to know that samba can contact itself. Otherwise there is no use looking at any of
the other possibilities.


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

Sorry yes - I get the same TIMEOUT error when I run smbclient -L ipaddress whether it’s from the same machine as the Server is on, or my laptop, or any other PC on the network. When running the smbclient command on the computer the server is running on, I have both tried putting the IP address, the word ‘localhost’, and the HOSTNAME of the machine (which is simply LINUX).

On 1/18/2015 4:16 PM, Piece Maker wrote:
>
> Sorry yes - I get the same TIMEOUT error when I run smbclient -L
> ipaddress whether it’s from the same machine as the Server is on, or
> my laptop, or any other PC on the network. When running the smbclient
> command on the computer the server is running on, I have both tried
> putting the IP address, the word ‘localhost’, and the HOSTNAME of the
> machine (which is simply LINUX).
>
>
Have you ever changed the default security settings in /etc/sysconfig/security from easy to either secure or paranoid?
That might stop smb from responding.

You have changed smb.conf again but I doubt you could have Samba so miss configured that it does not respond to itself.
The very first smb.conf should have been good. At least one of two the smb.conf files in the docs is unlikely to work
very well for you.

Just in case the timeout error is miss leading on your system, try his HowTo.

http://swerdna.dyndns.org/suselanprimer.html

It is a bit old but known to work. Since it was written there have been some minor changes in YaST and of course
systemd is now used to start/stop the services. Use the smb.conf given there and go through all the steps including
adding users.

If you follow this exactly and still get the timeout error, I have no more ideas.


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