#======================= Global Settings =====================================
[global]
unix charset = UTF-8
# ----------------------- Network Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
workgroup = WORKGROUP
server string = Samba Server Version %v
; netbios name = MYSERVER
; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.
# --------------------------- Logging Options -----------------------------
.....
.....
# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
security = share
passdb backend = tdbsam
# ----------------------- Domain Members Options ------------------------
#
...
...
[sambashare1]
path = /sambashare1
guest ok = yes
browseable = yes
write mode = 777
directory mode = 777
writable = yes
share modes = yes
Permissions on the directory
[root@localhost sambashare1]# ls -la /
total 114
....
drwxrwxrwx. 2 tester root 4096 Oct 20 05:53 sambashare1
Here's my /etc/smb/smbusers File
# Unix_name = SMB_name1 SMB_name2 ...
root = administrator admin tester
nobody = guest pcguest smbguest
我能在Windows上查看共享文件夹,但由于权限问题无法访问。
我已经验证了以下内容:
SELINUX已禁用
两台机器可以相互PING(这就是为什么共享文件夹在Windows资源管理器中可见)。
我还执行了以下操作:
打开运行命令并输入"secpol.msc"。
当Vista提示时,点击"继续"。
点击"本地策略" --> "安全选项"。
导航到策略"网络安全:LAN 管理器身份验证级别"并打开它。
默认情况下,Windows Vista将该策略设置为"仅限NTVLM2响应"。将其更改为"LM 和 NTLM - 如果协商使用 NTLMV2 会话安全,则使用 NTLM"。
请告诉我需要运行的命令。这仅用于测试目的,以便根据需要在Linux或Windows上创建新用户帐户并修改smb.conf文件。
这是我想要的:
能够无限制地访问共享文件夹。任何人都应该能够访问。
谢谢。
更新:
我的/etc/samba/smb.conf文件如下:
#======================= Global Settings =====================================
[global]
workgroup = WORKGROUP
security = user
map to guest = bad password
#============================ Share Definitions ==============================
[MyShare]
path = /home/samba/share
browsable =yes
writable = yes
guest ok = yes
read only = no
available = Yes
create mode = 0644
directory mode = 0754
valid users = healy
force user = root
[Secure]
path = /home/samba/secure
guest ok = yes
writable = yes
create mask = 0664
browsable = yes
available = Yes
create mode = 0644
directory mode = 0754
valid users = healy
force user = root
我甚至在Windows系统上创建了用户healy和root,尝试从那里访问。这些Windows上的用户与Linux中的密码相同。
我可以查看目录结构,但无法创建文件或查看任何文件。