LPIC-2 File Sharing and Samba • Complete Question Bank
Complete LPIC-2 File Sharing and Samba question bank — all 0 questions with answers and detailed explanations.
A Samba administrator notices that Windows clients cannot access a shared directory. The share is defined in smb.conf as follows:
[shared]
path = /srv/samba/shared valid users = @staff browseable = yes read only = no
The /srv/samba/shared directory has permissions 755 and is owned by root:staff. Which is the most likely cause of the access issue?
Refer to the exhibit. [global] workgroup = MYGROUP server string = Samba Server security = user [share1] path = /srv/samba/share1 valid users = alice, bob read only = no [share2] path = /srv/samba/share2 valid users = @staff read only = yes [share3] path = /srv/samba/share3 guest ok = yes read only = no
Refer to the exhibit. $ smbstatus Samba version 4.15.2 PID Username Group Machine Protocol Version 12345 alice staff win10-pc (192.168.1.10) SMB3_11 12346 bob users win7-pc (192.168.1.11) SMB2_10 Service pid Machine Connected at share1 12345 win10-pc Tue Mar 14 10:00:00 2023 share2 12346 win7-pc Tue Mar 14 10:05:00 2023 Locked files: Pid Uid DenyMode Access R/W Oplock SharePath Name 12345 1001 DENY_NONE 0x100089 RDONLY NONE /srv/samba/share1 report.pdf 12346 1002 DENY_NONE 0x100089 RDONLY NONE /srv/samba/share2 data.xls
A Samba server is configured as a print server. Clients running Windows 10 report that printer drivers cannot be uploaded. The relevant smb.conf section is:
[printers]
comment = All Printers path = /var/spool/samba browseable = no printable = yes
What is the most likely cause?
A company runs a mixed Linux/Windows environment. The Samba server (version 4.15) is configured as a domain member using 'security = ADS'. Recently, the IT team enabled 'winbind use default domain = yes' to simplify logins. After the change, users report that they can no longer access Samba shares when authenticating with just their username (e.g., 'jdoe') instead of 'DOMAIN\jdoe'. However, authentication using the full domain-qualified name still works. The smb.conf includes:
[global]
security = ADS workgroup = MYDOM realm = MYDOM.LOCAL winbind use default domain = yes winbind separator = /
Users are in the 'Domain Users' group and the share configuration is:
[share]
path = /srv/share valid users = @"MYDOM\domain users"
Which of the following is the most likely cause and solution?
Refer to the exhibit. [global] workgroup = WORKGROUP server string = %h server (Samba, Ubuntu) security = user map to guest = Bad User log file = /var/log/samba/log.%m max log size = 1000 load printers = Yes [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = yes read only = yes create mask = 0700 [shared] path = /srv/samba/shared browseable = yes read only = no guest ok = yes
You are the administrator for a small office network with 20 Linux workstations and 5 Windows 10 clients. The company uses a Samba server (version 4.15) running on Ubuntu 22.04 to share a central directory /data with user-level security. Each user has a home directory on the server, and all users are in the 'staff' group. Recently, users have complained that they can access the /data share from Windows but cannot modify any files, even though they could before. The Samba configuration for the share is:
[data]
path = /data browseable = yes read only = no valid users = @staff create mask = 0660 directory mask = 0770 force group = staff
You check the filesystem permissions on /data and find it is owned by root:staff with permissions 775. Files inside are owned by individual users and group staff with permissions 664. You also check smbstatus and see that users are connected as 'guest' rather than their actual username. What is the most likely cause of the problem?
Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
Striping without redundancy
Mirroring for redundancy
Striping with distributed parity
Striping with double distributed parity
Mirrored stripes combining RAID 1 and RAID 0
[global] workgroup = WORKGROUP server string = %h server security = user map to guest = Bad User log file = /var/log/samba/log.%m max log size = 50 [public] path = /srv/samba/public guest ok = yes read only = yes browseable = yes
Samba version 4.15.9 PID Username Group Machine Protocol Version Encryption Signing ---------------------------------------------------------------------------------------------------------------------------------------- 12345 johndoe domain users 192.168.1.100 (ipv4:192.168.1.100:49152) SMB3_11 - partial(AES-128-CMAC) Service pid Machine Connected at Encryption Signing ----------------------------------------------------------------------------------------- share1 12345 192.168.1.100 Mon Oct 25 10:30:45 2024 - partial Locked files: Pid Uid DenyMode R/W Oplock SharePath Name Time ----------------------------------------------------------------------------------------- 12345 1002 DENY_NONE RDONLY NONE /srv/samba/share1 report.txt Mon Oct 25 10:35:00 2024
[2024/10/25 11:00:00.123456, 0] ../../source3/smbd/service.c:1413(make_connection_snum) canonicalize_connect_path failed for service share2, path /srv/samba/share2 [2024/10/25 11:00:00.123457, 0] ../../source3/smbd/service.c:1458(make_connection_snum) make_connection_snum: canonicalize_connect_path failed.
Refer to the exhibit. Partial output of testparm -v: [global] workgroup = EXAMPLE server string = Samba File Server security = USER map to guest = Bad User guest account = nobody [public] path = /srv/samba/public browseable = yes read only = yes guest ok = yes create mask = 0755
Refer to the exhibit. Output from smbstatus: Locked files: Pid DenyMode Access R/W Oplock SharePath Name 1234 DENY_WRITE RDONLY RDONLY NONE /srv/samba/share report.doc Service pid machine user connected_at share 1234 192.168.1.10 alice Thu Jan 25 10:30:00 2024
Refer to the exhibit. smb.conf (partial): [global] workgroup = EXAMPLE security = user idmap config * : backend = tdb2 idmap config * : range = 10000-20000 [nfs_share] path = /srv/nfs/share browseable = no guest ok = no
Refer to the exhibit. [global] workgroup = EXAMPLE security = user passdb backend = tdbsam [data] path = /srv/samba/data valid users = @staff write list = @admin read only = yes
Refer to the exhibit. $ smbstatus -S Service pid machine Connected at ------------------------------- data 1234 client1 Mon Jan 20 10:00:00 2025 $ pdbedit -L -v | grep -A5 "Unix username" Unix username: alice NT username: EXAMPLE\\alice Account Flags: [U ] User SID: S-1-5-21-123456789-1001 Primary Group SID: S-1-5-21-123456789-513 Full Name: Alice Home Directory: \\server\\alice Home Drive: H: Script Path: \\server\\netlogon\\alice.bat Profile Path: \\server\\profiles\\alice
Refer to the exhibit. $ testparm -s Load smb config files from /etc/samba/smb.conf Processing section "[global]" Unknown parameter encountered: "security mode" Ignoring unknown parameter "security mode" Processing section "[share]" Loaded services file OK.
The following output is from 'testparm -v' for a Samba server:
[global]
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
netbios name = SAMBA-SRV
security = USER
map to guest = Bad User
passdb backend = tdbsam
printing = cups
printcap name = cups
[share]
path = /srv/share
valid users = @staff
read only = Yes
guest ok = NoA small office uses a Samba server for file sharing. The server is running Samba 4.9 on Ubuntu 18.04. Recently, the administrator added a new user 'john' to the system and added him to the 'staff' group. However, when John tries to access the share 'docs' from his Windows laptop, he gets an 'Access Denied' error. The share configuration is:
[docs]
path = /srv/docs valid users = @staff read only = No create mask = 0644 directory mask = 0755
The administrator verifies that John is a member of the staff group by running 'groups john' which shows staff. Other users in staff can access the share. What is the most likely cause?
Refer to the exhibit. Exhibit: [global] workgroup = WORKGROUP security = user passdb backend = tdbsam [share] path = /srv/share valid users = alice, bob read only = no