Navegando neste Tópico:   1 usuários anônimos



(1) 2 »


CentOS 6.2 Acesso negado pelo samba
Just popping in
Cadastrado em:
30/4/2012 16:17
De Ribeirão Preto
Grupo:
Registered Users
Mensagens: 11
Offline
Ola pessoal procurei soluções no fórum mas não consegui resolver meu problema, por isso estou abrindo o tópico.
Estou montando um servidor de arquivos(samba) para compartilhar arquivos para estações windows. E as pastas dever ter permissão por usuário, segue o arquivo smb.conf e o log.
Reparem que o unico compartilhamento que fiz e o Rede(Partição /dev/sda montado em /media/rede) usuario que deve acessar é o laboratorio
Ja esta criado e configurado no smbpasswd.

Arquivo smb.config
# 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. This may be obtained from:
# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
#
# Many working examples of smb.conf files can be found in the
# Samba-Guide which is generated daily and can be downloaded from:
# http://www.samba.org/samba/docs/Samba-Guide.pdf
#
# 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.
#
#---------------
# SELINUX NOTES:
#
# If you want to use the useradd/groupadd family of binaries please run:
# setsebool -P samba_domain_controller on
#
# If you want to share home directories via samba please run:
# setsebool -P samba_enable_home_dirs on
#
# If you create a new directory you want to share you should mark it as
# "samba_share_t" so that selinux will let you write into it.
# Make sure not to do that on system directories as they may already have
# been marked with othe SELinux labels.
#
# Use ls -ldZ /path to see which context a directory has
#
# Set labels only on directories you created!
# To set a label use the following: chcon -t samba_share_t /path
#
# If you need to share a system created directory you can use one of the
# following (read-only/read-write):
# setsebool -P samba_export_all_ro on
# or
# setsebool -P samba_export_all_rw on
#
# If you want to run scripts (preexec/root prexec/print command/...) please
# put them into the /var/lib/samba/scripts directory so that smbd will be
# allowed to run them.
# Make sure you COPY them and not MOVE them so that the right SELinux context
# is applied, to check all is ok use restorecon -R -v /var/lib/samba/scripts
#
#--------------
#
#======================= Global Settings =====================================

[global]

# ----------------------- Network Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
workgroup = MYGROUP
server string = Samba Server Version %v

; netbios name = MYSERVER

; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.

# --------------------------- Logging Options -----------------------------
#
# Log File let you specify where to put logs and how to split them up.
#
# Max Log Size let you specify the max size log files should reach

# logs split per machine
log file = /var/log/samba/log.%m
# max 50KB per log file, then rotate
max log size = 50

# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# 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.

security = user
passdb backend = tdbsam


# ----------------------- Domain Members Options ------------------------
#
# Security must be set to domain or ads
#
# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
#
# 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.
#
# Use password server option only with security = server or if you can't
# use the DNS to locate Domain Controllers
# 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 = *


; security = domain
; passdb backend = tdbsam
; realm = MY_REALM

; password server = <NT-Server-Name>

# ----------------------- Domain Controller Options ------------------------
#
# Security must be set to user for domain controllers
#
# 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.
#
# 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 Logons let Samba be a domain logon server for Windows workstations.
#
# Logon Scrpit let yuou specify a script to be run at login time on the client
# You need to provide it in a share called NETLOGON
#
# Logon Path let you specify where user profiles are stored (UNC path)
#
# Various scripts can be used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
#
; security = user
; passdb backend = tdbsam

; domain master = yes
; domain logons = yes

# the login script name depends on the machine name
; logon script = %m.bat
# the login script name depends on the unix user used
; logon script = %u.bat
; logon path = \\%L\Profiles\%u
# disables profiles support by specifing an empty path
; logon path =

; add user script = /usr/sbin/useradd "%u" -n -g users
; add group script = /usr/sbin/groupadd "%g"
; add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
; delete user script = /usr/sbin/userdel "%u"
; delete user from group script = /usr/sbin/userdel "%u" "%g"
; delete group script = /usr/sbin/groupdel "%g"


# ----------------------- 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
#
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
#
# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
; local master = no
; os level = 33
; preferred master = yes

#----------------------------- Name Resolution -------------------------------
# Windows Internet Name Serving Support Section:
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
#
# - WINS Support: Tells the NMBD component of Samba to enable it's WINS Server
#
# - WINS Server: Tells the NMBD components of Samba to be a WINS Client
#
# - 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.
#
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups.

; wins support = yes
; wins server = w.x.y.z
; wins proxy = yes

; dns proxy = yes

# --------------------------- Printing Options -----------------------------
#
# Load Printers let you load automatically the list of printers rather
# than setting them up individually
#
# Cups Options let you pass the cups libs custom options, setting it to raw
# for example will let you use drivers on your Windows clients
#
# Printcap Name let you specify an alternative printcap file
#
# You can choose a non default printing system using the Printing option

load printers = yes
cups options = raw

; printcap name = /etc/printcap
#obtain list of printers automatically on SystemV
; printcap name = lpstat
; printing = cups

# --------------------------- Filesystem Options ---------------------------
#
# The following options can be uncommented if the filesystem supports
# Extended Attributes and they are enabled (usually by the mount option
# user_xattr). Thess options will let the admin store the DOS attributes
# in an EA and make samba not mess with the permission bits.
#
# Note: these options can also be set just per share, setting them in global
# makes them the default for all shares

; map archive = no
; map hidden = no
; map read only = no
; map system = no
; store dos attributes = yes


#============================ Share Definitions ==============================

[homes]
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes

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


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


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

[rede]
comment = Arquivos em CentOSLab
browseable = yes
inherit acls = Yes
path = /media/rede
read only = No
valid users = @laboratorio
admin users = @laboratorio
write list = @laboratorio
force group = laboratorio
create mask = 0770
directory mask = 4770


