Samba share ger "åtkomst nekad"
God kväll,
Har suttit och försökt att få min samba share att fungera men utan resultat trots att jag följt instruktioner i diverse guider och trådar om liknande problem så jag skulle uppskatta lite hjälp med detta. OS på serversidan är Ubuntu Server 14.04 och Windows 7 på klientsidan.
Jag har försökt att skapa en samba share där alla har läs och skriv rättigheter och utan lösenord. Detta har jag gjort med följande kommandon:
sudo chmod a=rw -R /mnt/partition1
sudo chown nobody:nogroup Folder1/
där partition1 är min mount för partitionen som min share ligger på, Folder1 är mappen som ska delas ut. I Webmin så står det att Folder1 har läs- och skrivrättigheter till alla. I nuläget kan jag se min share från Windows 7 och ansluta den som en nätverksenhet men när jag försöker gå in på den så får jag meddelandet "Z:\ är inte tillgänglig, Åtkomst nekad". Jag har testat med en rad olika konfigurationer i smb.conf men inga av dessa har hjälpt hittills. Detta är min nuvarande konfig:
[global]
workgroup = WORKGROUP
netbios name = homeserver
security = user
# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
wins support = yes
# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no
# What naming service and in what order should we use to resolve host names
# to IP addresses
name resolve order = lmhosts host wins bcast
#### 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
# 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
# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = true
# 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
guest account = nobody
invalid users = root
# 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 <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
pam password change = yes
# This option controls how nsuccessful authentication attempts are mapped
# to anonymous connections
map to guest = bad user
# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY
# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
usershare allow guests = yes
[printers]
comment = All Printers
browseable = yes
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700
# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
[Folder1]
path = /mnt/partition1/Folder1
read only = no
guest ok = yes
valid users = nobody
directory mask=0777
men jag har försökt med något så simpelt som:
[global]
workgroup = WORKGROUP
server string = Media Server
security = user
map to guest = Bad User
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = no
[Folder1]
path = /mnt/partition1/Folder1
public = yes
only guest = yes
writable = yes
Men det vill inte fungera ens med den enkla konfigfilen. Har även lagt till att Windows ska använda NetBIOS över TCP/IP. Innan jag skapade min share så körde jag endast en printserver via samba och där hade jag inga problem med rättigheter.
All hjälp uppskattas