# Samba upgrade from 3.6 to 4.4 not going as planned



## RevennaFox (Mar 23, 2017)

Alright, so I'm upgrading my file server from Samba 3.6 to 4.4 (yeah I know, I'm a slacker) and I seem to have hit a brick wall.
The way it was setup before was an open (_SHARE _security in Samba) file server with two shares mapped to the same user: server. This is what my 3.6 config file looked like:

```
[global]
   server string = MAINFRAME
   interfaces = re0
   security = SHARE
   guest account = server
   log file = /usr/local/samba/var/log.%m
   max log size = 50
   dns proxy = No
   idmap config * : backend = tdb
   valid users = server
   admin users = server
   read list = server
   write list = server
   hosts allow = 10.0.0., 127.

[files]
   comment = File Services
   path = /usr/home/server/FILE_SHARE
   read only = No
   guest ok = Yes

[bulk]
   comment = Video and Bulk Data
   path = /usr/home/server/BULK_STORAGE
   read only = No
   guest ok = Yes
```
Here's the smb4.conf file I have so far:

```
[global]
workgroup = WORKGROUP
netbios name = MAINFRAME
map to guest = Bad User

[files]
path /usr/home/server/FILE_SHARE
read only = no
guest ok = yes

[bulk]
path /usr/home/server/BULK_STORAGE
read only = no
guest ok = yes
```
This passes the sanity check, but when I navigate to \\MAINFRAME on a Windows machine, I don't see any shares. If I try typing the full path of the share like \\MAINFRAME\files it just times out. I also tried setting it up with guest ok = no, then adding the server user with `smbpasswd -a server` then `smbpasswd -e server` but I still get the same thing, it just asks me for a password before it times out. What am I doing wrong here?


----------



## SirDice (Mar 23, 2017)

This is what I use on my home server:

```
[Media]
   comment = Media Files
   path = /storage/media
   browseable = yes
   writable = no
   read only = yes
   guest ok = yes

[Storage]
   comment = Mass Storage
   path = /storage
   browseable = yes
   writable = yes
   valid users = dice
   guest ok = no
```

This configuration hasn't changed significantly since 3.old (can't remember when I set this up) and is currently used for Samba 4.4.

But I am using user security:

```
[global]
   workgroup = DICELAN
   server string = Samba Server
   security = user

   log file = /var/log/samba4/log.%m
   max log size = 50

   smb ports = 445

   local master = yes
   preferred master = yes
   os level = 65

   interfaces = 192.168.10.190/24

   bind interfaces only = no
```


----------



## diizzy (Mar 27, 2017)

/usr/local/etc/rc.conf

This includes specific zfs options...


```
[global]
workgroup = mynetwork
server string = Storage Server Rudolf
security = user
preferred master = yes
reset on zero vc = yes
log file = /var/log/samba.log
max log size = 10240
dns proxy = no
bind interfaces only = true
interfaces = em0
server services = s3fs smb
disable netbios = yes
server max protocol = SMB3
directory name cache size = 0
load printers = no
disable spoolss = yes
printing = bsd
printcap name = /dev/null
unix extensions = no
nt acl support  = yes
inherit acls = no
map acl inherit = yes
;use sendfile = yes

[pubdata]
comment = Rudolf Storage Pool PubData
path = /array0/pubdata
public = yes
guest ok = yes
writable = yes
write list = userwithwriteaccess
browseable = yes
create mask = 0775
vfs objects = zfsacl
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = yes
```

/etc/rc.conf

```
samba_server_enable="YES"
smbd_enable="YES"
nmbd_enable="NO"
```
Works like a charm on 4.4


----------