LOG DO ERRO:
[2012/04/30 11:43:53, 0] smbd/server.c:1140(main)
smbd version 3.5.10-115.el6_2 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/04/30 11:43:54.357161, 1] passdb/pdb_tdb.c:503(tdbsam_open)
tdbsam_open: Converting version 0.0 database to version 4.0.
[2012/04/30 11:43:54.357525, 1] passdb/pdb_tdb.c:282(tdbsam_convert_backup)
tdbsam_convert_backup: updated /var/lib/samba/private/passdb.tdb file.
[2012/04/30 11:43:54.950496, 1] lib/account_pol.c:325(account_policy_get)
account_policy_get: tdb_fetch_uint32 failed for type 1 (min password length), returning 0
[2012/04/30 11:43:54.950571, 1] lib/account_pol.c:325(account_policy_get)
account_policy_get: tdb_fetch_uint32 failed for type 2 (password history), returning 0
[2012/04/30 11:43:54.950608, 1] lib/account_pol.c:325(account_policy_get)
account_policy_get: tdb_fetch_uint32 failed for type 3 (user must logon to change password), returning 0
[2012/04/30 11:43:54.950646, 1] lib/account_pol.c:325(account_policy_get)
account_policy_get: tdb_fetch_uint32 failed for type 4 (maximum password age), returning 0
[2012/04/30 11:43:54.950681, 1] lib/account_pol.c:325(account_policy_get)
account_policy_get: tdb_fetch_uint32 failed for type 5 (minimum password age), returning 0
[2012/04/30 11:43:54.950714, 1] lib/account_pol.c:325(account_policy_get)
account_policy_get: tdb_fetch_uint32 failed for type 6 (lockout duration), returning 0
[2012/04/30 11:43:54.950748, 1] lib/account_pol.c:325(account_policy_get)
account_policy_get: tdb_fetch_uint32 failed for type 7 (reset count minutes), returning 0
[2012/04/30 11:43:54.950783, 1] lib/account_pol.c:325(account_policy_get)
account_policy_get: tdb_fetch_uint32 failed for type 8 (bad lockout attempt), returning 0
[2012/04/30 11:43:54.950819, 1] lib/account_pol.c:325(account_policy_get)
account_policy_get: tdb_fetch_uint32 failed for type 9 (disconnect time), returning 0
[2012/04/30 11:43:54.950854, 1] lib/account_pol.c:325(account_policy_get)
account_policy_get: tdb_fetch_uint32 failed for type 10 (refuse machine password change), returning 0
[2012/04/30 11:43:57.628490, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/04/30 11:43:57.629237, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/04/30 11:46:57.763905, 0] smbd/server.c:281(remove_child_pid)
Could not find child 3911 -- ignoring
[2012/04/30 11:53:58.134999, 0] smbd/server.c:281(remove_child_pid)
Could not find child 4164 -- ignoring
[2012/04/30 11:56:44, 0] smbd/server.c:1140(main)
smbd version 3.5.10-115.el6_2 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/04/30 11:56:44.296076, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/04/30 11:56:44.297647, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/04/30 11:57:30, 0] smbd/server.c:1140(main)
smbd version 3.5.10-115.el6_2 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/04/30 11:57:30.718308, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/04/30 11:57:30.719293, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/04/30 12:00:30.825988, 0] smbd/server.c:281(remove_child_pid)
Could not find child 4381 -- ignoring
[2012/04/30 12:07:31.066280, 0] smbd/server.c:281(remove_child_pid)
Could not find child 4487 -- ignoring
[2012/04/30 12:07:35, 0] smbd/server.c:1140(main)
smbd version 3.5.10-115.el6_2 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/04/30 12:07:35.204290, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/04/30 12:07:35.205344, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/04/30 12:10:35.378504, 0] smbd/server.c:281(remove_child_pid)
Could not find child 4596 -- ignoring
[2012/04/30 12:11:09, 0] smbd/server.c:1140(main)
smbd version 3.5.10-115.el6_2 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/04/30 12:11:09.482999, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/04/30 12:11:09.483900, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/04/30 12:14:09.665286, 0] smbd/server.c:281(remove_child_pid)
Could not find child 4622 -- ignoring
[2012/04/30 12:27:10.092595, 0] smbd/server.c:281(remove_child_pid)
Could not find child 4763 -- ignoring
[2012/04/30 12:40:10.814135, 0] smbd/server.c:281(remove_child_pid)
Could not find child 4859 -- ignoring
[2012/04/30 12:53:11.554283, 0] smbd/server.c:281(remove_child_pid)
Could not find child 4998 -- ignoring
[2012/04/30 13:06:12.128486, 0] smbd/server.c:281(remove_child_pid)
Could not find child 5164 -- ignoring
[2012/04/30 13:19:12.693359, 0] smbd/server.c:281(remove_child_pid)
Could not find child 5263 -- ignoring
[2012/04/30 13:32:13.275176, 0] smbd/server.c:281(remove_child_pid)
Could not find child 5464 -- ignoring
[2012/04/30 13:45:14.056150, 0] smbd/server.c:281(remove_child_pid)
Could not find child 5563 -- ignoring
[2012/04/30 13:58:14.696560, 0] smbd/server.c:281(remove_child_pid)
Could not find child 5717 -- ignoring
[2012/04/30 14:11:15.295116, 0] smbd/server.c:281(remove_child_pid)
Could not find child 5937 -- ignoring
[2012/04/30 14:24:15.895180, 0] smbd/server.c:281(remove_child_pid)
Could not find child 6083 -- ignoring


Agradeço desde jah

Enviado em: 30/4/2012 16:29
Transferir mensagem para outros aplicativos Transferir


Re: CentOS 6.2 Acesso negado pelo samba
Home away from home
Cadastrado em:
11/4/2012 21:42
De Americana - SP
Grupo:
Registered Users
Mensagens: 298
Offline
boa tarde.

como está seu SELINUX?

caso esteja ativado, vc precisaria antes de tudo aplicar a regra a seguir para habilitar o compartilhamento nas políticas do SELINUX:
#chcon -R -t samba_share_t /media


Para visualizar o estado do seu SELINUX:
cat /etc/selinux/config grep -"#"


Caso esteja habilitado você aplica a regra citada, caso esteja desabilitado então continuamos a analisar o seu ambiente .

SELINUX desabilitado:
SELINUX=disabled
SELINUXTYPE
=targeted


Enviado em: 30/4/2012 16:43

se precisar postar informações da sua configuração (ver 1.2):
#wget http://pastebin.centos.org/pastebin.php?dl=39126 -O getInfoSuporte.sh
#yum install dos2unix
#dos2unix getInfoSuporte.sh
#chmod 0755 getInfoSuporte.sh
#./getInfoSuporte.sh
Transferir mensagem para outros aplicativos Transferir


Re: CentOS 6.2 Acesso negado pelo samba
Just popping in
Cadastrado em:
30/4/2012 16:17
De Ribeirão Preto
Grupo:
Registered Users
Mensagens: 11
Offline
Ola Obrigado por ajudar, meu selinux está da seguinte forma:

SELINUX=enforcing
SELINUXTYPE=targeted

fiz o procedimento para aplica a permissao no selinux e mesmo assim o problema continua..
OBS.: o smb que postei e a maquina que realmente preciso montar o server a que eu testei os comando sao em meu note (vmware)... a unica coisa que muda é o compatilhamento

[Arquivos]
printable = no
writable = yes
path = /home/centos/Arquivos
comment = Arquivos em Servidor
valid users = laboratorio
public = yes

mas mesmo assim nada, o erro e o mesmo...

como checo para ver se o comando do selinux deu certo??

sou novato no mundo linux como podem perceber... agradeco.

Enviado em: 1/5/2012 2:29
Transferir mensagem para outros aplicativos Transferir


