LinuxForum.Fans
Тема

Не вижу расшаренные папки в вин7

Автор: raziel_kdm 22 сообщений 6300 просмотров
#338209

Всем привет!

установил себе центОС 6.4, самбу, создал пользователя,группу. Дал этому пользователю доступ к эти каталогам в самбе.
С линукса могу зайти на компьютер в сети, пингуется тоже ( в обе стороны) а вот в сетевом окружении компьютера с линуком нет(через ИП адресс также не получается)
Подскажите что нужно сделать что бы он там появился. центОС как файл сервер + торрент
smb.conf

Показать
# - 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
[Torrent]
coment = torrent
path = /Shared
public = yes
valid users = Share, @Share
writable = yes
browseable = yes
create mask = 0765

iptables

Показать
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 137 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 138 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 139 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 445 -j ACCEPT
COMMIT
#338211

Брандмауэр отключите.

#338212

ya srazu na nego podumal. davno otklu4en (esli wi pro windows)

с помошью тигерВНС зайти на сервер получается(с виндоуса) а вот увидеть его в сетевом окружении не могу =(

#338313

Кто-нибудь? =)

#338327
raziel.kdm написал:

с помошью тигерВНС зайти на сервер получается(с виндоуса) а вот увидеть его в сетевом окружении не могу =(

А они в одной рабочей группе (домене)? В вашем smb.conf я вообще не увидел никаких записей ни о рабочей группе, ни об samba-имени компьютера.

#338333

Да. по какой-то причине часть конфига не перенеслась в спойлер. Вырезал все закоменченное:

Показать

#======================= Global Settings =====================================

[global]

workgroup = WORKGROUP
server string = Samba Server Version %v

; netbios name = MYSERVER

interfaces = lo eth1 192.168.1.0/24
hosts allow = 192.168.1.

# --------------------------- Logging Options -----------------------------


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

# ----------------------- Standalone Server Options ------------------------

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

; password server = <NT-Server-Name>

# ----------------------- Domain Controller Options ------------------------

; 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 ----------------------------

; local master = no
; os level = 33
; preferred master = yes

#----------------------------- Name Resolution -------------------------------

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

; dns proxy = yes

# --------------------------- Printing Options -----------------------------

; load printers = yes
; cups options = raw

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

# --------------------------- Filesystem Options ---------------------------


; 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
[torrents]
comment = DL
path = /Shared
public = yes
writable = yes
guest ok = yes
guest only = yes

Собственно в сетевом окружении(вин) появился центОС, но при попытке посмотреть через нетвью или вводом //192.168.1.6/Shared пишет нет доступа =(

#338337
raziel.kdm написал:

; netbios name = MYSERVER
Собственно в сетевом окружении(вин) появился центОС, но при попытке посмотреть через нетвью или вводом //192.168.1.6/Shared пишет нет доступа =(

1. Исходя из кких соображений закомментарено нетбиос имя? Это как раз то самое имя, под которым компьютер должен быть виден в сетевом виндовом окружении.
2. Я бы отказал в доступе. Так как в конфиге не видно, что есть сетевая папка Shared... Сложно дать доступ к тому, чего нет.

#338338

Почему не видно что есть сетевая папка шаред?

Показать


#======================= Global Settings =====================================

[global]

# ----------------------- Network Related Options -------------------------

workgroup = WORKGROUP
server string = Samba Server Version %v

netbios name = dl-pc

interfaces = eth1 192.168.1.0/24
hosts allow = 192.168.1

# --------------------------- Logging Options -----------------------------

# 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 ------------------------
security = share
passdb backend = tdbsam

# ----------------------- Browser Control Options ----------------------------

; local master = no
; os level = 33
; preferred master = yes

#----------------------------- Name Resolution -------------------------------
; wins support = yes
; wins server = w.x.y.z
; wins proxy = yes

; dns proxy = yes

# --------------------------- Printing Options -----------------------------

load printers = yes
cups options = raw

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

#============================ 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

[torrents]
comment = DL
path = /Shared
writable = yes
guest ok = yes
guest only = yes
create mask = 0777
directory mask = 0777

Нетбиос имя не видел чтобы использовалось.

С конфигом выше таже проблема.

#338342
raziel.kdm написал:
Почему не видно что есть сетевая папка шаред?
Показать


#======================= Global Settings =====================================

[global]

# ----------------------- Network Related Options -------------------------

workgroup = WORKGROUP
server string = Samba Server Version %v

netbios name = dl-pc

interfaces = eth1 192.168.1.0/24
hosts allow = 192.168.1

# --------------------------- Logging Options -----------------------------

# 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 ------------------------
security = share
passdb backend = tdbsam

# ----------------------- Browser Control Options ----------------------------

; local master = no
; os level = 33
; preferred master = yes

#----------------------------- Name Resolution -------------------------------
; wins support = yes
; wins server = w.x.y.z
; wins proxy = yes

; dns proxy = yes

# --------------------------- Printing Options -----------------------------

load printers = yes
cups options = raw

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

#============================ 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

[torrents]
comment = DL
path = /Shared
writable = yes
guest ok = yes
guest only = yes
create mask = 0777
directory mask = 0777

Нетбиос имя не видел чтобы использовалось.

С конфигом выше таже проблема.

эм это папка для анонимусов ну грубо говоря... В винде это папки моя музыка ну и т.д.

#338348

[torrents]
comment = DL
path = /Shared
writable = yes
guest ok = yes
guest only = yes
create mask = 0777
directory mask = 0777

А это не считается?
Тогда что нужно исправить.

моя музыка вроде эта*
[homes]
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S

#338368
"raziel.kdm⇓" написал:
browseable = no

no > yes
Потом:
[console]
# setsebool -P samba_enable_home_dirs=1
# setsebool -P use_samba_home_dirs 1
[/console]
И перестартовать службу smbd

#338395

А зачем мне хоум директории? Я так понял это аналог /users в винде.

Мне надо папку /Shared/Download
показать для винды=)

