Logo Hardware.com.br
Linius Torovoltis
Linius Torov... Zerinho Registrado
1.2K Mensagens 0 Curtidas

batalha brutal com samba (samba) 5 x 0 (eu) heelp!!

#1 Por Linius Torov... 24/09/2005 - 19:20
pessoal, tenho aqui varias maquinas, 5 no total..e uma com linux, que é a que eu uso, claro :mrgreen: e sempre pegava no viva o linux.com.br um modelo de smb.conf pra deixar o samba em modo share, pra eu poder acessar as maquinas windows... mas o site ta fora do ar, e eu nunca guardei seguramente esse bendito arquivo!! :cry:

alguem podia me ajudar??

flw! :mrgreen:
Linius Torovoltis
Linius Torov... Zerinho Registrado
1.2K Mensagens 0 Curtidas
#3 Por Linius Torov...
25/09/2005 - 11:06
poxa, não deu certo.. olhem meu smb.conf

quando digito smb:/ no konqueror, ele diz que não foi possivel encontrar grupos de trabalho em minha rede local... o nome do grupo é HOME , e já coloquei no workgroup...o que eu faço??




olhem meu smb.conf



# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# For a step to step guide on installing, configuring and using samba,
# read the Samba HOWTO Collection.
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: LINUX2
workgroup = HOME

# server string is the equivalent of the NT Description field
server string = Samba Server

# Security mode. Defines in which mode Samba will operate. Possible
# values are share, user, server, domain and ads. Most people will want
# user level security. See the HOWTO Collection for details.
security = share

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
#; hosts allow = 192.168.1. 192.168.2. 127.

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
load printers = yes

# you may wish to override the location of the printcap file
; printcap name = /etc/printcap

# on SystemV system setting printcap name to lpstat should allow
# you to automatically obtain a printer list from the SystemV spool
# system
; printcap name = lpstat

# It should not be necessary to specify the print system type unless
# it is non-standard. Currently supported print systems include:
# bsd, cups, sysv, plp, lprng, aix, hpux, qnx
; printing = cups

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest

# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba.%m

# Put a capping on the size of the log files (in Kb).
max log size = 50

# Use password server option only with security = server
# The argument list may include:
# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
# password server = *
#; password server =

# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
; realm = MY_REALM

# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
; passdb backend = tdbsam

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting.
# Note: Consider carefully the location in the configuration file of
# this line. The included file is read at that point.
; include = /usr/local/samba/lib/smb.conf.%m

# Most people will find that this option gives better performance.
# See the chapter 'Samba performance issues' in the Samba HOWTO Collection
# and the manual pages for details.
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
; interfaces = 192.168.12.2/24 192.168.13.2/24

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
; local master = no

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
; os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
; domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
; preferred master = yes

# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
; domain logons = yes

# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
; logon script = %m.bat
# run a specific logon batch file per username
; logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
; logon path = \\%L\Profiles\%U

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
; wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
; wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The default is NO.
dns proxy = no

# These scripts are used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
; add user script = /usr/sbin/useradd %u
; add group script = /usr/sbin/groupadd %g
; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
; delete user script = /usr/sbin/userdel %u
; delete user from group script = /usr/sbin/deluser %u %g
; delete group script = /usr/sbin/groupdel %g


#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = yes
writable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /usr/local/samba/lib/netlogon
; guest ok = yes
; writable = no
; share modes = yes


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
; path = /usr/local/samba/profiles
; browseable = no
; guest ok = yes


# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = no
printable = yes

# This one is useful for people to share files
;[tmp]
; comment = Temporary file space
; path = /tmp
; read only = no
; public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
; comment = Public Stuff
; path = /home/darktux
; public = yes
; writable = yes
; printable = no
; write list = @staff

# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
; comment = Fred's Printer
; valid users = fred
; path = /homes/fred
; printer = freds_printer
; public = no
; writable = no
; printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
; comment = Fred's Service
; path = /usr/somewhere/private
; valid users = fred
; public = no
; writable = yes
; printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
; comment = PC Directories
; path = /usr/pc/%m
; public = no
; writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
; path = /usr/somewhere/else/public
; public = yes
; only guest = yes
; writable = yes
; printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
; comment = Mary's and Fred's stuff
; path = /usr/somewhere/shared
; valid users = mary fred
; public = no
; writable = yes
; printable = no
; create mask = 0765
www.thetragedychannel.com
Orkut: http://www.orkut.com/Profile.aspx?uid=1064968487576004071

Os VERDADEIROS Terroristas e ASSASSINOS: Israel e Estados Unidos
jgama
jgama Ubbergeek Registrado
7.2K Mensagens 66 Curtidas
#4 Por jgama
25/09/2005 - 12:29
Linius Torovoltis
poxa, não deu certo.. olhem meu smb.conf

quando digito smb:/ no konqueror, ele diz que não foi possivel encontrar ...


Esta maquina não é PDC certo?