Re: CentOS 6.2 Acesso negado pelo samba
Just popping in
Cadastrado em:
30/4/2012 16:17
De Ribeirão Preto
Grupo:
Registered Users
Mensagens: 11
Offline
Desculpem, segue o log do smb

[2012/05/01 02:16:27, 0] smbd/server.c:1140(main)
smbd version 3.5.10-115.el6_2 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/05/01 02:16:27.141020, 0] printing/print_cups.c:109(cups_connect)
Unable to connect to CUPS server localhost:631 - Conexão recusada
[2012/05/01 02:16:27.145215, 0] printing/print_cups.c:468(cups_async_callback)
failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2012/05/01 02:16:27.469079, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/05/01 02:16:27.469600, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/05/01 02:19:27.614011, 0] printing/print_cups.c:109(cups_connect)
Unable to connect to CUPS server localhost:631 - Conexão recusada
[2012/05/01 02:19:27.614318, 0] printing/print_cups.c:468(cups_async_callback)
failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2012/05/01 02:19:27.614815, 0] smbd/server.c:281(remove_child_pid)
Could not find child 2717 -- ignoring
[2012/05/01 02:23:22, 0] smbd/server.c:1140(main)
smbd version 3.5.10-115.el6_2 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/05/01 02:23:22.109085, 0] printing/print_cups.c:109(cups_connect)
Unable to connect to CUPS server localhost:631 - Conexão recusada
[2012/05/01 02:23:22.110043, 0] printing/print_cups.c:468(cups_async_callback)
failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2012/05/01 02:23:22.128481, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/05/01 02:23:22.129030, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/05/01 02:25:53, 0] smbd/server.c:1140(main)
smbd version 3.5.10-115.el6_2 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/05/01 02:25:53.252531, 0] printing/print_cups.c:109(cups_connect)
Unable to connect to CUPS server localhost:631 - Conexão recusada
[2012/05/01 02:25:53.253038, 0] printing/print_cups.c:468(cups_async_callback)
failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2012/05/01 02:25:53.270461, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/05/01 02:25:53.271599, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/05/01 02:28:53.346055, 0] printing/print_cups.c:109(cups_connect)
Unable to connect to CUPS server localhost:631 - Conexão recusada
[2012/05/01 02:28:53.346696, 0] printing/print_cups.c:468(cups_async_callback)
failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2012/05/01 02:28:53.347252, 0] smbd/server.c:281(remove_child_pid)
Could not find child 2906 -- ignoring
[2012/05/01 02:33:50, 0] smbd/server.c:1140(main)
smbd version 3.5.10-115.el6_2 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/05/01 02:33:50.197890, 0] printing/print_cups.c:109(cups_connect)
Unable to connect to CUPS server localhost:631 - Conexão recusada
[2012/05/01 02:33:50.198496, 0] printing/print_cups.c:468(cups_async_callback)
failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2012/05/01 02:33:50.224806, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/05/01 02:33:50.232090, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/05/01 02:44:38, 0] smbd/server.c:1140(main)
smbd version 3.5.10-115.el6_2 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/05/01 02:44:38.424769, 0] printing/print_cups.c:109(cups_connect)
Unable to connect to CUPS server localhost:631 - Conexão recusada
[2012/05/01 02:44:38.425637, 0] printing/print_cups.c:468(cups_async_callback)
failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2012/05/01 02:44:38.710459, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso
[2012/05/01 02:44:38.711440, 0] smbd/server.c:500(smbd_open_one_socket)
smbd_open_once_socket: open_socket_in: Endereço já em uso

Enviado em: 1/5/2012 2:47
Transferir mensagem para outros aplicativos Transferir


Re: CentOS 6.2 Acesso negado pelo samba
Home away from home
Cadastrado em:
19/10/2011 9:11
De Pompeia
Grupo:
Registered Users
Mensagens: 435
Offline
Deixa seu
SELINUX =disabled
SELINUXTYPE=targeted

Agora o arquivo media/rede esta montando?
o grupo laboratorio existe?
tem usuarios no grupo laboratorio?
tem usuarios cadastrado no samba?
quem é o dono da pasta /media/rede ?

com isso podemos resolver o seu problema de forma mais rapida

att

Enviado em: 1/5/2012 23:12

[x] Administrador de Redes Linux - Linux Force
[x] Linux Network Server - 4Linux
[x] Gerenciamento de Redes - Fadap ....Cursando
Transferir mensagem para outros aplicativos Transferir


Re: CentOS 6.2 Acesso negado pelo samba
Just popping in
Cadastrado em:
30/4/2012 16:17
De Ribeirão Preto
Grupo:
Registered Users
Mensagens: 11
Offline
Desablitei o selinux e nada, esta dando erro, caminho da rede nao foi encontrado, ao acessar o diretorio rede.

O arquivo /media/rede está montado, é referente a unidade /dev/sda4
O grupo na verdade estava errado, o grupo é centoslab e laboratorio pertence a ele, ja alterei no smb.
centoslab tem 2 usuario
o usuario laboratorio esta cadastrado no samba
o diretorio /media/rede dei chmod 777 e chown 777 a ela

aguardo mais alguma ajuda. obrigado

Enviado em: 2/5/2012 10:46
Transferir mensagem para outros aplicativos Transferir


Re: CentOS 6.2 Acesso negado pelo samba
Home away from home
Cadastrado em:
11/4/2012 21:42
De Americana - SP
Grupo:
Registered Users
Mensagens: 298
Offline
você pode usar esse script e postar o resultado para que os detalhes ajudem na análise:

#wget http://pastebin.centos.org/pastebin.php?dl=38684 -O getInfoSuporte.sh
#yum install dos2unix
#dos2unix getInfoSuporte.sh
#chmod 0755 getInfoSuporte.sh
#./getInfoSuporte.sh


Enviado em: 2/5/2012 13:47

se precisar postar informações da sua configuração (ver 1.2):
#wget http://pastebin.centos.org/pastebin.php?dl=39126 -O getInfoSuporte.sh
#yum install dos2unix
#dos2unix getInfoSuporte.sh
#chmod 0755 getInfoSuporte.sh
#./getInfoSuporte.sh
Transferir mensagem para outros aplicativos Transferir


Re: CentOS 6.2 Acesso negado pelo samba
Just popping in
Cadastrado em:
30/4/2012 16:17
De Ribeirão Preto
Grupo:
Registered Users
Mensagens: 11
Offline
Ta ai o resultado:

