smbd
and nmbd
.
dpkg-reconfigure samba-common
to adapt it:
FALCOTNET
in our case).
/etc/samba/smb.conf
configuration file. The following excerpts summarize the changes that were effected in the [global]
section.
[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 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 # "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. security = user [...]
adduser
for instance).
smbpasswd -a user
command; this command asks for the password interactively.
smbpasswd -x user
command. A Samba account can also be temporarily disabled (with smbpasswd -d user
) and re-enabled later (with smbpasswd -e user
).
smbclient
program queries SMB servers. It accepts a -U user
option, for connecting to the server under a specific identity. smbclient //server/share
accesses the share in an interactive way similar to the command-line FTP client. smbclient -L server
lists all available (and visible) shares on a server.
mount
command allows mounting a Windows share into the Linux filesystem hierarchy (with the help of mount.cifs
provided by cifs-utils).
Example 11.24. Mounting a Windows share
mount -t cifs //arrakis/shared /shared \ -o credentials=/etc/smb-credentials
/etc/smb-credentials
file (which must not be readable by users) has the following format:
username = user password = password
uid
and gid
allow forcing the owner and group of files available on the mount, so as not to restrict access to root.
/etc/fstab
:
//server/shared /shared cifs credentials=/etc/smb-credentials
umount
command.
http://localhost:631/admin
smb://user:password@server/printer
.