[root@sambaserver samba]# ls

lmhosts  mapeamento.txt  smb.conf  smb.conf.example 



yum install samba samba-client samba common


configuração smb.conf


 systemctl enable smb.service   >> startar o server samba

 systemctl enable nmb.service   >> startar o netbios (resolve os nomes no dominio windows)

 systemctl restart smb.service

 systemctl restart nmb.service

                                                                                                                                                    

[root@sambaserver samba]# ls

lmhosts  mapeamento.txt  smb.conf  smb.conf.example

[root@sambaserver samba]# nano smb.conf

  GNU nano 2.9.8                                                                                                               smb.conf                                                                                                                         


# See smb.conf.example for a more detailed config file or

# read the smb.conf manpage.

# Run 'testparm' to verify the config is correct after

# you modified it.


[global]

        workgroup = windows

        security = user

        netbios name = lucasserver

        username map = /etc/samba/mapeamento.txt

        interfaces = enp0s3 192.168.15.0/255.255.255.0

        map to guest = bad user

        log level = 3

        log file = /var/log/samba/log%m.log

        max log size = 10


[demo]

        comment - compartilhamento

        path = /home/demo

        hosts allow = 127.0.0.1 192.168.15.0/24

        valid users = @admin, lucas

        writeable = YES


[publico]

        

        comment = compartilhammento

        directory = /home/publico

        read only = no

        guest ok = yes

        guest only = yes

        force user = nobody

        create mode = 0766

        directory mode = 0755


[downloads]


        comment = downloads

        path = /home/downloads

        hosts allow = 127.0.0.1 192.168.15.0/24

        valid users = @admin, lucas

        writeable = YES



[Homes]

        writeable = yes

        browseable  = no