G
G
Gennady2015-02-06 09:50:22
Samba
Gennady, 2015-02-06 09:50:22

How to make access to samba folders with a password?

I can't figure out why I can't access a folder shared with Samba (on ubuntu 12.04).
I added a user to Samba using smbpasswd I
also added a user to the sambashare group.
There is a folder with guest access, I can go there, I can write files.
And if I create and share a folder, for access with a password, it says "No access to ... Perhaps you do not have rights to connect to this resource" (I connect from the windows of the machine)
I rummaged through all the logs, records about unsuccessful authorization or something like that found. Please help
smb.conf

[global]
   workgroup = WORKGROUP

   server string = %h server (Samba, Ubuntu)
   dns proxy = no
   log file = /var/log/samba/log.%m

   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   security = user
   encrypt passwords = true
   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
;   domain logons = yes
;   logon path = \\%N\profiles\%U

;   logon drive = H:

;   logon script = logon.cmd

; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d                                                                                                                                                              /var/lib/samba -s /bin/false %u

; add group script = /usr/sbin/addgroup --force-badname %g

;   printing = bsd
;   printcap name = /etc/printcap

;   printing = cups
;   printcap name = cups


;   include = /home/samba/etc/smb.conf.%m


;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &


;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash

;   winbind enum groups = yes
;   winbind enum users = yes


;   usershare max shares = 100

   usershare allow guests = yes


;[homes]
;   comment = Home Directories
;   browseable = no

;   read only = yes

;   create mask = 0700
;   directory mask = 0700
;   valid users = %S
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
;   write list = root, @lpadmin

;[cdrom]
;   comment = Samba server's CD-ROM
;   read only = yes
;   locking = no
;   path = /cdrom
;   guest ok = yes
;   preexec = /bin/mount /cdrom
;   postexec = /bin/umount /cdrom

[public]
comment = 320gb
browseable = yes
read only = no
public = yes
path = /media/sdc/public
guest ok = yes

[disk80]
comment = 80gb
browseable = yes
read only = no
path = /media/sdb/disk80
valid users = "user"
write list = "user"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor, 2015-02-06
@merryjane

Added user to Samba using smbpasswd

Is the user really active?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question