***********************************************************************
Versao original : 1.1 - 15/04/2012 - Jose Luis Gazoli
***********************************************************************************************************************************
Ao usar este script o usuario assume que leu, entendeu, revisou e aceitou que nenhuma informacao
contida no arquivo gerado afronta sua privacidade.
Os dados coletados serao somente gravados em arquivo local, nada sera postado automaticamente.
A postagem deve ser feita manualmente pelo usuario.
O arquivo gerado contem dados referentes a IPs, interfaces, usuarios de ADSL, discos, regras de firewall, etc.
Eh imprescindivel que voce revise todo o conteudo para filtrar aquilo que nao desejar postar.
***********************************************************************************************************************************
Voce tem ciencia de que deve ler, revisar e alterar informacoes coletadas que nao sao de seu interesse divulgar publicamente ?
***********************************************************************************************************************************
s = sim
n = nao
s
As informacoes serao gravadas no arquivo : /tmp/InfoSuporte-123121025.txt
./getInfoSuporte.sh: line 120: lsb_release: comando não encontrado
./getInfoSuporte.sh: line 145: lsb_release: comando não encontrado
cat: /etc/named.conf: Arquivo ou diretório não encontrado
cat: /etc/named.conf: Arquivo ou diretório não encontrado
cat: /etc/dhcp/dhcpd.conf: Arquivo ou diretório não encontrado
cat: /etc/mdadm.conf: Arquivo ou diretório não encontrado
Obtendo informacoes dos repositorios do yum...





finalizado repositorios.
./getInfoSuporte.sh: line 589: lspci: comando não encontrado
./getInfoSuporte.sh: line 604: lsusb: comando não encontrado
Visualizacao dos dados...

***********************************************************************
Script getInfoSuporte coleta dados do Linux para envio a suporte
Versao original 
1.1 15/04/2012 Jose Luis Gazoli
***********************************************************************
Ao executar o script que gerou estes dadoso usuario foi informado e 
concordou
respondendo 'SIM'que deveria lerrevisar e alterar qualquer 
informacao que nao fosse de seu interesse tornar publica

O script nao faz nenhum upload automaticofoi o usuario quem postou 
este arquivo
.
***********************************************************************
***********************************************************************
***********************************************************************
***********************************************************************
*** 
Revise os dados aqui coletados ecaso nao queira publicar algo ***
*** 
aqui contidofique a vontade para alterardescaracterizar,    ***
*** 
omitiretc.                                                    ***
*** 
Facilite o entendimento daqueles que poderao auxilia-lo.        ***
***********************************************************************
***********************************************************************
***********************************************************************
LSB
***



********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
SELINUX
*******
SELINUX=disabled
SELINUXTYPE
=targeted 

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
KERNEL
*******
2.6.32-220.13.1.el6.i686
i686
i386
GNU
/Linux

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
dmidecode Motherboard
***********
    
Manufacturer:                       
    
Product NamePhitronics G31VS-M
    Version
:                       
    
Serial Number:                       

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
free -m
***********
             
