I have a Pi in our Windows network. I created a share on my Pi. I installed samba. In /etc/samba/smb.conf there is:
[pishare] comment = Pi Shared Folder path = /home/pi browseable = yes guest ok = yes writeable = yes create mask=0777 directory mask=0777 public = no only guest = no
I created a user and password by sudo smbpasswd -a pi. When I try to access this share from a Windows machine, with using the pi name and password, I don't have access. What can be wrong?
What happens if you try public guest access (ie without needing to specify a username and password)
[cumulus] Comment = Cumulus weather station data and web pages Path = /home/pi/CumulusMX Browseable = yes Writeable = Yes only guest = no create mask = 0777 directory mask = 0777 Public = yes Guest ok = yes mangled names = no
The only significant different between your entry and mine is public=yes/no.
I notice that you have guest ok=yes. I'd have thought if you wanted to make Windows users have to specify a username/password to connect, you'd want to turn off guest access - but I may be wrong.
Mmm. Then if the daemons are running its not binding to the network maybe.
here is an smb.conf that works for my Intel server
# # Sample configuration file for the Samba suite for Debian GNU/Linux. # # # This is the main Samba configuration file. You should read the # smb.conf(5) manual page in order to understand the options listed # here. Samba has a huge number of configurable options most of which # are not shown in this example # # Some options that are often worth tuning have been included as # commented-out examples in this file. # - When such options are commented with ";", the proposed setting # differs from the default Samba behaviour # - When commented with "#", the proposed setting is the default # behaviour of Samba but the option is considered important # enough to be mentioned here # # NOTE: Whenever you modify this file you should run the command # "testparm" to check that you have not made any basic syntactic # errors.
#======================= Global Settings =======================
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of workgroup = WORKGROUP
# server string is the equivalent of the NT Description field server string = %h server (Samba, Linux Mint)
# Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable its WINS Server # wins support = no
# WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both ; wins server = w.x.y.z
# This will prevent nmbd to search for NetBIOS names through DNS. dns proxy = no
#### Networking ####
# The specific set of interfaces / networks to bind to # This can be either the interface name or an IP address/netmask; # interface names are normally preferred ; interfaces = 127.0.0.0/8 eth0
# Only bind to the named interfaces and/or networks; you must use the # 'interfaces' option above to use this. # It is recommended that you enable this feature if your Samba machine is # not protected by a firewall or is a firewall itself. However, this # option cannot handle dynamic or non-broadcast interfaces correctly. ; bind interfaces only = yes
#### Debugging/Accounting ####
# This tells Samba to use a separate log file for each machine # that connects log file = /var/log/samba/log.%m
# Cap the size of the individual log files (in KiB). max log size = 1000
# If you want Samba to only log through syslog then set the following # parameter to 'yes'. # syslog only = no
# We want Samba to log a minimum amount of information to syslog. Everything # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log # through syslog you should set the following parameter to something higher. syslog = 0
# Do something sensible when Samba crashes: mail the admin a backtrace panic action = /usr/share/samba/panic-action %d
####### Authentication #######
# Server role. Defines in which mode Samba will operate. Possible # values are "standalone server", "member server", "classic primary # domain controller", "classic backup domain controller", "active # directory domain controller". # # Most people will want "standalone sever" or "member server". # Running as "active directory domain controller" will require first # running "samba-tool domain provision" to wipe databases and create a # new domain. server role = standalone server
# If you are using encrypted passwords, Samba will need to know what # password database type you are using. ; passdb backend = tdbsam
obey pam restrictions = yes
# This boolean parameter controls whether Samba attempts to sync the Unix # password with the SMB password when the encrypted SMB password in the # passdb is changed. unix password sync = yes
# For Unix password sync to work on a Debian GNU/Linux system, the following # parameters must be set (thanks to Ian Kahan
Thanks, that worked well. There is 1 nmbd process, and 5 smbd.
I guess so. But I read that there seem to be issues with Windows 10 and the Pi.
It's quit similar to mine. A difference is wins support = yes. And the content under my share is a bit more extensive then the content under your VIDEO and LIBRARY.
I've had a bog-standard Windows 10 installation able to access shares on both Windows 7 and RasPi "servers" without any problem.
What happens if you open a DOS Command Prompt in Windows, and do
net view \\raspi
(substituting the Pi's hostname and then its IP address)
and
net use z: \\raspi\sharename
(likewise with substitutions)
That will eliminate everything to do with workgroups, and using the IP address will even eliminate NetBIOS name resolution problems.
When I installed SAMBA on my Pi, everything "just worked" when I added a suitable set of lines for a share. I don't remember having to do anything special.
After my Pi developed a serious problem with booting, I had to reinstall everything, so I made notes the second time round of what I did. I also take an image of the SD card every few months so I can go back to a working state if the boot problem (SD card corruption?) ever happens again.
My notes for SAMBA are:
Install SAMBA
formatting link
sudo apt-get update sudo apt-getupgrade sudo apt-get install samba samba-common-bin edit /etc/samba/smb.conf and create sections (as described on web page) for [pi-rec], Path=/home/pi/Videos, mangled names = no [cumulus], Path=/home/pi/CumulusMX, mangled names = no chmod 777 /home/pi/Videos (make it writable by everyone) sudo /etc/init.d/samba restart
My complete smb.conf is
# # Sample configuration file for the Samba suite for Debian GNU/Linux. # # # This is the main Samba configuration file. You should read the # smb.conf(5) manual page in order to understand the options listed # here. Samba has a huge number of configurable options most of which # are not shown in this example # # Some options that are often worth tuning have been included as # commented-out examples in this file. # - When such options are commented with ";", the proposed setting # differs from the default Samba behaviour # - When commented with "#", the proposed setting is the default # behaviour of Samba but the option is considered important # enough to be mentioned here # # NOTE: Whenever you modify this file you should run the command # "testparm" to check that you have not made any basic syntactic # errors.
#======================= Global Settings =======================
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of workgroup = WORKGROUP
# Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable its WINS Server # wins support = no
# WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both ; wins server = w.x.y.z
# This will prevent nmbd to search for NetBIOS names through DNS. dns proxy = no
#### Networking ####
# The specific set of interfaces / networks to bind to # This can be either the interface name or an IP address/netmask; # interface names are normally preferred ; interfaces = 127.0.0.0/8 eth0
# Only bind to the named interfaces and/or networks; you must use the # 'interfaces' option above to use this. # It is recommended that you enable this feature if your Samba machine is # not protected by a firewall or is a firewall itself. However, this # option cannot handle dynamic or non-broadcast interfaces correctly. ; bind interfaces only = yes
#### Debugging/Accounting ####
# This tells Samba to use a separate log file for each machine # that connects log file = /var/log/samba/log.%m
# Cap the size of the individual log files (in KiB). max log size = 1000
# If you want Samba to only log through syslog then set the following # parameter to 'yes'. # syslog only = no
# We want Samba to log a minimum amount of information to syslog. Everything # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log # through syslog you should set the following parameter to something higher. syslog = 0
# Do something sensible when Samba crashes: mail the admin a backtrace panic action = /usr/share/samba/panic-action %d
####### Authentication #######
# Server role. Defines in which mode Samba will operate. Possible # values are "standalone server", "member server", "classic primary # domain controller", "classic backup domain controller", "active # directory domain controller". # # Most people will want "standalone sever" or "member server". # Running as "active directory domain controller" will require first # running "samba-tool domain provision" to wipe databases and create a # new domain. server role = standalone server
# If you are using encrypted passwords, Samba will need to know what # password database type you are using. passdb backend = tdbsam
obey pam restrictions = yes
# This boolean parameter controls whether Samba attempts to sync the Unix # password with the SMB password when the encrypted SMB password in the # passdb is changed. unix password sync = yes
# For Unix password sync to work on a Debian GNU/Linux system, the following # parameters must be set (thanks to Ian Kahan
[C:\Program Files\JPSoft\TCCLE14x64]nbtstat -A 192.168.1.2 returns:
NetBIOS Remote Machine Name Table
Name Type Status --------------------------------------------- RASPBERRYPI UNIQUE Registered RASPBERRYPI UNIQUE Registered RASPBERRYPI UNIQUE Registered ??__MSBROWSE__? GROUP Registered WORKGROUP GROUP Registered WORKGROUP UNIQUE Registered WORKGROUP GROUP Registered
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.