LinuxForum.Fans
Тема

Проблема с просмотром SMB-папок

Автор: ntoskrnl 8 сообщений 8197 просмотров
#13285

Доброго времени суток!
У меня такая проблема: в Mandriva 2010, когда я открываю какую-нибудь папку smb, содержащую много объектов - система долго ее открывает, а потом пишет что время истекло.
Под виндой эта же папка открывается без проблем.
С чем это может быть связано?

#13383

А другие папки открывает?

#13399
vint написал:
А другие папки открывает?

Да. Вот как захожу в папку smb://<servername>/music/Alternative -в трее появляется информация, что происходи процесс открытия папки. Через секунд тридцать он прекращается и Dolphin сообщает, что истекло время ожидания.
Если же открыть, например, smb://<servername>/music/Alternative/Linkin Park - то все открывается без проблем...
В чем может быть проблема?

#13402

Скинь конфиг католога который не открывается сюда:
конфиг тут: tac /etc/samba/smb.conf

#13410

tac /etc/samba/smb.conf

text

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

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

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

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

# vfs object = /usr/lib/samba/vfs/audit.so # Uncomment next line. # Audited directory through experimental VFS audit.so module: ; write list = @staff ; writable = no ; public = yes ; path = /home/samba/public ; comment = Public Stuff ;[public] # the "staff" group # A publicly accessible directory, but read only, except for people in

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

# writeable = yes # browseable = no # valid users = @"Domain Admins" # admin users = @"Domain Admins" # path = / #[admin] # all files (as root). # A share allowing administrators to set ACLs on, or access for backup purposes

lpq command = /bin/true print command = /usr/share/samba/scripts/print-pdf "%s" "%H" "//%L/%u" "%m" "%I" "%J" & #print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP & printing = bsd comment = PDF Generator (only valid users) printable = Yes guest ok = No path = /var/tmp [pdf-gen]

# Note that this only works if 'printing' is *not* set to 'cups' # on the samba server, so that clients can automatically install them. # To streamline this, install windows postscript drivers (preferably colour) # A useful application of samba is to make a PDF-generation service

# force group = +@"Domain Admins" # write list = @"Domain Admins" root # Settings suitable for Winbind: inherit permissions = yes guest ok = yes write list = @adm root browseable = yes path = /var/lib/samba/printers [print$] # on the server, but doesn't require you to use Windows at all :-). # installation of the CUPS driver (http://www.cups.org/windows.php) # and the cups driver by using the 'cupsaddsmb' tool. This requires the # all features available via CUPS on the client, by publishing the ppd file # A special case is using the CUPS Windows Postscript driver, which allows # # /usr/share/doc/samba-<version>/docs/Samba-HOWTO-Collection.pdf # For more information on this, please see the Printing Support Section of # to the directory and share definition to be able to upload the drivers. # in the printer admin parameter above. Note that you also need write access # To be able to install drivers, you need to be either root, or listed # This share is used for Windows NT-style point-and-print support.

use client driver = yes # clients request the driver # If you install drivers on the server, you will want to uncomment this so # print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients). print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers. # ===================================== # print command: see above for details. # ===================================== create mode = 0700 printable = yes writable = no guest ok = yes # to allow user 'guest account' to print. browseable = no path = /var/spool/samba comment = All Printers [printers] # 'printing=cups' # with the commented one. Note that print commands only work if not using # to use 'printcap name = cups' or swap the 'print command' line below # send PostScript ("Generic PostScript Printer" under Windows), you have # done. If you wish that the server provides the driver and the clients # server from Windows (NT/2000/XP). On the Samba server no filtering is # drivers on your Windows clients or upload the printer driver to the # You must configure the samba printers with the appropriate Windows # specifically define each individual printer. # NOTE: If you have a CUPS print system there is no need to

# vfs objects = fake_perms # they have written to the files # If you want read-only profiles, fake permissions so windows clients think # then mkdir -pm700 $PROFILE; chown '%u':'%g' $PROFILE;fi #root preexec = PROFILE='/var/lib/samba/profiles/%u'; if [ ! -e $PROFILE ]; \ # hasn't been thoroughly tested. # You may want to turn off guest acces if you enable this, as it # This script can be enabled to create profile directories on the fly # writable = yes # guest ok = yes # browseable = no # path = /var/lib/samba/profiles #[Profiles] # the default is to use the user's home directory # Un-comment the following to provide a specific roving profile share

#root postexec = rm -f '/var/lib/samba/netlogon/%u.bat' #root preexec = /usr/bin/ntlogon -u '%u' -g '%g' -o %a -d /var/lib/samba/netlogon/ #location (the default of the ntlogon rpm available in contribs) #be created dynamically by ntlogon (check that you have it in the correct #Uncomment the following 2 lines if you would like your login scripts to

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