Então faz um teste.

[global]

# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = HOME

# server string is the equivalent of the NT Description field
server string = Samba Server

hosts allow = 192.168.0. 127. "verifica qual é o ip da máquina e ajusta"

# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
printcap name = cups
load printers = yes

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx, cups
printing = cups

# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).
max log size = 50

# Log level (0=none, 1=normal, 2 and above not recommended for production box)
debug level = 1

# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = share

# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
; password level = 8
; username level = 8

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd

# The following are needed to allow password changing from Windows to
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *password* %n\n *password* %n\n *success*
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
interfaces = eth0
local master = yes
os level = 33
domain master = yes
preferred master = yes
domain logons = no
logon script = %U.bat
logon path =
wins support = yes
wins proxy = yes
dns proxy = no
preserve case = no
client code page = 850
character set = ISO8859-1
preserve case = no
short preserve case = no
default case = lower

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

[netlogon]
comment = Network Logon Service
path = /home/netlogon
guest ok = yes
writable = no
share modes = no


faz um teste com o comando abaixo para verifica se existe erro no arquivo.

#testparm

Verica também se o samba está startardo
$ps -aux


faça um analise neste link que explica alguns detalher para montagem do smb.conf pode ser que tire algumas duvidas que vc tem. http://www.aplinux.com.br/?q=taxonomy/term/13

Abraço
" O DVD Pirata de hoje é a bala perdida de amanhã"
Autoria: Bárbara Gancia - Jornalista

Valdir
Sumaré - SP
Linius Torovoltis
Linius Torov... Zerinho Registrado
1.2K Mensagens 0 Curtidas
#5 Por Linius Torov...
25/09/2005 - 13:22
cara, deu certo mais ou menos...

tipo, antes de ver o post, tinha aparecido o HOME no smb:/ ai, eu entrava, e aparecia "slackware" ai quando entrava, aparecia Homes (diretorios dos usuarios) quando clicava ele pedia autenticação...

ai usei o link, copiei o smb dele e fiz umas alterações... ai apareceu "Empresa" >> "Slackware"

mas não vi "empresa nenhum no meu sb.conf!

que eu faço?

ah, nao achei nada que me ajudasse na internet.. frown.png

[global]
comment = Servidor SAMBA
workgroup = HOME
security = share
os level = 100
announce as = NT Workstation

[homes]
comment = Pastas dos Usuarios
public = yes
browseable = yes
writeable = yes
#hosts deny = 192.168.0.250

[darktux]
comment = Pandita
path = /home/darktux
public = yes
browseable = yes
#valid users = @diretoria
writeable = yes
#write list = @diretoria
force create mode = 0777
force directory mode = 0777

#[oculto$]
#comment = Especifico do Admin
#path = /home/admin/oculto
#copy = homes
#max connections = 1
www.thetragedychannel.com
Orkut: http://www.orkut.com/Profile.aspx?uid=1064968487576004071

Os VERDADEIROS Terroristas e ASSASSINOS: Israel e Estados Unidos
jgama
jgama Ubbergeek Registrado
7.2K Mensagens 66 Curtidas
#6 Por jgama
25/09/2005 - 15:47
Diga-me o que vc quer fazer com o Samba?

Ele vai ser o PDC da sua rede onde o usuarios irão logar nele em dominio?
Ele só vai fazer parte da sua rede para a máquinas Windows Encherga-lo?


Com esta configuração abaixo já era para funcionar é o basico do básico

[global]
workgroup = HOME "Troca por outro nome só para tirar uma dúvida"
netbios name = SERVIDOR #coloca o nome da sua máquina
netbios aliases = SERVIDOR #idem"
server string = Backup de Arquivos
# Acentuação
unix charset = iso8859-1
display charset = cp850
interfaces = eth0 #interface que vc esta usando na máquina"
bind interfaces only = Yes
security = SHARE #aqui somente compartilha
passdb backend = smbpasswd, guest
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
panic action = /usr/share/samba/panic-action %d
hosts allow = 192.168.0.

[homes]
comment = Diretorio do Usuario
browseable = no
writable = yes

[netlogon]
comment = Network Logon Service
path = /home/netlogon
guest ok = yes


Lembre-se de rodar demon do samba para cada alteração
# /etc/rc.d/rc.samba reload ;caso esteja usando o slackware.

Abraço
" O DVD Pirata de hoje é a bala perdida de amanhã"
Autoria: Bárbara Gancia - Jornalista

Valdir
Sumaré - SP
Linius Torovoltis
Linius Torov... Zerinho Registrado
1.2K Mensagens 0 Curtidas
#7 Por Linius Torov...
25/09/2005 - 16:21
po, não funfou....

mudei pra MSHOME o workgroup...

diz que não consegue achar grupos de trabalho na minha rede.

o samba era só pras máquinas windows me enxergarem, e eu enxergar elas, pra pegar arquivos...

a rede é roteada com um d-link.

