você está aqui: Home  → Arquivo de Mensagens

Configurando seu servidor Samba no Linux

Colaboração: Alexis Alves

Data de Publicação: 12 de Novembro de 2004

Aprendendo a Configurar seu Servidor SMB (Samba) para Redes Microsoft (Windows), no estilo share tanto para o compartilhamento de arquivos e hospedar aplicativos em clipper para sua Lan.

Primeiramente verefique se todos os pacotes do samba estao instalados, utilize o comando rpm -q para localizar se realmente estao instalados: (No caso estou utilizando a distro Fedora Core 2)

  [root@linux fe]# rpm -q samba-*
  samba-3.0.3-5

Entre agora no diretorio "/etc/samba/", e edite o arquivo "smb.conf":

Veja como o meu "smb.conf" esta configurado:

Comentarei apenas as linhas de maior importancia para o funcionamento basico do servidor samba.

  #============================================================
  #     Arquivo de Configuracao do Servidor Samba             #
  #        para redes Microsoft (Windows)                     #
  #        Autor: alexis.alves@GLOBO.COM                      #
  #============================================================
  #Esta parte Define as configuracoes Globais do servidor samba
  
  [global]
         coding system =
         client code page = 850
         workgroup = NETWORKSMB      #GRUPO de Trabalho netbios
         netbios name = CPD          #NOME netbios de sua maquina
         netbios aliases =
         netbios scope =
         server string = Linux:.Server    #Comentario de sua maquina
         bind interfaces only = No
         interfaces = eth0, 192.168.0.0/255.255.255.0 #Lan
         security = SHARE #Compartilhamento
         encrypt passwords = Yes
         update encrypted = No
         allow trusted domains = Yes
         hosts equiv =
         min password length = 5
         map to guest = Bad User
         null passwords = No
         password server =
         smb passwd file = /etc/smbpasswd
         root directory = /
         passwd program = /bin/passwd
         passwd chat = *new*password* %n\n *new*password* %n\n
  *changed*
         passwd chat debug = No
         username map =
         password level = 0
         username level = 0
         unix password sync = No
         restrict anonymous = No
         use rhosts = No
         debug level = 1
         syslog = 1
         syslog only = No
         log file =
         max log size = 5000
         debug timestamp = Yes
         debug hires timestamp = No
         debug pid = No
         debug uid = No
         protocol = NT1
         read bmpx = No
         read raw = Yes
         write raw = Yes
         nt smb support = Yes
         nt pipe support = Yes
         nt acl support = Yes
         announce version = 4.2
         announce as = NT
         max mux = 50
         max xmit = 65535
         name resolve order = lmhosts host wins bcast
         max ttl = 259200
         max wins ttl = 518400
         min wins ttl = 21600
         time server = No
         change notify timeout = 60
         deadtime = 0
         getwd cache = Yes
         keepalive = 30
         lpq cache time = 10
         max disk size = 0
         max open files = 10000
         read prediction = Yes
         read size = 16384
         shared mem size = 1048576
         socket options = IPTOS_LOWDELAY TCP_NODELAY
         stat cache size = 50
         load printers = Yes
         printcap name = /etc/printcap
         printer driver file = /etc/printers.def
         strip dot = No
         character set =
         mangled stack = 50
         stat cache = Yes
         domain groups =
         domain admin group =
         domain guest group =
         domain admin users =
         domain guest users =
         machine password timeout = 604800
         add user script =
         delete user script =
         logon script =
         logon path = \\%N\%U\profile
         logon drive =
         logon home = \\%N\%U
         domain logons = Yes
         os level = 65
         lm announce = Auto
         lm interval = 60
         preferred master = No
         local master = Yes
         domain master = Yes
         browse list = Yes
         dns proxy = Yes
         wins proxy = No
         wins server = Yes #opcao de Wins server
         wins support = Yes
         wins hook = No
         kernel oplocks = No
         ole locking compatibility = Yes
         oplock break wait time = 10
         smbrun = /usr/bin/smbrun
         config file =
         auto services =
         lock directory = /var/lock/samba
         default service =
         message command =
         dfree command =
         valid chars =
         remote announce =
         remote browse sync =
         socket address = 0.0.0.0
         homedir map =
         time offset = 0
         unix realname = No
         NIS homedir = No
         source environment =
         panic action =
         comment =
         path =
         revalidate = No
         username =
         guest account = nobody
         invalid users =
         valid users =
         admin users =
         read list =
         write list =
         force user =
         force group =
         writeable = Yes
         create mask = 0744
         force create mode = 00
         security mask = -1
         force security mode = -1
         directory mask = 0755
         force directory mode = 00
         directory security mask = -1
         force directory security mode = -1
         inherit permissions = No
         guest only = No
         guest ok = Yes #Convidados ok
         only user = No
         hosts allow =
         hosts deny =
         status = Yes
         max connections = 0
         min print space = 0
         strict sync = No
         sync always = No
         write cache size = 0
         printable = No
         postscript = No
         printing = bsd
         print command = lpr -r -P%p %s
         lpq command = lpq -P%p
         lprm command = lprm -P%p %j
         lppause command =
         lpresume command =
         queuepause command =
         queueresume command =
         printer =
         printer driver = NULL
         printer driver location =
         default case = lower
         case sensitive = No
         preserve case = Yes
         short preserve case = Yes
         mangle case = No
         mangling char = ~
         hide dot files = Yes
         delete veto files = No
         veto files =
         hide files =
         veto oplock files =
         map system = No
         map hidden = No
         map archive = Yes
         mangled names = Yes
         mangled map =
         browseable = Yes
         blocking locks = Yes
         fake oplocks = No
         locking = Yes
         oplocks = Yes
         level2 oplocks = No
         oplock contention limit = 2
         strict locking = No
         share modes = Yes
         copy =
         include =
         preexec =
         preexec close = No
         postexec =
         root preexec =
         root preexec close = No
         root postexec =
         available = Yes
         volume =
         fstype = NTFS
         set directory = No
         wide links = Yes
         follow symlinks = Yes
         dont descend =
         magic script =
         magic output =
         delete readonly = No
         dos filetimes = No
         dos filetime resolution = No
         fake directory create times = No
         public = yes #Publico
  #==============================================================================
  #Nesta Parte Define um compartilhamento
  #Crie o diretorio "/home/samba" e sete a permissao "chmod 777 -Rvf"
  #==============================================================================
  [Linux]
         path = /home/Samba                #Pasta que esta Sendo Compartilhada
         comment = Programa de Fluxo       #Comentario da Pasta
         writeable = Yes                   #Se podera gravar
         create mask = 0750              #Mascara do compartilhamento
         hide dot files = No
         dos filetime resolution = Yes   #arquivos em dos
         public = yes            #Diretorio publico
         guest ok = yes          #aceitar convidados
         printable = No          #Impressoras compartilhadas
  #==============================================================================

Salve o arquivo de configuracao do servidor samba e inicie o servico com o comando "service smb start", para o servico esta disponivel na inicializacao do sistema execute o comando "ntsysv" e marque com um "*" o servico "smb".



Veja a relação completa dos artigos de Alexis Alves

 

 

Opinião dos Leitores

Seja o primeiro a comentar este artigo
*Nome:
Email:
Me notifique sobre novos comentários nessa página
Oculte meu email
*Texto:
 
  Para publicar seu comentário, digite o código contido na imagem acima
 


Powered by Scriptsmill Comments Script