# vscan-clamav: config-file = /etc/samba/vscan-clamav.conf # vfs objects = vscan-clamav recycle # is running # For virus scanning, install samba-vscan-clamav and ensure the clamd service # the base of the share and ensure all users will have write access to it. # Uncomment the next 2 lines (make sure you create a .recycle folder in # share basis: # You can enable VFS recycle bin and on-access virus-scanning on a per writable = yes browseable = no comment = Home Directories [homes] #============================ Share Definitions ==============================

# unix charset = ISO8859-1 # dos charset = 850 # This is an example for french users: # ISO8859-5 (Russian Cyrillic), KOI8-R (Alt-Russ. Cyril.) # UNIX: ISO8859-1 (Western European), ISO8859-2 (Eastern Eu.), # 950 (Trad. Chin.). # 936 (Japanese - Shift-JIS), 936 (Simpl. Chinese), 949 (Korean Hangul), # 852 (Eastern Eu.), 861 (Icelandic), 932 (Cyrillic - Russian), # Windows: 437 (US), 737 (GREEK), 850 (Latin1 - Western European), # you can match a Windows code page with a UNIX character set. # Enabling internationalization:

# case sensitive = no # Be very careful with case sensitivity - it can break things! # default case = lower # Default case is normally upper case for all DOS files # short preserve case = no # preserve case = no # NOTE: These can be set on a per share basis # Case Preservation can be handy - system default is _no_ # 8. File Naming Options:

dns proxy = no # this has been changed in version 1.9.18 to no. # via DNS nslookups. The built-in default for versions 1.9.17 is yes, # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names

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

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

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

# name resolve order = wins lmhosts bcast # - OR - are not deliberately to be known via lmhosts or via WINS. # on the local network segment # The example below excludes use of name resolution for machines that are NOT # in order to resolve NetBIOS names to IP Addresses. Use with care! # dependant. This parameter is most often of use to prevent DNS lookups # and the /etc/resolv.conf file. "host" therefore is system configuration # DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf # system gethostbyname() function call that will use either /etc/hosts OR # the default order is "host lmhosts wins bcast". "host" means use the unix # 'Name Resolve Order' allows the named resolution mechanism to be specified # All NetBIOS names must be resolved to IP Addresses # 7. Name Resolution Options:

# ldap idmap suffix = cn=Idmap # ldap group suffix = cn=Groups # ldap user suffix = cn=Users # ldap machine suffix = cn=Computers # Example for AD-ish layout: # ldap idmap suffix = ou=Idmap # ldap group suffix = ou=Group # ldap user suffix = ou=People # ldap machine suffix = ou=Hosts # Example for a unix-ish directory layout: # ldap suffix appears first, it is appended to the specific suffix. # Seperate suffixes are available for machines, users, groups, and idmap, if # ldap suffix = dc=mydomain,dc=com # ldap port = 389 # start_tls should run on 389, but samba defaults incorrectly to 636 # ldap ssl = start_tls # ldap admin dn = cn=root,dc=mydomain,dc=com # running 'smbpasswd -w mypassword' # You will need to give samba the password for this dn, by # This account needs to have write access to the LDAP tree # The account (dn) that samba uses to access the LDAP server # LDAP configuration for Domain Controlling:

# idmap backend = ldap:ldap://ldap.mydomain.com # Idmap backend to use: # Idmap settings (set idmap uid and idmap gid above):

# passdb backend = ldapsam_compat:ldaps://ldap.mydomain.com smbpasswd guest # Use the samba2 LDAP schema: # passdb backend = ldapsam:ldaps://ldap.mydomain.com smbpasswd guest # Enable SSL by using an ldaps url, or enable tls with 'ldap ssl' below. # LDAP with fallback to smbpasswd guest # passdb backend = tdbsam smbpasswd guest # TDB backen with fallback to smbpasswd and guest # passdb backend = smbpasswd guest # Default: # passdb backends may be used, but users will only be added to the first one # Samba now has runtime-configurable password database backends. Multiple # Samba Password Database configuration:

# enable privileges = yes # to the domain # Enable priveleges, ie allowing members of Domain Admins to join machines

# Domain groups are now configured by using the 'net groupmap' tool # Domain groups:

