我正在使用 Samba 客户端尝试从 Linux 查看驻留在 Windows-10 64 位计算机上的共享目录。samba 安装在我的 xUbuntu 18.04 64 位笔记本电脑上。XUbuntu 就像普通的 Ubuntu 一样,只是它使用了我喜欢的 XFCE 桌面。我对我的 /etc/samba/smb.conf 做了一些更改,但不清楚具体需要做什么。
两台计算机都是“FSI”工作组的一部分。我启动服务 smbd 和 nmbd。然后,通过 Linux 笔记本电脑上的文件浏览器,我可以转到 FSI 工作组并查看 Windows 机器 {名为“TIBERIUS”} 以及名为 {“XENOBA-LIN”} 的 Linux 笔记本电脑。但是我不能去查看共享目录或 TIBERIUS 上的任何目录。当两台机器都重新启动到 Windows 时,我可以。
我不希望 Linux 笔记本电脑成为服务器,因为它只是间歇性地在网络上。windows 机器应该是主要的名称服务器和服务器。这是我在 Linux 机器上的 smb.conf 的缩写副本。
/etc/samba/smb.conf
#======================= Global Settings =======================
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = FSI
# 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 = yes
# 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
#### Networking ####
### note IP 192.168.1.72 is for Tiberius: the remote Windows machine ####
### anyhow it's commented out I think ###
; interfaces = 192.168.1.72/8 eth0
# Only bind to the named interfaces and/or networks; you must use the
; bind interfaces only = yes
####### Authentication #######
# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
#
# Most people will want "standalone sever" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
server role = standalone server
# 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
# 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 = yes
# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<[email protected]> for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\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 = yes
# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
map to guest = bad user
########## Domains ###########
############ Misc ############
# all the usual defaults here except when listed
# Maximum number of usershare. 0 (default) means that usershare is disabled.
; usershare max shares = 100
# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
usershare allow guests = yes
我还要附上截图