total       used       free     shared    buffers     cached
Mem
:          2521        639       1882          0         32        370
-/+ buffers/cache:        235       2285
Swap
:         4999          0       4999

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
/
proc/cpuinfo
***********
model name    Genuine Intel(RCPU            2140  1.60GHz
cpu MHz        
1607.290
siblings    
2
cpu cores    
2
cpuid level    
10
flags        
fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat 
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc arch_perfm
on pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm la
hf_lm dts
address sizes    
36 bits physical48 bits virtual

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************

INITTAB
*******
id:5:initdefault:

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
ifconfig -a
***********
eth0      Link encap:Ethernet  Endereço de HW 00:19:66:E0:2C:41  
          inet end
.: 192.168.0.125  Bcast:192.168.0.255  Masc:255.255.255.0
          endereço inet6
fe80::219:66ff:fee0:2c41/64 Escopo:Link
          UP BROADCASTRUNNING MULTICAST  MTU
:1500  Métrica:1
          RX packets
:25517 errors:0 dropped:0 overruns:0 frame:0
          TX packets
:3460 errors:0 dropped:0 overruns:0 carrier:0
          colisões
:0 txqueuelen:1000 
          RX bytes
:5044712 (4.8 MiB)  TX bytes:414676 (404.9 KiB)
          
IRQ:28 Endereço de E/S:0x8000 

lo        Link encap
:Loopback Local  
          inet end
.: 127.0.0.1  Masc:255.0.0.0
          endereço inet6
: ::1/128 Escopo:Máquina
          UP LOOPBACKRUNNING  MTU
:16436  Métrica:1
          RX packets
:1964 errors:0 dropped:0 overruns:0 frame:0
          TX packets
:1964 errors:0 dropped:0 overruns:0 carrier:0
          colisões
:0 txqueuelen:
          RX bytes
:234971 (229.4 KiB)  TX bytes:234971 (229.4 KiB)

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
resolv.conf
***********
# Generated by NetworkManager
nameserver 200.255.255.70
nameserver 200.255.255.66

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
/
etc/iproute2/rt_tables
***********
#
# reserved values
#
255    local
254    main
253    
default
0    unspec
#
# local
#
#1    inr.ruhep

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
route -n
***********
Tabela de Roteamento IP do Kernel
Destino         Roteador        MáscaraGen
.    Opções Métrica Ref   Uso Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
named.conf
***********


********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
dhcpd.conf
***********


********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
/
etc/sysconfig/network-scripts/
***********
Arquivoifcfg-eth0
*********************
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR
=00:19:66:E0:2C:41
TYPE
=Ethernet
BOOTPROTO
=dhcp
DEFROUTE
=yes
PEERDNS
=yes
PEERROUTES
=yes
IPV4_FAILURE_FATAL
=yes
IPV6INIT
=no
NAME
="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
***********************
Arquivoifcfg-lo
*********************
DEVICE=lo
IPADDR
=127.0.0.1
NETMASK
=255.0.0.0
NETWORK
=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT
=yes
NAME
=loopback
***********************
********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
blkid
***********
/
dev/sda1UUID="515220b2-ecd6-4808-bea0-dd1c1ac08d17" TYPE="ext4" 
/dev/sda2UUID="963918c1-8412-46e2-9ff2-7632c568c7d2" TYPE="ext4" 
/dev/sda3UUID="ccc0a1d0-3193-400e-bc27-64a36b6cb330" TYPE="swap" 
/dev/sda4LABEL="rede" UUID="683cb87b-48fe-4eab-a6b6-68473af55a71" TYPE="ext4" 

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
df -h
***********
SistArq.            Size  Used Avail Use% Montado em
/dev/sda1              39G  2,1G   35G   6% /
tmpfs                 1,3G  284K  1,3G   1% /dev/shm
/dev/sda2              15G  254M   14G   2% /home
/dev/sda4              90G  184M   85G   1% /media/rede

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
fdisk -l
***********

Disk /dev/sda160.0 GB160040803840 bytes
255 heads
63 sectors/track19457 cylinders
Units 
cilindros of 16065 512 8225280 bytes
Sector size 
(logical/physical): 512 bytes 512 bytes
I
/O size (minimum/optimal): 512 bytes 512 bytes
Disk identifier
0x1e2c1e2b

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        5100    40960000   83  Linux
/dev/sda2            5100        7012    15360000   83  Linux
/dev/sda3            7012        7650     5120000   82  Linux swap Solaris
/dev/sda4            7651       19457    94839727+  83  Linux

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
cat /etc/mdadm.conf
***********


********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
cat /etc/exports
***********


********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
cat /etc/fstab
***********

#
# /etc/fstab
# Created by anaconda on Mon Apr 30 07:32:26 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=515220b2-ecd6-4808-bea0-dd1c1ac08d17 /                       ext4    defaul
ts        1 1
UUID
=963918c1-8412-46e2-9ff2-7632c568c7d2 /home                   ext4    defaul
ts        1 2
UUID
=ccc0a1d0-3193-400e-bc27-64a36b6cb330 swap                    swap    defaul
ts        0 0
tmpfs                   
/dev/shm                tmpfs   defaults        0 0
devpts                  
/dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   
/sys                    sysfs   defaults        0 0
proc                    
/proc                   proc    defaults        0 0

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
cat /etc/ntp.conf
***********
# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).

driftfile /var/lib/ntp/drift

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict 
-default kod nomodify notrap nopeer noquery

# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1 
restrict 
-::1

# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.centos.pool.ntp.org
server 1.centos
.pool.ntp.org
server 2.centos
.pool.ntp.org

#broadcast 192.168.1.255 autokey    # broadcast server
#broadcastclient            # broadcast client
#broadcast 224.0.1.1 autokey        # multicast server
#multicastclient 224.0.1.1        # multicast client
#manycastserver 239.255.254.254        # manycast server
#manycastclient 239.255.254.254 autokey # manycast client

# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. 
#server    127.127.1.0    # local clock
#fudge    127.127.1.0 stratum 10    

# Enable public key cryptography.
#crypto

includefile /etc/ntp/crypto/pw

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography. 
keys /etc/ntp/keys

# Specify the key identifiers which are trusted.
#trustedkey 4 8 42

# Specify the key identifier to use with the ntpdc utility.
#requestkey 8

# Specify the key identifier to use with the ntpq utility.
#controlkey 8

# Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
cat /etc/samba/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. This may be obtained from:
#  http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
#
# Many working examples of smb.conf files can be found in the 
# Samba-Guide which is generated daily and can be downloaded from: 
#  http://www.samba.org/samba/docs/Samba-Guide.pdf
#
# 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. 
#
#---------------
# SELINUX NOTES:
#
# If you want to use the useradd/groupadd family of binaries please run:
# setsebool -P samba_domain_controller on
#
# If you want to share home directories via samba please run:
# setsebool -P samba_enable_home_dirs on
#
# If you create a new directory you want to share you should mark it as
# "samba_share_t" so that selinux will let you write into it.
# Make sure not to do that on system directories as they may already have
# been marked with othe SELinux labels.
#
# Use ls -ldZ /path to see which context a directory has
#
# Set labels only on directories you created!
# To set a label use the following: chcon -t samba_share_t /path
#
# If you need to share a system created directory you can use one of the
# following (read-only/read-write):
# setsebool -P samba_export_all_ro on
# or
# setsebool -P samba_export_all_rw on
#
# If you want to run scripts (preexec/root prexec/print command/...) please
# put them into the /var/lib/samba/scripts directory so that smbd will be
# allowed to run them.
# Make sure you COPY them and not MOVE them so that the right SELinux context
# is applied, to check all is ok use restorecon -R -v /var/lib/samba/scripts
#
#--------------
#
#======================= Global Settings =====================================
    
[global]
    
# ----------------------- Network Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
    
workgroup MYGROUP
    server string 
Samba Server Version %v
    
;    netbios name MYSERVER
    
;    interfaces lo eth0 192.168.12.2/24 192.168.13.2/24 
;    hosts allow 127. 192.168.12192.168.13.
    
# --------------------------- Logging Options -----------------------------
#
# Log File let you specify where to put logs and how to split them up.
#
# Max Log Size let you specify the max size log files should reach
    
    # logs split per machine
    
log file = /var/log/samba/log.%m
    
# max 50KB per log file, then rotate
    
max log size 50
    
# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# 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.

    
security user
    passdb backend 
tdbsam


# ----------------------- Domain Members Options ------------------------
#
# Security must be set to domain or ads
#
# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
#
# 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.
#
# Use password server option only with security = server or if you can't
# use the DNS to locate Domain Controllers
# 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 = *
    
    
;    security domain
;    passdb backend tdbsam
;    realm MY_REALM

;    password server = <NT-Server-Name>

# ----------------------- Domain Controller Options ------------------------
#
# Security must be set to user for domain controllers
#
# 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.
#
# 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 Logons let Samba be a domain logon server for Windows workstations. 
#
# Logon Scrpit let yuou specify a script to be run at login time on the client
# You need to provide it in a share called NETLOGON
#
# Logon Path let you specify where user profiles are stored (UNC path)
#
# Various scripts can be used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
#
;    security user
;    passdb backend tdbsam
    
;    domain master yes 
;    domain logons yes
    
    
# the login script name depends on the machine name
;    logon script = %m.bat
    
# the login script name depends on the unix user used
;    logon script = %u.bat
;    logon path \%LProfiles%u
    
# disables profiles support by specifing an empty path
;    logon path =          
    
;    
add user script = /usr/sbin/useradd "%u" --g users
;    add group script = /usr/sbin/groupadd "%g"
;    add machine script = /usr/sbin/useradd --"Workstation (%u)" --/n
ohome 
-/bin/false "%u"
;    delete user script = /usr/sbin/userdel "%u"
;    delete user from group script = /usr/sbin/userdel "%u" "%g"
;    delete group script = /usr/sbin/groupdel "%g"
    
    
# ----------------------- 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
#
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
#

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
;    local master no
;    os level 33
;    preferred master yes
    
#----------------------------- Name Resolution -------------------------------
# Windows Internet Name Serving Support Section:
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
#
# - WINS Support: Tells the NMBD component of Samba to enable it's WINS Server
#
# - WINS Server: Tells the NMBD components of Samba to be a WINS Client
#
# - 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.
#
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups.
    
;    wins support yes
;    wins server w.x.y.z
;    wins proxy yes
    
;    dns proxy yes
    
# --------------------------- Printing Options -----------------------------
#
# Load Printers let you load automatically the list of printers rather
# than setting them up individually
#
# Cups Options let you pass the cups libs custom options, setting it to raw
# for example will let you use drivers on your Windows clients
#
# Printcap Name let you specify an alternative printcap file
#
# You can choose a non default printing system using the Printing option
    
    
load printers yes
    cups options 
raw

;    printcap name = /etc/printcap
    
#obtain list of printers automatically on SystemV
;    printcap name lpstat
;    printing cups

# --------------------------- Filesystem Options ---------------------------
#
# The following options can be uncommented if the filesystem supports
# Extended Attributes and they are enabled (usually by the mount option
# user_xattr). Thess options will let the admin store the DOS attributes
# in an EA and make samba not mess with the permission bits.
#
# Note: these options can also be set just per share, setting them in global
# makes them the default for all shares

;    map archive no
;    map hidden no
;    map read only no
;    map system no
;    store dos attributes yes


#============================ Share Definitions ==============================
    
[homes]
    
comment Home Directories
    browseable 
no
    writable 
yes
;    valid users = %S
;    valid users MYDOMAIN%S
    
[printers]
    
comment All Printers
    path 
= /var/spool/samba
    browseable 
no
    guest ok 
no
    writable 
no
    printable 
yes
    
# Un-comment the following and create the netlogon directory for Domain Logons
;    [netlogon]
;    
comment Network Logon Service
;    path = /var/lib/samba/netlogon
;    guest ok yes
;    writable no
;    share modes no
    
    
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;    [Profiles]
;    
path = /var/lib/samba/profiles
;    browseable no
;    guest ok yes
    
    
# A publicly accessible directory, but read only, except for people in
# the "staff" group
;    [public]
;    
comment = Public Stuff
;    path = /home/samba
;    public = yes
;    writable yes
;    printable no
;    write list = +staff

[rede]
    
comment Arquivos em CentOSLab
    browseable 
yes
        inherit acls 
Yes
    path 
= /dev/sda4
        read only 
No
        valid users 
= @laboratorio
        admin users 
= @laboratorio
        write 
list = @laboratorio
        force group 
centoslab
        create mask 
0770
        directory mask 
4770

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
chkconfig
***********
NetworkManager     0:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
auditd             0
:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
avahi
-daemon       0:não    1:não    2:não    3:sim    4:sim    5:sim    6:não
bluetooth          0
:não    1:não    2:não    3:sim    4:sim    5:sim    6:não
crond              0
:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
cups               0
:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
dnsmasq            0
:não    1:não    2:não    3:não    4:não    5:não    6:não
firstboot          0
:não    1:não    2:não    3:não    4:não    5:não    6:não
haldaemon          0
:não    1:não    2:não    3:sim    4:sim    5:sim    6:não
httpd              0
:não    1:não    2:não    3:não    4:não    5:não    6:não
ip6tables          0
:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
iptables           0
:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
kdump              0
:não    1:não    2:não    3:não    4:não    5:não    6:não
matahari
-broker    0:não    1:não    2:não    3:não    4:não    5:não    6:não
matahari
-host      0:não    1:não    2:não    3:não    4:não    5:não    6:não
matahari
-network    0:não    1:não    2:não    3:não    4:não    5:não    6:não
matahari
-service    0:não    1:não    2:não    3:não    4:não    5:não    6:não
matahari
-sysconfig    0:não    1:não    2:não    3:não    4:não    5:não    6:não
mdmonitor          0
:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
messagebus         0
:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
netconsole         0
:não    1:não    2:não    3:não    4:não    5:não    6:não
netfs              0
:não    1:não    2:não    3:sim    4:sim    5:sim    6:não
network            0
:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
nmb                0
:não    1:não    2:não    3:não    4:não    5:não    6:não
ntpd               0
:não    1:não    2:não    3:não    4:não    5:não    6:não
ntpdate            0
:não    1:não    2:não    3:não    4:não    5:não    6:não
portreserve        0
:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
postfix            0
:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
qpidd              0
:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
rdisc              0
:não    1:não    2:não    3:não    4:não    5:não    6:não
restorecond        0
:não    1:não    2:não    3:não    4:não    5:não    6:não
rsyslog            0
:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
saslauthd          0
:não    1:não    2:não    3:não    4:não    5:não    6:não
smb                0
:não    1:não    2:não    3:não    4:não    5:não    6:não
spice
-vdagentd     0:não    1:não    2:não    3:não    4:não    5:sim    6:não
sshd               0
:não    1:não    2:sim    3:sim    4:sim    5:sim    6:não
udev
-post          0:não    1:sim    2:sim    3:sim    4:sim    5:sim    6:não
wdaemon            0
:não    1:não    2:não    3:não    4:não    5:não    6:não
webmin             0
:não    1:não    2:sim    3:sim    4:não    5:sim    6:não
wpa_supplicant     0
:não    1:não    2:não    3:não    4:não    5:não    6:não
xinetd             0
:não    1:não    2:não    3:sim    4:sim    5:sim    6:não

servidos baseados no xinetd
:
    
chargen-dgram:     não
    chargen
-stream:    não
    daytime
-dgram:     não
    daytime
-stream:    não
    discard
-dgram:     não
    discard
-stream:    não
    
echo-dgram:        não
    
echo-stream:       não
    swat
:              não
    tcpmux
-server:     não
    time
-dgram:        não
    time
-stream:       não

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
yum repolist all
***********
Loaded pluginsfastestmirrorrefresh-packagekit
Loading mirror speeds from cached hostfile
 
basecentos.ufms.br
 
extrascentos.ufms.br
 
updatescentos.ufms.br
repo id                     repo name                             status
base                        CentOS
-Base                       enabled4.764
c6
-media                    CentOS-Media                      disabled
centosplus                  CentOS
-Plus                       disabled
contrib                     CentOS
-Contrib                    disabled
debug                       CentOS
-Debuginfo                  disabled
extras                      CentOS
-Extras                     enabled:     4
updates                     CentOS
-Updates                    enabled:   641
repolist
5.409

********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
lspci -nn
***********


********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
lsusb
***********


********************************************************************************
**************************
********************************************************************************
**************************
********************************************************************************
**************************
netstat -na --tcp
*****************
Conexões Internet Ativas (servidores e estabelecidas)
Proto Recv-Q Send-Q Local Address               Foreign Address             Stat
e      
tcp        0      0 0.0.0.0
:10000               0.0.0.0:*                   OUÇA
       
tcp        0      0 0.0.0.0
:22                  0.0.0.0:*                   OUÇA
       
tcp        0      0 127.0.0.1
:631               0.0.0.0:*                   OUÇA
       
tcp        0      0 127.0.0.1
:25                0.0.0.0:*                   OUÇA
       
tcp        0      0 0.0.0.0
:5672                0.0.0.0:*                   OUÇA
       
tcp        0      0 192.168.0.125
:57931         205.188.80.38:80            TIME
_WAIT   
tcp        0      0 192.168.0.125
:39847         152.1.2.172:80              TIME
_WAIT   
tcp        0      0 192.168.0.125
:42504         134.173.34.196:80           TIME
_WAIT   
tcp        0      0 192.168.0.125
:39286         69.65.56.239:80             TIME
_WAIT   
tcp        0      1 192.168.0.125
:51246         200.14.80.78:80             ESPE
RA_FIN1 
tcp        0      0 192.168.0.125
:48789         216.176.132.234:80          TIME
_WAIT   
tcp        0      0 192.168.0.125
:35764         67.213.210.121:80           TIME
_WAIT   
tcp        0      0 192.168.0.125
:39824         152.1.2.172:80              TIME
_WAIT   
tcp        0      0 192.168.0.125
:39517         208.111.4.242:80            TIME
_WAIT   
tcp        0      0 192.168.0.125
:41655         68.142.129.190:80           TIME
_WAIT   
tcp        0      0 192.168.0.125
:50758         155.101.3.219:80            TIME
_WAIT   
tcp        0      0 192.168.0.125
:44310         198.82.184.145:80           TIME
_WAIT   
tcp        0      0 192.168.0.125
:42038         205.188.81.38:80            TIME
_WAIT   
tcp        0      0 192.168.0.125
:35601         200.175.8.21:80             TIME
_WAIT   
tcp        0      0 192.168.0.125
:35787         67.213.210.121:80           TIME
_WAIT   
tcp        0      0 192.168.0.125
:39262         69.65.56.239:80             TIME
_WAIT   
tcp        0      0 192.168.0.125
:48813         216.176.132.234:80          TIME
_WAIT   
tcp        0      0 192.168.0.125
:42061         205.188.81.38:80            TIME
_WAIT   
tcp        0      0 192.168.0.125
:36511         208.53.158.34:80            TIME
_WAIT   
tcp        0      0 192.168.0.125
:51218         200.14.80.78:80             TIME
_WAIT   
tcp        0      0 192.168.0.125
:35796         128.172.160.105:80          TIME
_WAIT   
tcp        0      0 192.168.0.125
:42480         134.173.34.196:80           TIME
_WAIT   
tcp        0      0 192.168.0.125
:56429         69.41.160.38:80             TIME
_WAIT   
tcp        0      0 192.168.0.125
:44319         198.82.184.145:80           TIME
_WAIT   
tcp        0      0 192.168.0.125
:39497         208.111.4.242:80            TIME
_WAIT   
tcp        0      0 192.168.0.125
:43962         66.160.172.98:80            TIME
_WAIT   
tcp        0      0 192.168.0.125
:39023         67.211.161.12:80            TIME
_WAIT   
tcp        0      0 192.168.0.125
:35771         128.172.160.105:80          TIME
_WAIT   
tcp        0      0 192.168.0.125
:36501         208.53.158.34:80            TIME
_WAIT   
tcp        0      0 192.168.0.125
:39000         67.211.161.12:80            TIME
_WAIT   
tcp        0      0 192.168.0.125
:51221         200.14.80.78:80             TIME
_WAIT   
tcp        0      1 192.168.0.125
:43986         66.160.172.98:80            ESPE
RA_FIN1 
tcp        1      0 192.168.0.125
:37893         200.182.35.178:80           ESPE
RANDO_FECHAR
tcp        0      0 192.168.0.125
:42160         204.157.3.70:80             TIME
_WAIT   
tcp        0      0 192.168.0.125
:42136         204.157.3.70:80             TIME
_WAIT   
tcp        0      0 192.168.0.125
:42060         205.188.81.38:80            TIME
_WAIT   
tcp        0      1 192.168.0.125
:51240         200.14.80.78:80             ESPE
RA_FIN1 
tcp        0      0 192.168.0.125
:41681         68.142.129.190:80           TIME
_WAIT   
tcp        0      0 192.168.0.125
:34866         198.182.76.2:80             TIME
_WAIT   
tcp        0      0 192.168.0.125
:56450         69.41.160.38:80             TIME
_WAIT   
tcp        0      0 192.168.0.125
:34843         198.182.76.2:80             TIME
_WAIT   
tcp        0      0 192.168.0.125
:50734         155.101.3.219:80            TIME
_WAIT   
tcp        0      0 
:::139                      :::*                        OUÇA
       
tcp        0      0 
:::22                       :::*                        OUÇA
       
tcp        0      0 
::1:631                     :::*                        OUÇA
       
tcp        0      0 
::1:25                      :::*                        OUÇA
       
tcp        0      0 
:::445                      :::*                        OUÇA
       
tcp        0      0 
:::5672                     :::*                        OUÇA
       

netstat 
-na --udp
*****************
Conexões Internet Ativas (servidores e estabelecidas)
Proto Recv-Q Send-Q Local Address               Foreign Address             Stat
e      
udp        0      0 0.0.0.0
:5353                0.0.0.0:*                       
        
udp        0      0 0.0.0.0:32885               0.0.0.0:*                       
        
udp        0      0 0.0.0.0:631                 0.0.0.0:*                       
        
udp        0      0 0.0.0.0:10000               0.0.0.0:*                       
        
udp        0      0 0.0.0.0:68                  0.0.0.0:*                       
        

netstat ---tcp --listening --programs
***************************************
Conexões Internet Ativas (sem os servidores)
Proto Recv-Q Send-Q Local Address               Foreign Address             Stat
e       PID
/Program name   
tcp        0      0 0.0.0.0
:10000               0.0.0.0:*                   OUÇA
       1575
/perl           
tcp        0      0 0.0.0.0
:22                  0.0.0.0:*                   OUÇA
       1401
/sshd           
tcp        0      0 127.0.0.1
:631               0.0.0.0:*                   OUÇA
       1309
/cupsd          
tcp        0      0 127.0.0.1
:25                0.0.0.0:*                   OUÇA
       1489
/master         
tcp        0      0 0.0.0.0
:5672                0.0.0.0:*                   OUÇA
       1505
/qpidd          
tcp        0      0 
:::139                      :::*                        OUÇA
       2258
/smbd           
tcp        0      0 
:::22                       :::*                        OUÇA
       1401
/sshd           
tcp        0      0 
::1:631                     :::*                        OUÇA
       1309
/cupsd          
tcp        0      0 
::1:25                      :::*                        OUÇA
       1489
/master         
tcp        0      0 
:::445                      :::*                        OUÇA
       2258
/smbd           
tcp        0      0 
:::5672                     :::*                        OUÇA
       1505
/qpidd          

********************************************************************************
**************************
**************************** 
ATENCAO *******************************************
**************************
********************************************************************************
**************************
*** 
Caso nao queira expor as regras do seu firewallvoce tem algumas opcoes :  
                       ***
*** 
alterar o IP da sua interface externapara nao divulga-laao inves de 
201.74.213.129 usar    
***
***     
201.74.xxx.xxx quando for IP fixoCom IP dinamico talvez nao necessite 
de tanta preocupacao
.  ***
*** 
Remover todo o conteudo a seguir referente a IPTABLES.                  
                       ***
***                                                                             
                       ***
*** 
Eh importante ter em mente que um sambamesmo que corretamente configurado,
 
pode ser impedido de  ***
*** 
funcionar corretamente caso as regras de iptables nao estejam habilitando co
nexoes
Como           ***
*** 
consequencia o remedio receitado pode ter sido indicado para a doenca errada
   
:)                  ***
********************************************************************************
**************************
*** 
Os seguintes comandos foram utilizados para obter dados do iptables :       
                       ***
