`
gdzhljw
  • 浏览: 98375 次
  • 性别: Icon_minigender_1
  • 来自: 珠海
文章分类
社区版块
存档分类
最新评论

与XP共享文件的配置(不用用户名和密码)

阅读更多

与XP共享文件的配置(不用用户名和密码)

编辑samba.conf
sudo gedit /etc/samba/smb.conf


#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# 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 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 commentary 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]

display charset = UTF-8
unix charset = UTF-8
dos charset = cp936


## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = makhop

# server string is the equivalent of the NT Description field
   server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
;   wins support = no

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

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
;   name resolve order = lmhosts host wins bcast

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = true



#### Debugging/Accounting ####

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

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

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
;   syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
   syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
 security = share
  username map = /etc/samba/smbusers

# You may wish to use password encryption.  See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
   encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.  
   passdb backend = tdbsam

   obey pam restrictions = yes

;   guest account = pcguest
   invalid users = root

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
;   unix password sync = no

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
;   pam password change = no

########## Domains ###########

# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the 'domain master' setting to no
#
;   domain logons = yes
#
# The following setting only takes effect if 'domain logons' is set
# It specifies the location of the user's profile directory
# from the client point of view)
# The following required a [profiles] share to be setup on the
# samba server (see below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
;   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
;   logon drive = H:
;   logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
;   logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

########## Printing ##########

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

# lpr(ng) printing. You may wish to override the location of the
# printcap file
;   printing = bsd
;   printcap name = /etc/printcap

# CUPS printing.  See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
;   printing = cups
;   printcap name = cups

# When using [print$], root is implicitly a 'printer admin', but you can
# also give this right to other users to add drivers and set printer
# properties
;   printer admin = @lpadmin


############ Misc ############

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

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
# for details
# You may want to add the following on a Linux system:
#         SO_RCVBUF=8192 SO_SNDBUF=8192
   socket options = TCP_NODELAY

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
;   domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash

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

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares.  This will share each
# user's home directory as \\server\username
;[homes]
;   comment = Home Directories
;   browseable = no

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.  Un-comment the following parameter
# to make sure that only "username" can connect to \\server\username
;   valid users = %S

# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
;   writable = no

# File creation mask is set to 0600 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0664.
;   create mask = 0600

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
;   directory mask = 0700

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   writable = no
;   share modes = no

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700

wins support = no
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   public = no
   writable = no
   create mode = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# Replace 'ntadmin' with the name of the group your admin users are
# members of.
;   write list = root, @ntadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
;   comment = Samba server's CD-ROM
;   writable = no
;   locking = no
;   path = /cdrom
;   public = yes

# The next two parameters show how to auto-mount a CD-ROM when the
#    cdrom share is accesed. For this to work /etc/fstab must contain
#    an entry like this:
#
#       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
#    is mounted on /cdrom
#
;   preexec = /bin/mount /cdrom
;   postexec = /bin/umount /cdrom


[ubuntu]
path = /media/sda6/ubuntu
available = yes
browsable = yes
public = yes
writable = yes

[临时文件夹]
path = /media/sda6/临时文件夹
available = yes
browsable = yes
public = yes
writable = yes
分享到:
评论

相关推荐

    开通局域网共享(访问本机要填用户名和密码)

    - 提高效率:共享文件和打印机使得在同一网络内的协作变得更加便捷。 6. **注意事项**: - 定期更改密码以增强安全性。 - 不要在不安全的网络环境下开启共享,以避免被恶意攻击。 - 使用复杂的用户名和密码,...

    xp网络密码一目了然

    在XP系统中,用户可能需要连接到各种网络,如家庭、办公室或公共场所的无线网络,系统会自动保存这些网络的登录凭证,包括用户名和密码。当忘记密码或者需要检查已连接网络的详情时,这个功能就显得非常有用。 描述...

    CMD网络命令及用法

    ipconfig (winipcfg) 用于windows NT及XP(windows 95 98)查看本地ip地址,ipconfig可用参数“/all”显示全部配置信息 tlist -t 以树行列表显示进程(为系统的附加工具,默认是没有安装的,在安装目录的Support/tools...

    自动获取本机宽带用户名密码并创建新宽带

    标题中的“自动获取本机宽带用户名密码并创建新宽带”是一项技术操作,主要适用于Windows XP操作系统,不适用于更新的操作系统如Windows 7。这个功能旨在帮助用户方便地获取他们当前使用的宽带连接的用户名和密码,...

    xp共享方法以及常见错误

    3. **修改共享文件**:如果对共享文件进行了修改,当客户端再次尝试访问这些文件时,由于缓存中的凭据仍然有效,因此通常无需重新输入密码。 4. **清除缓存中的凭据**:为了安全起见,可以在需要时清除缓存中的凭据...

    访问Linux下的共享文件

    在配置文件中,可以设置共享文件的名称和共享文件的路径。例如, `[glx_linux]` 域可以设置共享文件的名称为 `This is Glx Linux`,路径为 `/mnt/e_win`。 四、创建 Samba 专用用户 为了让 Windows 用户可以访问 ...

    用samba服务器实现linux与windowsXP之间的文件共享

    使用 Samba 服务器实现 Linux 与 Windows XP 之间的文件共享 Samba 服务器是一种开放源代码的文件共享工具,能够让 Linux 和 Windows 操作系统之间实现文件共享。在本文中,我们将详细介绍如何使用 Samba 服务器...

    Vmware与主机间共享文件的七种方法

    ### Vmware与主机间共享文件的七种方法 #### 方法一:直接在物理机和虚拟机间拖拽文件 这种方式是最直接也是最简单的文件共享方法。用户可以通过简单地将文件从物理机拖拽到虚拟机窗口来实现文件传输。但需要注意...

    家庭网络文件共享设置详解

    3. 访问共享文件需要密码:这通常是由于两台计算机的用户名不同,系统会要求输入相应的凭证。要解决此问题,可以确保使用相同的工作组名称,并为所有计算机设置相同的用户名和密码。 总之,家庭网络文件共享是提高...

    WIN7与XP系统在局域网文件共享设置方法.rar

    完成以上步骤后,你应该能在XP和WIN7系统之间互相访问共享文件了。如果遇到访问问题,检查防火墙设置,确保它们没有阻止文件共享。同时,确保两台计算机的用户名和密码相同,以便进行身份验证。 在教育环境中,这样...

    文件服i务器配置与打开手册

    4. 设置共享文件夹,例如在F盘创建一个名为“共享文件根目录”的文件夹,作为所有共享的起点。 **2. 权限设置** 对于每个部门和用户,需要设定详细的访问权限,例如: - 人事部的李明有完全权限访问其个人文件夹,...

    Windows7无法访问局域网共享文件服务器(提示密码错误).docx

    ### Windows 7 无法访问局域网共享文件服务器(提示密码错误)的解决方案 #### 问题背景 在局域网环境中,Windows 7 用户经常遇到无法访问基于Windows Server 2003 或 Windows XP 的共享文件服务器的问题。这类...

    ftp服务器搭建 linux-xp的通信

    ### FTP服务器搭建与Linux-XP通信详解 #### 一、FTP服务器概述 FTP(File Transfer Protocol)是一种用于在网络上进行文件传输的协议。它主要用于在不同主机之间传输文件,支持多种文件类型,并提供了基本的用户认证...

    xp解决局域网共享,傻瓜化操作

    4. 用户在其他电脑上访问时,需要输入共享计算机的用户名和之前设定的密码。 二、开启局域网共享(访问无需密码) 1. 同样,开启网络发现和文件共享。 2. 在需要共享的文件夹或驱动器的属性中,选择“共享”选项...

    设置局域网和共享文件参考.pdf

    在设置局域网和共享文件的过程中,我们需要确保多台电脑能够通过路由器共享网络资源。以下是一些关键步骤和知识点: 1. **设备购买**:首先,你需要购买一台适合你需求的宽带路由器。通常,路由器品牌有D_LINK或TP_...

    win7与XP之间的共享

    打开别人的文件很简单,只需在XP的“我的电脑”中输入Win7计算机的网络路径(例如,\\计算机名\共享文件夹名),然后输入Win7的用户名和密码,或者如果启用了Guest访问,则无需密码。 总的来说,解决Win7与XP之间的...

    WINDOWS XP系统中使用OPC服务器的配置方法.doc

    - 如果服务端和客户端登陆的用户名不同,则需在服务端用户列表中添加一个与客户端相同的用户名,并在服务端和客户端的DCOM配置中为该用户和USERS组分配相应的权限。 #### 三、本地安全设置 为了提高系统的安全性并...

    解决windows局域网共享批处理

    1. **开通局域网共享(访问本机无需验证即可进入)**:这个批处理文件可能包含命令来配置共享设置,使得其他用户无需输入用户名和密码就能访问你的计算机。这在小型家庭网络或信任的环境中可能是方便的,但在公共或不...

    win7和XP 局域网共享

    以上步骤完成后,你应该能够在Windows 7和Windows XP之间共享文件和打印机了。如果遇到访问问题,检查用户名、密码是否匹配,以及是否开启了网络发现和文件共享。记住,网络安全也很重要,不要随意开放所有共享,...

Global site tag (gtag.js) - Google Analytics