smbd
e nmbd
.
/usr/share/samba/smb.conf
. So you should really run dpkg-reconfigure samba-common
to adapt it:
FALCOTNET
in our case).
wins server
) the package also proposes identifying the WINS server from the information provided by the DHCP daemon. The Falcot Corp administrators rejected this option, since they intend to use the Samba server itself as the WINS server.
/etc/samba/smb.conf
. O trecho a seguir resumem as alterações que foram feitas na seção [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
[...]
Indicates that Samba should act as a Netbios name server (WINS) for the local network. This option has been removed from the default configuration in Buster and must be added manually if desired.
| |
Esse é o valor padrão para esse parâmetro; contudo, como ele é central para a configuração do Samba, o recomendado é preenchê-lo explicitamente. cada usuário tem que se autenticar antes de acessar qualquer compartilhamento.
|
adduser
por exemplo).
smbpasswd -a usuário
; esse comando pergunta pela senha interativamente.
smbpasswd -x usuário
. Uma conta Samba também pode ser temporariamente desabilitada (com smbpasswd -d usuário
) e reabilitada mais tarde (com smbpasswd -e usuário
).
smbclient
consulta servidores SMB. Ele aceita a opção -U usuário
, para conectar em um servidor sob uma identidade específica. smbclient //servidor/compartilhamento
acessa o compartilhamento de maneira interativa, similar a linha de comando de um cliente FTP. smbclient -L servidor
lista todos os compartilhamentos disponíveis (e visíveis) em um servidor.
mount
permite montar um compartilhamento Windows na hierarquia do sistema de arquivos do Linux (com a ajuda do mount.cifs
fornecido pelo cifs-utils).
/etc/smb-credentials
(o qual não deve ser legível pelos usuários) tem o seguinte formato:
username = user password = password
uid
e gid
permitem forçar o dono e grupo dos arquivos disponíveis na montagem, de modo a não restringir o acesso para o root.
/etc/fstab
:
//servidor/shared /shared cifs credentials=/etc/smb-credentials
umount
.
http://localhost:631/admin
smb://usuário:senha@servidor/impressora
.