*** 
'iptables -n -v -L -t filter'    'iptables -n -v -L -t nat'         
                       
***
********************************************************************************
**************************
iptables ----t filter
***************************
Chain INPUT (policy ACCEPT 0 packets0 bytes)
 
pkts bytes target     prot opt in     out     source               destination 
        
 4646 1611K ACCEPT     all  
--  *      *       0.0.0.0/0            0.0.0.0/0   
        state RELATED
,ESTABLISHED 
    0     0 ACCEPT     icmp 
--  *      *       0.0.0.0/0            0.0.0.0/0   
        
   23  1434 ACCEPT     all  
--  lo     *       0.0.0.0/0            0.0.0.0/0   
        
 2041  162K ACCEPT     udp  
--  *      *       0.0.0.0/0            0.0.0.0/0   
        state 
NEW udp dpt:137 
  553  125K ACCEPT     udp  
--  *      *       0.0.0.0/0            0.0.0.0/0   
        state 
NEW udp dpt:138 
    0     0 ACCEPT     udp  
--  *      *       0.0.0.0/0            0.0.0.0/0   
        state 
NEW udp dpt:137 
    0     0 ACCEPT     udp  
--  *      *       0.0.0.0/0            0.0.0.0/0   
        state 
NEW udp dpt:138 
    4   192 ACCEPT     tcp  
