File Sharing Flashcards
Samba, NFS and FTP
Samba got its name from the SMB protocol, what does SMB SMB stand for?
Server Message Block
Which 3 Daemon services does Samba use?
smbd - Samba Daemon
nmbd - Netbios Daemon
winbind - Manages connections between Linux & Windows
What are the 5 Samba package names on Debian based distros?
cifs-utils - utilities to manage shares samba - server function samba-common - configs and docs smbclient - client connections winbind - winbind functions
What are the 5 Samba package names on Redhat based distros?
cifs-utils - utilities to manage shares samba - server function samba-common - configs and docs samba-client - client connections samba-winbind - winbind functions
Where is the samba documentation installed?
/usr/share/doc/samba* or
/usr/share/doc/samba-version
Where does Samba store the storage/DB files?
/var/lib/samba
Where does Samba write log messages?
/var/log/samba
Where is the main samba config file?
/etc/samba/smb.conf
Samba utility that mounts samba shares
mount.cifs
Samba utility that can be used to administer a samba server and remote servers
net
Samba utility that can lookup netbios info
nmblookup
Samba utility that is used to manage samba user databases
pdbedit
Samba utility that executes remote procedure call functions
rpcclient
Samba utility that displays or modifies Samba access control functions
smbcacs
Samba utility that connects, list shares or provides ftp like access to a share
smbclient
Samba utility that manages the smbd daemon
smbcontrol
Samba utility that mounts samba shares - an older tool that has been replaced by mount.cifs
smbmount
Samba utility that manages the samba smbpasswd or tdbsam database
smbpaswd
Samba utility that sends files to a samba printer share
smbspool
Samba utility that displays the status of the samba server connections
smbstatus
Samba utility that createss samba file sare backups
smbtar
Samba utility that tests the syntax of the sm.conf file
testparm
Samba utility that displays winbindd info
wbinfo
Samba utility that is used to configure Samba as an active directory domain controller
samba-tool
Samba directive that defines the workgroup name
workgroup
Samba directive that declares a comment describing the samba server
server string
Samba directive that defines a netbios name for the Samba server (typically only required on legacy windows networks)
netbios name
Samba directive that defines a Kerberos realm
realm
Samba directive that defines which interface(s) to provide the Samba service
interfaces
Samba directive that defines systems that are allowed to access the Samba service
hosts allow
Samba directive that defines systems that should be denied access to the Samba services
hosts deny
Samba directive that stops the nmbd daemon from launching
disable netbios
Samba directive that defines which port numbers to listen on
smb ports
Samba directive that defines enables wins support on a netbios network
wins support
Samba directive that defines the Samba log file
log file
Samba directive that defines the logging level
log level
Samba directive that defines the maximum Samba log size
max log size
0 = no limit
Samba directive that defines the security mode of the server (ads, domain, server,share or user)
security
Samba directive that defines the account database (ldapsam, smbpasswd or tdbsam)
passdb backend
Samba directive that defines if encryption is allowed or required
smb encrypt
Samba file section names are enclosed in square brackets [ ]. Which file section name sets the directives for all shares?
[global]
Samba file section names are enclosed in square brackets [ ]. Which file section name sets the directives for a new share called LPIC-Share?
[LPIC-Share]
Samba file section names are enclosed in square brackets [ ]. Which file section name sets the directives for user home directories?
[homes]
Samba file section names are enclosed in square brackets [ ]. Which file section name sets the directives for a Samba server acting as a domain Controller? (A samba server that is responding to security authentication requests.
[netlogin]
Samba file section names are enclosed in square brackets [ ]. Which file section name sets the directives for printer shares?
[printers]
Samba file section names are enclosed in square brackets [ ]. Which file section name sets the directives for roaming user profiles?
[profiles]
Samba configuration file directive that describes the samba share
comment
Samba configuration file directive that determines if the Samba share is listed as an available share
browseable
Samba configuration file directive that declares a list of authorised users for a share
valid users
Samba configuration file directive that declares a list of unauthorised users for a share
invalid users
Samba configuration file directive that declares the absolute directory for a share
path
Samba configuration file directive that defines whether a password will be required for a share or not.
public
public = no #password required
Samba configuration file directive that allows only guest connections to a share
guest only
Samba configuration file directive that sets a group name for users connecting to a share
group
Samba configuration file directive that defines whether a share is writable or not
writable
Samba configuration file directive that declares a list or users and/or groups that can write to a share
write list
Samba utility that tests thesmb.conf file for errors. You should run this after every edit of smb.conf.
testparm
What does this command do?
pdbedit -L
pdbedit is used to manage backend user databases. The -L option will list the users in the database.
User John has access to a Samba server (192.168.20.10) on his network. How can John check which shares are available on the server?
Use the smbclient command.
smbclient -L //192.168.20.10 -U John
Samba will use DNS, which port does DNS use?
53
Which port numbers does the Samba Netbios feature use?
137 - 139
137 - Netbios Name service
138 - Netbios datagram service
139 - Netbios session service
Which port does Samba use for end point resolution?
135
Which port is used for SMB over TCP?
445
User John has access to a Samba server (192.168.20.10) on his network. How can John access a shared named public and use ftp like commands while connected to the share?
use smbclient
smbclient //192.168.20.10/public -U John
User John has access to a Samba server (192.168.20.10) on his network. How can John access a shared named public as if it were a local directory?
John need to mount the share.
Create a mount point : mkdir /mnt/public
then mount the share: mount -t cifs -o username=John,noperm //192.168.20.10/public /mnt/public
The SMB protocol has two security levels what are they?
user level security and
share level security
share level doesn’t use usernames, just passwords to access a share - it is now deprecated.
user level - users authenticate with a username and a password.