smbd
和 nmbd
。
/etc/samba/smb.conf
by plainly copying /usr/share/samba/smb.conf
. So you should really run dpkg-reconfigure samba-common
to adapt it:
FALCOTNET
)。
wins server
),那么软件包还打算从 DHCP 守护进程提供的信息中识别 WINS 服务器。Falcot 公司的管理员拒绝这个选项,因为他们想要使用 Samba 服务器本身作为 WINS 服务器。
/etc/samba/smb.conf
配置文件中修改其它选项。后面的节选概括地总结了在所做的更改,在 [global]
部分中生效。
[...] [global] ## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of workgroup = FALCOTNET [...] # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable its WINS Server wins support = 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 server" 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 obey pam restrictions = yes [...] # "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. security = user [...]
smbclient
程序需要 SMB 服务器。它接受 -U user
选项,用于在特定的身份下连接到服务器上。 smbclient //server/share
与命令行 FTP 客户端相似,以交互的方式访问共享。 smbclient -L server
列出服务器上所有可用(并且可见)的共享。
mount
命令允许将 Windows 共享挂载到 Linux 文件系统层次结构中(在cifs-utils 提供的 mount.cifs
的帮助下)。
/etc/smb-credentials
文件(必须不能被用户读取)具有后面的格式:
username = user password = password
uid
和 gid
允许文件的用户和用户组强制在挂载时得到,从而不限制对根的访问。
/etc/fstab
中配置:
//server/shared /shared cifs credentials=/etc/smb-credentials
umount
command.
http://localhost:631/admin
smb://user:password@server/printer
.