Aim
Trying to access Samba share from my RPi to all other machines within my LAN. If it's any help, my Samba version is 3.6.6.
Problem
The RPi is not showing up anywhere within the "Network" area of my Windows machines. I can not access the share by IP, either. However, I can of course ping both ways. I am greeted with the following message when I attempt to connect via IP:
The mapped network drive could not be created because the following error has occured: The account is not authorised for log in from this station.
Please see smb.conf
file below.
[global]
wins support = yes
workgroup = WORKGROUP
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
encrypt passwords = no
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S
[sharename]
comment = USB Share
path = /mnt/disk1
writable = Yes
only guest = Yes
create mask = 0777
directory mask = 0777
browseable = Yes
public = Yes
only guest = No
root@codaamok:/etc/samba#
Note
I have restart the Samba service, and I have tried \192円.168.0.5\sharename
. I feel I am missing something very important within my config file, although this is hardly a modification from default (other than the [sharename]
) which has worked before with no problem. If there is anything different between this time and the last, it would be that I actually upgraded to the latest wolfram-engine, whereas last time I didn't.
Also, /mnt/disk1 (including its parent) have 1777
permissions.
2 Answers 2
I managed to resolve my issue by not using the configuration file I used in my original post. I used the original (you can restore yours to default by copying a copy of the original from /usr/share/samba/smb.conf
) and made two modifications, detailed below:
####### Authentication #######
# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
security = user
# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = yes
As you can see, I uncommented tag security
attribute and flipped the value of the encrypt passwords
from no
to yes
- this is a requirement if you wish to access your Samba share from a Windows machine (according to the manual, and my anecdotal experience obviously, hence why I've got it working.
Obviously, don't forget to include your share's attributes at the utmost bottom of the smb.conf
file.
-
Nowadays the
encrypt passwords = yes
argument is not used by smbd and needs to be replaced withsmb encrypt = required
. You can check what valid arguments are being extracted fromsmb.conf
by runningtestparm
.sebpardo– sebpardo2020年04月27日 12:38:15 +00:00Commented Apr 27, 2020 at 12:38 -
@sebpardo I have no doubt that things have changed since 6 years ago :-) click "improve this answer" or reply with your own.codaamok– codaamok2020年04月28日 13:26:46 +00:00Commented Apr 28, 2020 at 13:26
I had the same issue and resolved it by changing the following in /etc/samba/smb.conf
:
[global]
dns proxy=Yes
Explore related questions
See similar questions with these tags.
192.168.0.5
looks suspicious, there should not be '0' or '255' in IP address.security = user
. For some reason without this directive it did not enable me to see the share from Windows. Thanks anyway.