# add machine script = /usr/sbin/smbldap-useradd -w -d /dev/null -c 'Machine Account' -s /bin/false '%u' # configure in /etc/samba/smbldap_conf.pm first): # Script for domain controller with LDAP backend for adding machines (please # add machine script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M '%u' # Script for domain controller for adding machines: # or the operation will fail. Check that groups exist if forcing a group. # The script must work from the command line when replacing the macros, # controller to add local machine accounts when adding machines to the domain. # The add machine script is use by a samba server configured as a domain

# delete group script = /usr/sbin/smbldap-groupdel '%g' # add group script = /usr/sbin/smbldap-groupadd '%g' && /usr/sbin/smbldap-groupshow %g|awk '/^gidNumber:/ {print $2}' # set primary group script = /usr/sbin/smbldap-usermod -g '%g' '%u' # delete user from group script = /usr/sbin/smbldap-groupmod -x '%u' '%g' # add user to group script = /usr/sbin/smbldap-groupmod -m '%u' '%g' # delete user script = /usr/sbin/smbldap-userdel '%u' # add user script = /usr/sbin/smbldap-useradd -m '%u' # and needs configuration in smbldap_conf.pm # Scripts for LDAP backend (assumes nss_ldap is in use on the domain controller,

# delete group script = /usr/sbin/groupdel '%g' # add group script = /usr/sbin/groupadd %g && getent group '%g'|awk -F: '{print $3}' # set primary group script = /usr/sbin/usermod -g '%g' '%u' # delete user from group script = /usr/bin/gpasswd -d '%u' '%g' # add user to group script = /usr/bin/gpasswd -a '%u' '%g' # delete user script = /usr/sbin/userdel '%s' # add user script = /usr/sbin/useradd -s /bin/false '%u' # Scripts for file (passwd, smbpasswd) backend:

# users via the Windows NT Tools (ie User Manager for Domains). # that have been authenticated by the domain controller, or when adding # The add user script is used by a domain member to add local user accounts

# logon home = \\%L\%u\.profile # impacts where Win2k finds it's /HOME share # Where to store roaming profiles for Win9x. Be careful with this as it also

# logon path = \\%L\Profiles\%u # You must uncomment the [Profiles] share below # %L substitutes for this servers netbios name, %u is username # Where to store roaming profiles for WinNT and Win2k

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

# domain logons = yes # Windows95 workstations or Primary Domain Controller for WinNT and Win2k # Enable this if you want Samba to be a domain logon server for # 6. Domain Control Options:

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

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

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

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

# remote announce = 192.168.1.255 192.168.2.44 # Cause this host to announce itself to local subnets here # remote browse sync = 192.168.3.25 192.168.5.255 # a specific host or from / to a whole subnet (see below) # request announcement to, or browse list sync from: # Configure remote browse list synchronisation here

# interfaces = 192.168.12.2/24 192.168.13.2/24 # here. See the man page for details. # If you have multiple network interfaces then you must list them # Configure Samba to use multiple interfaces # 5. Browser Control and Networking Options:

# template shell = /bin/bash # template shell determines the shell users authenticated by winbind get #

# obey pam restrictions = yes # enable obedience of pam restrictions below: # using 'service=system-auth-winbind' in pam_stack modules, and then # on the fly for authenticated users. Ensure that /etc/pam.d/samba is # When using winbind, you may want to have samba create home directories

# template homedir = /home/%D/%U # %D expanding to their domain name and %U expanding to their username: # template homedir determines the home directory for winbind users, with # # winbind use default domain = yes # workgroup parameter. # in the form user instead of DOMAIN+user for the domain listed in the # winbind use default domain allows you to have winbind return usernames # # winbind separator = + # name and username, defaults to "\" # winbind separator is the character a user must use between their domain # # idmap gid = 10000-20000 # winbind gid is the range of uid's winbind can use when mapping RIDs to gid's # # idmap uid = 10000-20000 # winbind uid is the range of uid's winbind can use when mapping RIDs to uid's # # and gid's. winbind uid and winbind gid are the only required parameters. # accounts on the fly, and maintaining a mapping of Windows RIDs to unix uid's # authentication from a Windows or samba domain controller, creating # Options for using winbind. Winbind allows you to do all account and

# include = /etc/samba/smb.conf.%m # of the machine that is connecting # on a per machine basis. The %m gets replaced with the netbios name # Using the following line enables you to customise your configuration

; username map = /etc/samba/smbusers # Unix users can map to different SMB User names

;*passwd:*all*authentication*tokens*updated*successfully* ; passwd chat = *New*UNIX*password* %n\n *Re*ype*new*UNIX*password* %n\n \ # passwd program = /usr/bin/passwd '%u' ; pam password change = yes # enable pam password change # You either need to setup a passwd program and passwd chat, or ; unix password sync = Yes # to be kept in sync with the SMB password. # the encrypted SMB passwords. They allow the Unix password # NOTE2: You do NOT need these to allow workstations to change only # NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above. # also update the Linux system password. # The following are needed to allow password changing from Windows to