--  *      *       0.0.0.0/0            0.0.0.0/0   
        state 
NEW tcp dpt:139 
    6   288 ACCEPT     tcp  
--  *      *       0.0.0.0/0            0.0.0.0/0   
        state 
NEW tcp dpt:445 
    0     0 ACCEPT     tcp  
--  *      *       0.0.0.0/0            0.0.0.0/0   
        state 
NEW tcp dpt:22 
 4806 2135K REJECT     all  
--  *      *       0.0.0.0/0            0.0.0.0/0   
        reject
-with icmp-host-prohibited 

Chain FORWARD 
(policy ACCEPT 0 packets0 bytes)
 
pkts bytes target     prot opt in     out     source               destination 
        
    0     0 REJECT     all  
--  *      *       0.0.0.0/0            0.0.0.0/0   
        reject
-with icmp-host-prohibited 

Chain OUTPUT 
(policy ACCEPT 5302 packets593K bytes)
 
pkts bytes target     prot opt in     out     source               destination 
        

iptables 
----t nat
***************************
Chain PREROUTING (policy ACCEPT 0 packets0 bytes)
 
pkts bytes target     prot opt in     out     source               destination 
        

Chain POSTROUTING 
(policy ACCEPT 0 packets0 bytes)
 
pkts bytes target     prot opt in     out     source               destination 
        