look meu smb.conf

[global]
workgroup = MSHOME
netbios name = LINUX
netbios aliases = LINUX
server string = Backup de Arquivos
# Acentuação
unix charset = iso8859-1
display charset = cp850
interfaces = eth0 #interface que vc esta usando na máquina"
bind interfaces only = Yes
security = SHARE #aqui somente compartilha
passdb backend = smbpasswd, guest
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
panic action = /usr/share/samba/panic-action %d


[homes]
comment = Diretorio do Usuario
browseable = no
writable = yes

[netlogon]
comment = Network Logon Service
path = /home/netlogon
guest ok = yes


########################################

Flw! :mrgreen: :cry:
www.thetragedychannel.com
Orkut: http://www.orkut.com/Profile.aspx?uid=1064968487576004071

Os VERDADEIROS Terroristas e ASSASSINOS: Israel e Estados Unidos
jgama
jgama Ubbergeek Registrado
7.2K Mensagens 66 Curtidas
#8 Por jgama
25/09/2005 - 16:38
Linius Torovoltis
po, não funfou....

mudei pra MSHOME o workgroup...

diz que não consegue achar grupos de trabalho na minha rede....


Amigo, cabei de fazer um teste aqui instalei o samba numa estação com Linux e configurei o smb.conf conforme abaixo. e deu tudo certo sem problema, veja o arquivo.

# Global parameters
[global]
workgroup = JGAMASYSTEM
netbios name = KURUMIN
server string = %h server (Samba %v)
interfaces = eth0
security = SHARE
obey pam restrictions = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
name resolve order = lmhosts, host, wins, bcast
printcap name = lpstat
logon path = %Nprofiles%u
os level = 33
preferred master = No
local master = No
domain master = No
dns proxy = No
ldap ssl = no
panic action = /usr/share/samba/panic-action %d
invalid users = root
printing = cups
print command = lpr -P %p -o raw %s -r
lpq command = lpstat -o %p
lprm command = cancel %p-%j
preserve case = No
short preserve case = No
include = /etc/samba/dhcp.conf

[homes]
comment = Home Directories
create mask = 0700
directory mask = 0700
browseable = No

[printers]
comment = Todas as Impressoras
path = /var/tmp
create mask = 0700
guest ok = Yes
printable = Yes
browseable = No

[publico]
path = /home/samba_publico
read only = No
create mask = 0777


Obs: Crie os usuarios que irão acessar este server com o comando:
por exemplo:
#smbpasswd -a joao

Depois starta o samba.

Amigo tenta mais uma vez teria que dar certo.
" O DVD Pirata de hoje é a bala perdida de amanhã"
Autoria: Bárbara Gancia - Jornalista

Valdir
Sumaré - SP
Linius Torovoltis
Linius Torov... Zerinho Registrado
1.2K Mensagens 0 Curtidas
#9 Por Linius Torov...
25/09/2005 - 20:01
bom.. deu certo e não deu certo.

não mechi em necas de pitibiribas, ai quando dou "smb:/" no konqueror, ele aparece "MSHOME" ai eu clico, e o konqueror aparece uma mensagem de erro "erro interno, favor reportar o bug..blablá"

ai fui no XFFM, e ele entrou, mas pediu autenticação.. ai eu criei o user "darktux" com senha "123", com o comando q tu me deu.. mas ai ele não entra,, fica pedindo senha direto...

:cry:
www.thetragedychannel.com
Orkut: http://www.orkut.com/Profile.aspx?uid=1064968487576004071

Os VERDADEIROS Terroristas e ASSASSINOS: Israel e Estados Unidos
jgama
jgama Ubbergeek Registrado
7.2K Mensagens 66 Curtidas
#11 Por jgama
25/09/2005 - 22:48
Linius Torovoltis
eu queria sem autenticação, tem como?


Bom amigo neste momento estou numa estação com windows xp a outra estaçao estão usando que tem linux co dual boot para eu poder fazer o teste.

Mas tenta colocar no Global do seu smb.conf a tag
guest ok = yes
" O DVD Pirata de hoje é a bala perdida de amanhã"
Autoria: Bárbara Gancia - Jornalista

Valdir
Sumaré - SP
jqueiroz
jqueiroz Cyber Highlander Registrado
104K Mensagens 5.7K Curtidas
#12 Por jqueiroz
26/09/2005 - 13:12
bind interfaces only = Yes

Não use isso --- pelo menos não por enquanto.

security = SHARE #aqui somente compartilha

Também não aconselho que vc use essa opção, principalmente se sua rede não tiver máquinas Win98. Se vc só tiver máquinas Win2K ou XP, sugiro usar

security = USER

e cadastrar os usuários das máquinas de sua rede.
"chmod 777 nunca ajudou ninguém" (c) 2002-2021 JQueiroz/FGdH
Conheça o Blog do Zekke
© 1999-2024 Hardware.com.br. Todos os direitos reservados.
Imagem do Modal