samb共享在WINDOWS的网络邻居里不能看到
amwisk
|
1#
amwisk 发表于 2008-02-11 00:25
samb共享在WINDOWS的网络邻居里不能看到
配置文件如下,工作组为WORKGROUP,不需要密码的完全共享。文件改好重启后却不能在WINXP的网络邻居看到这台机器,请高手指点:
[root@localhost samba]# more 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 # # Any line which starts with a ; (semi-colon) or a # (hash) # is a comment and is ignored. In this example we will use a # # for commentry and a ; for parts of the config file that you # may wish to enable # # NOTE: Whenever you modify this file you should run the command "testparm" # to check that you have not made any basic syntactic errors. # #======================= Global Settings ===================================== [global] # 1. Server Naming Options: # workgroup = NT-Domain-Name or Workgroup-Name workgroup = workgroup # netbios name is the name you will see in "Network Neighbourhood", # but defaults to your hostname netbios name = <name_of_this_server> # server string is the equivalent of the NT Description field server string = Samba Server %v # Message command is run by samba when a "popup" message is sent to it. # The example below is for use with LinPopUp: ; message command = /usr/bin/linpopup "%f" "%m" %s; rm %s 5. Browser Control and Networking Options: # Configure Samba to use multiple interfaces # If you have multiple network interfaces then you must list them # here. See the man page for details. interfaces = 192.168.1.0/24 192.168.13.2/24 # Configure remote browse list synchronisation here # request announcement to, or browse list sync from: # a specific host or from / to a whole subnet (see below) # remote browse sync = 192.168.3.25 192.168.5.255 # Cause this host to announce itself to local subnets here # remote announce = 192.168.1.255 192.168.2.44 # set local master to no if you don't want Samba to become a master # browser on your network. Otherwise the normal election rules apply # local master = no # OS Level determines the precedence of this server in master browser # elections. The default value should be reasonable # os level = 33 # Domain Master specifies Samba to be the Domain Master Browser. This # allows Samba to collate browse lists between subnets. Don't use this # if you already have a Windows NT domain controller doing this job # domain master = yes # Preferred Master causes Samba to force a local browser election on startup # and gives it a slightly higher chance of winning the election # preferred master = yes #============================ Share Definitions ============================== [homes] path=/home/tiger/图片 comment = tiger`s files browseable = yes writable = no # You can enable VFS recycle bin and on-access virus-scanning on a per # share basis: # Uncomment the next 2 lines (make sure you create a .recycle folder in # the base of the share and ensure all users will have write access to it. # For virus scanning, install samba-vscan-clamav and ensure the clamd service # is running # vfs objects = vscan-clamav recycle # vscan-clamav: config-file = /etc/samba/vscan-clamav.conf # 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 #Uncomment the following 2 lines if you would like your login scripts to #be created dynamically by ntlogon (check that you have it in the correct #location (the default of the ntlogon rpm available in contribs) #root preexec = /usr/bin/ntlogon -u '%u' -g '%g' -o %a -d /var/lib/samba/netlogo n/ #root postexec = rm -f '/var/lib/samba/netlogon/%u.bat' # 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 # writable = yes # This script can be enabled to create profile directories on the fly # You may want to turn off guest acces if you enable this, as it # hasn't been thoroughly tested. #root preexec = PROFILE='/var/lib/samba/profiles/%u'; if [ ! -e $PROFILE ]; \ # then mkdir -pm700 $PROFILE; chown '%u':'%g' $PROFILE;fi # If you want read-only profiles, fake permissions so windows clients think # they have written to the files # vfs objects = fake_perms # NOTE: If you have a CUPS print system there is no need to # specifically define each individual printer. # You must configure the samba printers with the appropriate Windows # drivers on your Windows clients or upload the printer driver to the # server from Windows (NT/2000/XP). On the Samba server no filtering is # done. If you wish that the server provides the driver and the clients # send PostScript ("Generic PostScript Printer" under Windows), you have # to use 'printcap name = cups' or swap the 'print command' line below # with the commented one. Note that print commands only work if not using # 'printing=cups' [printers] comment = All Printers path = /var/spool/samba browseable = no # to allow user 'guest account' to print. guest ok = yes writable = no printable = yes create mode = 0700 # ===================================== # print command: see above for details. # ===================================== print command = lpr-cups -P %p -o raw %s -r # using client side printer dri vers. # print command = lpr-cups -P %p %s # using cups own drivers (use generic Post Script on clients). # If you install drivers on the server, you will want to uncomment this so # clients request the driver use client driver = yes # This share is used for Windows NT-style point-and-print support. # To be able to install drivers, you need to be either root, or listed # in the printer admin parameter above. Note that you also need write access # to the directory and share definition to be able to upload the drivers. # For more information on this, please see the Printing Support Section of # /usr/share/doc/samba-<version>/docs/Samba-HOWTO-Collection.pdf # # A special case is using the CUPS Windows Postscript driver, which allows # all features available via CUPS on the client, by publishing the ppd file # and the cups driver by using the 'cupsaddsmb' tool. This requires the # installation of the CUPS driver (http://www.cups.org/windows.php) # on the server, but doesn't require you to use Windows at all :-). [print$] path = /var/lib/samba/printers browseable = yes write list = @adm root guest ok = yes inherit permissions = yes # Settings suitable for Winbind: # write list = @"Domain Admins" root # force group = +@"Domain Admins" # A useful application of samba is to make a PDF-generation service # To streamline this, install windows postscript drivers (preferably colour) # on the samba server, so that clients can automatically install them. # Note that this only works if 'printing' is *not* set to 'cups' [pdf-gen] path = /var/tmp guest ok = No printable = Yes comment = PDF Generator (only valid users) printing = bsd #print command = /usr/share/samba/scripts/print-pdf file path win_path recipi ent IP & print command = /usr/share/samba/scripts/print-pdf "%s" "%H" "//%L/%u" "%m" " %I" "%J" & lpq command = /bin/true # A share allowing administrators to set ACLs on, or access for backup purposes # all files (as root). #[admin] # path = / # admin users = @"Domain Admins" # valid users = @"Domain Admins" # browseable = no # writeable = yes # This one is useful for people to share files ;[tmp] ; comment = Temporary file space ; path = /tmp ; read only = no ; public = yes # A publicly accessible directory, but read only, except for people in # the "staff" group ;[public] ; comment = Public Stuff ; path = /home/samba/public ; public = yes ; writable = no ; write list = @staff # Audited directory through experimental VFS audit.so module: # Uncomment next line. # vfs object = /usr/lib/samba/vfs/audit.so # Other examples. # # A private printer, usable only by Fred. Spool data will be placed in Fred's # home directory. Note that fred must have write access to the spool directory, # wherever it is. ;[fredsprn] ; comment = Fred's Printer ; valid users = fred ; path = /homes/fred ; printer = freds_printer ; public = no ; writable = no ; printable = yes # A private directory, usable only by Fred. Note that Fred requires write # access to the directory. ;[fredsdir] ; comment = Fred's Service ; path = /usr/somewhere/private ; valid users = fred ; public = no ; writable = yes ; printable = no # a service which has a different directory for each machine that connects # this allows you to tailor configurations to incoming machines. You could # also use the %u option to tailor it by user name. # The %m gets replaced with the machine name that is connecting. ;[pchome] ; comment = PC Directories ; path = /usr/pc/%m ; public = no ; writable = yes # The following two entries demonstrate how to share a directory so that two # users can place files there that will be owned by the specific users. In this # setup, the directory should be writable by both users and should have the # sticky bit set on it to prevent abuse. Obviously this could be extended to # as many users as required. ;[myshare] ; comment = Mary's and Fred's stuff ; path = /usr/somewhere/shared ; valid users = mary fred ; public = no ; writable = yes ; printable = no ; create mask = 0765 |