Chain OUTPUT 
(policy ACCEPT 0 packets0 bytes)
 
pkts bytes target     prot opt in     out     source               destination 
        


***********************************************************************
***********************************************************************
***********************************************************************
*** 
FIM dos dados coletadosRevise ecaso nao queira publicar algo***
*** 
aqui coletadofique a vontade para alterardescaracterizar,   ***
*** 
omitiretc.                                                    ***
***********************************************************************
***********************************************************************
***********************************************************************

***********************************************************************************
Os dados foram gravados no seguinte arquivo : /tmp/InfoSuporte-123120511.txt
***********************************************************************************
FIM

Enviado em: 2/5/2012 14:10
Transferir mensagem para outros aplicativos Transferir


Re: CentOS 6.2 Acesso negado pelo samba
Just popping in
Cadastrado em:
30/4/2012 16:17
De Ribeirão Preto
Grupo:
Registered Users
Mensagens: 11
Offline
Pessoal ainda continuo com o problema, queria tirar uma duvida, e se alguem puder fazer isso em uma maquina virtual em seu micro agradeço tambem, para ver se vai cair no mesmo problema que eu.

Estou utilizando o CentOS 6.2

Quando eu quero criar um compartilhamento de um hd slave com estações windows.. essa partição pode estar em ext4 ou tem que ser ntfs?

Alem de Adicionar o usuário no samba e o compartilhamento no samba, liberar o firewall.. preciso fazer mais alguma coisa??
(Tipo no windows botão direito na pastar compartilhar).. ou e so colocar no samba??

Lembrando o problema, ja fiz todas essas ações desabilitei o se linux
e ao acessar o centos de uma maquina windows, ele lista os diretorios no caso(REDE) que é o /dev/sda4 montado em /media/rede.

E da uma mensagem de erro falando que o caminho de rede nao foi encontrado.

Aguardo.

Enviado em: 3/5/2012 13:09
Transferir mensagem para outros aplicativos Transferir


Re: CentOS 6.2 Acesso negado pelo samba
Home away from home
Cadastrado em:
11/4/2012 21:42
De Americana - SP
Grupo:
Registered Users
Mensagens: 298
Offline
boa noite Lucas.

Tente essas alterações:
[rede
   
comment Arquivos em CentOSLab 
   browseable 
yes 
   path 
= /media/rede
   valid users 
= @laboratorio 
   admin users 
= @laboratorio 
   write 
list = @laboratorio 
   force group 
root
   force user 
root


depois execute :
#chkconfig smb on
#service smb restart
#service ip6tables stop
#service iptables stop


Testar acesso neste ponto.

Tenha certeza de que o grupo 'laboratorio' existe e que seu usuário no windows possui a mesma senha linux, e também que o usuário esteja cadastrado no samba.

Ex:
#groupadd laboratorio
# useradd -m -g laboratorio usulucas
# passwd usulucas
#smbpasswd -a usulucas


Ao invés de você usar o '/dev/sda', que é a sua partição, você usa o '/media/rede', que é o seu ponto de montagem.

E no Linux eu uso sempre 'ext4', mesmo nos diretórios que irei compartilhar com as máquinas windows. Eu particularmente uso NTFS em 2 situações:
* pen Drive
* HD USB que o usuário precisará usar eventualmente em Windows

Posta o resultado.

Abraços.




Enviado em: 3/5/2012 22:36

se precisar postar informações da sua configuração (ver 1.2):
#wget http://pastebin.centos.org/pastebin.php?dl=39126 -O getInfoSuporte.sh
#yum install dos2unix
#dos2unix getInfoSuporte.sh
#chmod 0755 getInfoSuporte.sh
#./getInfoSuporte.sh
Transferir mensagem para outros aplicativos Transferir






Você pode exibir os tópicos.
Você não pode iniciar um novo tópico.
Você não pode responder.
Você não pode editar.
Você não pode excluir mensagens.
Você não pode incluir votações.
Você não pode votar.
Você não pode anexar arquivos.
Você não pode enviar mensagens sem aprovação.

[Pesquisa Avançada]