Showing posts with label samba. Show all posts
Showing posts with label samba. Show all posts

19 March 2019

Samba shares not showing up on Windows 10

I had an issue where my samba shares and printers stopped showing up on my Windows 10 machines. After doing some research, it seems to be due to Windows 10 disabling SMBv1 due to security concerns.
https://support.microsoft.com/en-us/help/4034314/smbv1-is-not-installed-by-default-in-windows

Now, I could just re-enable this, but I decided that wasn't the best idea due to the security concerns. However, if you want to here is the Microsoft support article about how to do it.
https://support.microsoft.com/en-us/help/2696547/how-to-detect-enable-and-disable-smbv1-smbv2-and-smbv3-in-windows-and

This forum thread (https://ubuntuforums.org/showthread.php?t=2409183) pointed me to a python package on github that enabled me to have my linux box show up on my Windows 10 machines. https://github.com/christgau/wsdd

Here are the steps that I used to install it on Ubuntu 14.04 that uses upstart:

  • git clone https://github.com/christgau/wsdd.git
  • cd wsdd
  • sudo cp src/wsdd.py /usr/local/bin/wsdd
  • sudo vi /etc/init/wsdd.conf
  • sudo initctl start wsdd

Check that it is running as an unprivileged user:

  • sudo initctl status wsdd
  • ps aux | grep wsdd

Contents of wsdd.conf:
# Windows Discovery

description  "WSDD Server"

start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]

respawn
respawn limit 2 5

kill timeout 300

exec start-stop-daemon --start --chuid nobody --exec /usr/local/bin/wsdd

19 December 2010

SAMBA and XP

I was trying to setup public shares (including a printer) and user secured shares on SAMBA, but kept running into problems where XP would not authenticate to the shares.


The first problem was an oversight on my part. I had 2 security settings in my [global] space.


[global]
security = user
.
.
.
security = share



The second problem was actually with XP. It was storing the guest password. I actually had to remove the stored shares using the command line.


net use \\192.168.1.10\jeff /delete




Here is my final smb.conf file:

[global]
security = user
username map = /etc/samba/smbusers
smb passwd file = /etc/samba/smbpasswd
guest ok = yes
guest account = nobody
workgroup = LINUX
server string = Samba Server %v
log file = /var/log/samba/log.%m
max log size = 50
interfaces = lo eth0
bind interfaces only = yes
hosts allow = 127.0.0.1 192.168.1.0/24
hosts deny = 0.0.0.0/0
browseable = yes
map to guest = Bad User
domain logons = no

# follow symlinks
follow symlinks = yes
wide links = yes
unix extensions = no

#printers
printcap name = cups
printing = cups


[printers]
browseable = yes
printable = yes
public = yes
create mode = 0700
guest only = yes
use client driver = yes
path = /tmp

[homes]
comment = Home Directories
browseable = no
read only = no
create mode = 0750
guest ok = no

[nas]
comment = move to here
path = /home/nas
read only = no
public = yes
guest ok = yes

[docs]
comment = documents
path = /home/docs
read only = no
guest ok = no





Don't forget to add passwords for users and enable them:

smbpasswd -a jeff
smbpasswd -e jeff


They also need to exist in your /etc/samba/smbusers file:

jeff = "jeff"