кстати. в одном [shares] может быть 2 path?

#338401
"raziel.kdm⇓" написал:
кстати. в одном [shares] может быть 2 path?

нет
Тогда так:

"i2ks⇓" написал:


raziel.kdm⇓ пишет:

browseable = no

no > yes
#338402
raziel.kdm написал:
[torrents]
comment = DL
path = /Shared
writable = yes
guest ok = yes
guest only = yes
create mask = 0777
directory mask = 0777

А это не считается?

Это считается. Но вот только постарайтесь понять разницу между именем сетевого ресурса, по которому Вы к нему обращаетесь с ремутного компьютера и месторасположением этого самого ресурса на файловом сервере. Вы определили, что локальную папку /Shared можно отдать в общий доступ. Вот только назвали сетевой ресурс не Shared, а torrents. А после этого начали стучаться к сетевому ресурсу, который называется Shared. Что бедной самбе делать? Постучитесь в torrents и Вам откроется...

#338404
"raziel.kdm" написал:
path = /Shared

Какой-то странный путь в конфиге..
1. Он существует на сервере?
2. В корне шару создавать не стоит

"raziel.kdm" написал:
guest only = yes

Это, думаю, ни к чему.

#338418

Serj,
1 да. он действительно существует. но сами файлы находятся в /Shared/Downloads

У меня появляется стойкая мысль что это что-то с настройками iftables. у меня они определились автоматически вот так:

Показать

eth0 Link encap:Ethernet HWaddr 00:25:22:DD:43:4C
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

eth1 Link encap:Ethernet HWaddr 00:E0:53:13:53:BB
inet addr:192.168.1.6 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:53ff:fe13:53bb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:419 errors:0 dropped:0 overruns:0 frame:0
TX packets:500 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26942 (26.3 KiB) TX bytes:271542 (265.1 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:480 (480.0 b) TX bytes:480 (480.0 b)

У меня раздача ИП идет через дхцп в роутере.
может в этом дело? потому что с самб.конф всё впорядке, вроде.

Показать

workgroup = WORKGROUP
server string = Samba Server Version %v

netbios name = CentOS

interfaces = eth1 192.168.1.6/24
hosts allow = 192.168.1

# --------------------------- Logging Options -----------------------------

# 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 ------------------------
security = share
passdb backend = tdbsam
# ----------------------- Browser Control Options ----------------------------
; local master = no
; os level = 33
; preferred master = yes

#----------------------------- Name Resolution -------------------------------
; wins support = yes
; wins server = w.x.y.z
; wins proxy = yes

; dns proxy = yes

# --------------------------- Printing Options -----------------------------
load printers = yes
cups options = raw
; printcap name = /etc/printcap
#obtain list of printers automatically on SystemV
; printcap name = lpstat
; printing = cups
#============================ 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

[Downloads]
comment = DL
path = /Shared/Downloads
writable = yes
guest ok = yes
;guest only = yes
create mask = 0777
directory mask = 0777

Возможно дело в настройках iptables

Показать

# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A INPUT -s 192.168.1.6/24 -m state --state NEW -p tcp --dport 137 -j ACCEPT
-A INPUT -s 192.168.1.6/24 -m state --state NEW -p tcp --dport 138 -j ACCEPT
-A INPUT -s 192.168.1.6/24 -m state --state NEW -p tcp --dport 139 -j ACCEPT
-A INPUT -s 192.168.1.6/24 -m state --state NEW -p tcp --dport 445 -j ACCEPT
COMMIT
#338427
raziel.kdm написал:
потому что с самб.конф всё впорядке, вроде.
.....
hosts allow = 192.168.1

Ошибаешься.

#338434

эм. у меня в смб.конф она есть.

Я стараюсь исправлять найденные ошибки.

http://pastebin.com/M009zMUp

вот самый последний вариант. Может вы сможете найти что-то что ускользает от моего взгляда? Вроде этой точки.

Спасибо за помощь =)

#338789

Пока ничего. Перепробовал кучу вариантов в смб конфиге. Может всё таки дело не в нём?

Может это брандмауэр? Или ещё хуже что-нибудь в самой винде.

Войдите или зарегистрируйтесь, чтобы ответить.