当前位置: 技术问答>linux和unix
samba配置文件smb.conf 帮忙阿!!!!!!!!!
来源: 互联网 发布时间:2015-02-10
本文导语: 我是个菜鸟 大家帮忙看看这个文件那里有错 每当testparm通过 smbclint -L SMBclient时候就会connection failed 我已经把nmbd smbd 起动了阿 #======================= Global Settings ===================================== [global] # workgr...
我是个菜鸟
大家帮忙看看这个文件那里有错
每当testparm通过
smbclint -L SMBclient时候就会connection failed
我已经把nmbd smbd 起动了阿
#======================= Global Settings =====================================
[global]
# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = mshome
netbios name=SMBserver
# server string is the equivalent of the NT Description field
server string = apple's Samba Server
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
hosts allow = 192.168.1. 192.168.2. 127.
# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest
# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/%m.log
# Put a capping on the size of the log files (in Kb).
max log size = 10
# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = user
# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
# The following are needed to allow password changing from Windows to
# update the Linux system password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %nn *Retype*new*password* %nn *passwd:*all*authentication*tokens*updated*successfully*
# You can use PAM's password change control flag for Samba. If
# enabled, then PAM will be used for password changes when requested
# by an SMB client instead of the program listed in passwd program.
# It should be possible to enable this without changing your passwd
# chat parameter for most setups.
pam password change = yes
# Unix users can map to different SMB User names
; username map = /etc/samba/smbusers
# 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 = /etc/samba/smb.conf.%m
# This parameter will control whether or not Samba should obey PAM's
# account and session management directives. The default behavior is
# to use PAM for clear text authentication only and to ignore any
# account or session management. Note that Samba always ignores PAM
# for authentication in the case of encrypt passwords = yes
obey pam restrictions = yes
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
dns proxy = no
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775
# This one is useful for people to share files
[tmp]
comment = Temporary file space
path = /tmp
read only = no
public = yes
大家帮忙看看这个文件那里有错
每当testparm通过
smbclint -L SMBclient时候就会connection failed
我已经把nmbd smbd 起动了阿
#======================= Global Settings =====================================
[global]
# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = mshome
netbios name=SMBserver
# server string is the equivalent of the NT Description field
server string = apple's Samba Server
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
hosts allow = 192.168.1. 192.168.2. 127.
# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest
# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/%m.log
# Put a capping on the size of the log files (in Kb).
max log size = 10
# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = user
# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
# The following are needed to allow password changing from Windows to
# update the Linux system password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %nn *Retype*new*password* %nn *passwd:*all*authentication*tokens*updated*successfully*
# You can use PAM's password change control flag for Samba. If
# enabled, then PAM will be used for password changes when requested
# by an SMB client instead of the program listed in passwd program.
# It should be possible to enable this without changing your passwd
# chat parameter for most setups.
pam password change = yes
# Unix users can map to different SMB User names
; username map = /etc/samba/smbusers
# 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 = /etc/samba/smb.conf.%m
# This parameter will control whether or not Samba should obey PAM's
# account and session management directives. The default behavior is
# to use PAM for clear text authentication only and to ignore any
# account or session management. Note that Samba always ignores PAM
# for authentication in the case of encrypt passwords = yes
obey pam restrictions = yes
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
dns proxy = no
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775
# This one is useful for people to share files
[tmp]
comment = Temporary file space
path = /tmp
read only = no
public = yes
|
hosts allow = 192.168.1. 192.168.2. 127.
你的网络是不是在这个范围内?
有没有wins,smb.conf里面没看到关于wins的配置?
你的网络是不是在这个范围内?
有没有wins,smb.conf里面没看到关于wins的配置?
|
如果没有wins可以把samba配置成wins,其它windows机器的wins设置里面的ip都改成samba的机器;如果有wins机器,那么samba的wins设置应该指向它。
如果实在麻烦就在smbclient 里面在加个-I参数明确指明ip
如果实在麻烦就在smbclient 里面在加个-I参数明确指明ip
|
hosts allow 把他注释掉,默认允许所有IP访问
|
你的MODE 应该是755,不是644,应该假山个可执行,否则,WINDOWS下不可以打开
r4, w 2 ,x1,所以应该是755,而不是644
r4, w 2 ,x1,所以应该是755,而不是644
|
你先把IP搞清楚了,你的机器的ip,你的samba机器的ip,wins机器的ip
而且开头的hosts allow = 192.168.1. 192.168.2. 127. 也可能有问题,这个配置根本就不支持 192.160.0网段的访问。
而且开头的hosts allow = 192.168.1. 192.168.2. 127. 也可能有问题,这个配置根本就不支持 192.160.0网段的访问。
|
老兄,我也发过帖子问了类似的问题,结果跟你的问题一样,哈哈。