Solved Samba44 configuring

Has anybody got Samba44 work with Windows 10? I have tried about a half-day to get it work properly. Windows explorer detecs my server, but refuses to conned. smb4.conf's workgroup is equal to Windows'.

I ran the testparm:
Code:
$ testparm
Load smb config files from /usr/local/etc/smb4.conf
Processing section "[homes]"
Processing section "[public]"
Processing section "[private]"
Processing section "[printers]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
    server string = Samba serveri
    workgroup = VEHMERI
    preferred master = Yes
    log file = /var/log/log.%m
    max log size = 50
    security = USER
    wins support = Yes
    idmap config * : backend = tdb


[homes]
    comment = Home Directories
    browseable = No
    read only = No


[public]
    comment = Public
    path = /secure/public
    create mask = 0770
    directory mask = 0770
    read only = No


[private]
    comment = Private
    path = /secure/private
    create mask = 0770
    directory mask = 0770
    read only = No
    valid users = joni
    write list = joni


[printers]
    comment = Tulostimet
    path = /var/spool/samba
    browseable = No
    printable = Yes
    guest ok = Yes

smb4.conf:
Code:
[global]
workgroup = VEHMERI
server string = Samba serveri
log file = /var/log/log.%m
max log size = 50
security = user
encrypt passwords = yes
socket options = TCP_NODELAY
preferred master = yes
wins support = yes

[homes]
comment = Home Directories
browseable = no
writeable = yes

[public]
comment = Public
path = /secure/public
public = no
writeable = yes
directory mask = 0770
create mask = 0770

[private]
comment = Private
path = /secure/private
public = no
writeable = yes
valid users = joni
write list = joni
directory mask = 0770
create mask = 0770

[printers]
comment = Tulostimet
guest ok = Yes
printable = Yes
browseable = yes
path = /var/spool/samba

I have given permissions to my account.
Code:
$ sudo chmod 770 /secure/private
$ sudo chmod 770 /secure/public
$ sudo chown joni /secure/public
$ sudo chown joni /secure/private

I also have run pdbedit to my account.
sudo pdbedit -a joni

In /etc/rc.conf I have
Code:
samba_server_enable="YES"
winbindd_enable="YES"

In Windows 10:
net use X: \\JONIBSD\public
With user joni gets error 86.

I have tried to log in as joni, joni@JONIBSD (Account domain) and joni@VEHMERI (Workgroup), but Windows says that username or password is wrong. What could I do? Is there something wrong with my smb4.conf?
 
Hi,

my config is working well with Windows 10 and Windows 8.1, please see below:
Code:
[global]
   workgroup = YOURWGNAME
   netbios name = SOMENAME
   server string = %h server (Samba, FreeBSD)
   security = user
   encrypt passwords = yes
   map to guest = bad user
   guest account = nobody
   hosts allow = 192.168.200. 127.
   load printers = no
   printing = bsd
   printcap name = /dev/null
   disable spoolss = yes
   obey pam restrictions = yes
   dns proxy = no
   log file = /var/log/samba4/log.%m
   log level = 1
   max log size = 1000
   server role = standalone server
   passdb backend = tdbsam
   invalid users = root
   usershare allow guests = yes

[homes]
   comment = Home Directory for %U
   browseable = no
   read only = no
   create mask = 0600
   directory mask = 0700
   valid users = %S
   vfs object = recycle
   recycle:repository = .trash
   recycle:keeptree = yes
   recycle:versions = yes
   recycle:maxsize = 104857600
   recycle:exclude = *.tmp, *~, *.bak, ~*.*

[public]
   comment = Public Files
   path = /var/tank/www
   read only = yes
   write list = @store
   force user = store
   guest ok = yes
   create mask = 0644
   directory mask = 0755

Things to note:
1) I created a group 'store' under which I add users for the [public] share. Members of the group are listed as usual:
Code:
store:*:1009:user1,user2
2) Users/Passwords are added with smbpasswd
3) I use the vfs object recycle to have .trash folder so that users have a recycle bin in case they accidentally delete a file.

As for keeping the password for the share in Windows Credential Manager... I personally discourage doing so because of the crypt viruses, unless you use ZFS with daily/weekly/monthly snapshots.
 
I did finaly solve this problem. The key was to map windows-live accounts to point to the Unix accounts. This article and samba logs helped me to solve this problem. Basically you add something like this in to your smb.conf:

Code:
username map = /etc/samba/username.map

and then you create the corresponding file username.map and put something like this to the file:

Code:
smbuser1 = mywindowsliveaccount@hotmail.com
smbuser2 = mysecondwindowsliveaccount@hotmail.com

Thank you to everybody who replied in this thread. :)
 
Last edited:
Back
Top