smbd
and nmbd
.
dpkg-reconfigure samba-common samba
.
FALCOTNET
in our case). Another question asks whether passwords should be encrypted. The answer is that they should, because it's a requirement for the most recent Windows clients; besides, this increases security. The counterpart is that this required managing Samba passwords separately from the Unix passwords.
inetd
or as stand-alone daemons. Using inetd
is only interesting when Samba is rarely used; the Falcot administrators therefore picked stand-alone daemons.
/var/lib/samba/passdb.tdb
file for storing encrypted passwords; this option was accepted, since this system is much more efficient than the standard /etc/samba/smbpasswd
text file.
/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 # server string is the equivalent of the NT Description field server string = %h server (Samba %v) # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable its WINS Server wins support = yes [...] ####### Authentication ####### # "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. See # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html # in the samba-doc package for details. security = user # You may wish to use password encryption. See the section on # 'encrypt passwords' in the smb.conf(5) manpage before enabling. encrypt passwords = true # If you are using encrypted passwords, Samba will need to know what # password database type you are using. passdb backend = tdbsam guest [...] ########## Printing ########## # If you want to automatically load your printer list rather # than setting them up individually then you'll need this load printers = yes # lpr(ng) printing. You may wish to override the location of the # printcap file ; printing = bsd ; printcap name = /etc/printcap # CUPS printing. See also the cupsaddsmb(8) manpage in the # cups-client package. printing = cups printcap name = cups [...] ######## File sharing ######## # Name mangling options ; preserve case = yes ; short preserve case = yes unix charset=ISO8859-1
Indicates that Samba should act as a Netbios name server (WINS) for the local network.
| |
This is the default value for this parameter; however, since it is central to the Samba configuration, filling it explicitly is recommended. Each user must authenticate before accessing any share.
| |
Tells Samba to automatically share all local printers that exist in the CUPS configuration. Restricting access to these printers is still possible, by adding appropriate sections.
| |
Specifies the printing system in use; in our case, CUPS.
| |
Specifies the character set and encoding used for file names under Linux. The default value is UTF8 (Unicode).
|
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
).
[global]
section of the configuration file:
domain logons = yes preferred master = yes logon path = \\%L\profiles\%U logon script = scripts/logon.bat
[netlogon] comment = Network Logon Service path = /var/lib/samba/netlogon guest ok = yes writable = no share modes = no [profiles] comment = Profile Share path = /var/lib/samba/profiles read only = No profile acls = Yes
/var/lib/samba/profiles/user
), and each of them must be owned by the matching 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.
smbmount
command allows mounting a Windows share into the Linux filesystem hierarchy.
Example 11.29. Mounting a Windows share
smbmount //arrakis/shared /shared -o credentials=/usr/local/etc/smb-credentials
/usr/local/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.
smbumount
command unmounts an SMB share.
http://localhost:631/admin
.
smb://user
:password
@server
/printer
.