smb passwd file = /etc/samba/smbpasswd encrypt passwords = yes # members of a domain do not need one. # The smbpasswd file is only required by a server doing authentication, thus # Encrypted passwords are required for any use of samba in a Windows NT domain # Do not enable this option unless you have read those documents # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. # You may wish to use password encryption. Please read

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

# password server = * # password server = <NT-Server-Name> # When using security = domain, you should use password server = * # Use password server option only with security = server or security = domain security = user # security_level.txt for details. # Security mode. Most people will want user level security. See

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

# hosts allow = 192.168.1. 192.168.2. 127. # not work for all the hosts in your network. # the smb.conf man page. Do not enable this if (tcp/ip) name resolution does # the "loopback" interface. For more examples of the syntax see # following example restricts access to two C class networks and # connections to machines which are on your local network. The # This option is important for security. It allows you to restrict # 4. Security and Domain Membership Options:

# log level = 3 # Set the log (verbosity) level (0 <= log level <= 10)

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

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

# run: net rpc rights grant 'DOMAIN\Printer Operators' SePrintOperatorPrivilege # Printer admins are now defined by granting the SePrintOperatorPrivilege, ie: # enable it below. # Note that this feature uses the print$ share, so you will need to # server. The printer admins (or root) may install drivers onto samba. # use this, you need to be able to upload print drivers to the samba # Samba 2.2 supports the Windows NT-style point-and-print feature. To

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

printcap cache time = 60 # printcap cache time, so samba will automatically load new cups printers

load printers = yes printcap name = cups # than setting them up individually then you'll need this # if you want to automatically load your printer list rather # (as cups is now used in linux-mandrake 7.2 by default) # CHANGES TO ENABLE PRINTING ON ALL CUPS PRINTERS IN THE NETWORK # 2. Printing Options:

; message command = /usr/bin/linpopup "%f" "%m" %s; rm %s # The example below is for use with LinPopUp: # Message command is run by samba when a "popup" message is sent to it.

server string = %h # server string is the equivalent of the NT Description field

# netbios name = <name_of_this_server> # but defaults to your hostname # netbios name is the name you will see in "Network Neighbourhood",

workgroup = MDKGROUP # workgroup = NT-Domain-Name or Workgroup-Name # 1. Server Naming Options:

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

А что значит "конфиг каталога который не открывается"? У каждого каталога свой конфиг?

#13457

Сорри.. я протупил.
Попробуй поставить компы в одну рабочую группу.
Строку "workgroup = MDKGROUP" измени на ту рабочуую группу которая в исккспи.. если ничего не меня, то вписать надо WORKGROUP это стандартная рабочая группа винды.
Установи имя машины:
"# netbios name = <name_of_this_server>"
Должно получится типа что-то: netbios name = mdvcomp
Далее перезапускай самбу:
# service smb restart

Если снова не получится, дай лог самбы
# cat /var/log/samba/имя_сервера.log

#13503

данная проблема наблюдается с 2008й версии, думал к 2010й все поправят.
Далее: покажите листинг каталога /etc/samba, если есть файл smb-winbind.conf, то удалите его или переименуйте mv smb-winbind.conf smb-winbind.conf.old, далее в конфиге явно пропишете interfaces = ваш ip адрес. про netbios name вам уже сказали, далее перезапустите smb, /etc/init.d/smb restart

#14179

Щас пробую...

Не вышло :(
Я не знаю в чем тут дело. Но раньше, кагда я входил в сеть через Wi-Fi такой проблемы не было. А теперь даже с Wi-Fi та же картина. Пршлось опять в винду вернуться.

Что за ерунда может твориться с самбой?
Вот почему как только я решил пересесть на линукс - сразу возникли проблемы! Сначала с Nvidia G105M - кстати драйвер до сих пор некорректно работает (видимо потому что beta), потом compiz+emerald не дружат (опять-таки на форуме никто так и не смог помочь), Потом с интернетом тупняки начались - не мог нормально vpn настроить (слава богу настроил - даже сам!!!).
Теперь вот Самба.... Думаю, если найду в чем косяк - окончательно перейду на mandriva.

Уж не знаю в чем дело...
Выполняю команду service smb restart
после этого папки начинают открываться, все....
А через минуту - опять такая же песня - при попытке открыть любую папку - он пишет - истекло время ожидания сервера natalie



И вот еще - ip у меня динамический - я не могу его прописывать в конфиге напрямую....

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