LPIC-2 · domain
File Sharing and Samba
Practise Linux Professional Institute Certification Level 2 LPIC-2 File Sharing and Samba practice questions — original exam-style scenarios with answer choices, explanations, and analysis of common mistakes.
Focused practice
Practice File Sharing and Samba questions
Scored sessions drawing only from this domain — pick a length below.
Start 20-question practice test →What this domain covers
What to know about File Sharing and Samba
File Sharing and Samba questions test whether you can apply the concept in context, not just recognise a definition.
How the topic appears in realistic exam-style scenarios.
Which detail in the question changes the correct answer.
How to eliminate plausible but wrong options.
How to connect the question back to the wider exam objective.
Watch out for
Common File Sharing and Samba exam traps
- ▸Answering from memory before reading the full scenario.
- ▸Missing a constraint such as cost, availability, security, scope or command context.
- ▸Choosing a broad answer when the question asks for the most specific fix.
- ▸Ignoring why the wrong options are tempting.
Question index
All File Sharing and Samba questions (92)
Click any question to see the full explanation, or start a practice session above.
A Samba share is configured with 'guest ok = yes'. What must also be configured to allow guest access?
Easy2An administrator has configured Samba as a domain member for an Active Directory environment. For user authentication via winbind, which daemon must be running?
Easy3An administrator sets up a Samba server with 'security = user'. Users are stored in the local smbpasswd file. After changing a user's Unix password, the user cannot access Samba shares. What should the administrator do?
Medium4After modifying /etc/samba/smb.conf, which command should be used to verify the syntax before restarting the Samba service?
Easy5A Samba share is configured with 'writable = no'. What does this mean?
Easy6A Samba share is used by macOS clients. File names with special characters (e.g., ©) appear garbled. Which parameter should be added to the share configuration?
Hard7A 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?
Medium8Match each RAID level to its description.
Medium9A Samba administrator needs to configure a share that allows only the user 'alice' and the group 'developers' to read and write files. Others should have no access. Which two parameters should be set in the share definition? (Choose two.)
Hard10A company runs a mixed environment with Linux and Windows clients. The Samba server is configured as a domain member for authentication. Users authenticate via Active Directory using winbind. Recently, the IT department implemented a new password policy that requires all users to change passwords every 90 days. After the policy took effect, several users report that they cannot access Samba shares from their Linux clients (using smbclient) even though they can log into their Windows desktops with the same credentials. The error message on Linux is 'session setup failed: NT_STATUS_LOGON_FAILURE'. The administrator runs 'wbinfo -a username%password' and it succeeds. What is the most likely cause?
Medium11In a Samba domain member server, which file contains the SID to Unix ID mappings?
Medium12Which TWO commands can be used to list Samba shares on a remote server?
Easy13Which TWO of the following are valid methods to join a Samba server to an Active Directory domain using Samba 4?
Hard14An organization uses a Samba server as a standalone file server. The share 'Projects' is configured with browseable = yes and guest ok = no. Users authenticate with local Samba accounts. A new employee needs access but cannot authenticate. The administrator added the user with 'smbpasswd -a newuser' and set a password. When the user tries to connect, they get 'NT_STATUS_LOGON_FAILURE'. The administrator verifies the username and password are correct. smb.conf includes: security = user, passdb backend = tdbsam. What is the most likely cause?
Medium15A Samba server is configured with 'security = ads' and joined to an Active Directory domain. Users report that SIDs are not being resolved correctly. Which service and configuration file are critical for ID mapping?
Medium16Which THREE configuration directives are necessary to enable Winbind for Active Directory authentication on a Samba domain member?
Hard17Which TWO of the following are common symptoms of a misconfigured winbind service when Samba is joined to an Active Directory domain?
Medium18A company uses a Samba server (version 4.12) on Ubuntu 20.04 to provide file sharing for the engineering department. The server has a share [projects] defined in smb.conf with the following parameters: `path = /srv/projects`, `valid users = @engineers`, `read only = no`, `create mask = 0660`, `directory mask = 0770`. All users in the engineers group can authenticate and list the share contents but they report that they cannot create new files or modify existing ones. The command `ls -ld /srv/projects` shows `drwxrwxr-x`, and the directory is owned by root:engineers. The sysadmin has confirmed that the file system permissions on /srv/projects are set to 2775, but the setgid bit does not appear in the ls output. Additionally, users are able to create files in other shares on the same server that are configured similarly. Which of the following is the most likely cause and solution?
Hard19Arrange the steps to configure a Linux system as an Apache virtual host.
Medium20Refer to the exhibit. A user in the group 'staff' attempts to access the share 'share' from a Windows client. The user is prompted for credentials and authenticates successfully, but cannot write any files. What is the most likely reason?
Medium21Which TWO files are commonly used by Samba for configuration and user authentication? (Choose two.)
Easy22In Samba 4, what is the default security mode when no 'security' parameter is set in the [global] section?
Easy23Which TWO global parameters can be used to control the security mode of a Samba server?
Medium24Refer to the exhibit. A user reports that they can connect to the 'shared' share from a Windows client and read files, but cannot write any files. The share permissions on the filesystem are set to 777 on /srv/samba/shared. What is the most likely cause of the write failure?
Medium25Windows clients cannot see the Samba server in Network Neighborhood, but they can access shares by typing the UNC path. Which Samba daemon must be running?
Medium26You 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?
Hard27After modifying smb.conf, which command should be used to verify the configuration syntax before restarting Samba?
Easy28Which legacy SMB protocol version should be disabled for security best practices on a modern Samba server?
Easy29An administrator needs to create a Samba share that allows all users in the 'staff' group read/write access, but denies access to everyone else. Which configuration achieves this?
Medium30Refer to the exhibit. A user attempts to access the 'public' share without authentication. What will be the outcome?
Easy31An administrator configures a Samba share with guest access. After testing, guests are prompted for a password. Which directive should be added to the [global] section to allow guest access without a password?
Easy32Based on the smbstatus output, which statement is true?
Hard33Which TWO parameters are used to control Samba's printer sharing? (Choose two.)
Medium34A Samba server experiences slow file transfers for large files. The administrator suspects oplock issues. Which set of parameters should be adjusted to disable opportunistic locking?
Hard35A Samba share is configured with 'browseable = yes' but Windows clients cannot see it in the network list. However, they can access it by typing the UNC path directly. Which parameter is most likely misconfigured?
Easy36What is the most likely error in the configuration?
Easy37A Samba share uses the 'acl_xattr' VFS module to store NT ACLs in extended attributes. The administrator runs 'getfattr -d /srv/share/file.txt' and sees no system attributes related to NT ACLs. What is the most likely cause?
Hard38Which Samba component provides NetBIOS name resolution and browsing services?
Easy39An organization runs a Samba server in standalone mode. They want to allow anonymous (guest) access to a public share. Which configuration option enables guest access for a share?
Medium40A company has a Samba server configured as a domain member in an Active Directory domain. The server runs Samba 4.13. Recently, Windows clients have been unable to access shares, and the domain join seems broken. The administrator runs 'net ads testjoin' and gets 'Join to domain is not valid'. The smb.conf includes: security = ads, realm = EXAMPLE.COM, workgroup = EXAMPLE. The administrator can successfully resolve the domain controller via DNS. What should the administrator do to fix the issue?
Hard41Which TWO of the following are valid ways to map a Windows user to a Linux account in Samba?
Medium42A client reports that the [public] share is visible but all files appear read-only. What is the cause?
Medium43A Samba share is intended for guest (anonymous) access. Which global parameter must be set to allow this?
Easy44A 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?
Easy45Samba is integrated with Active Directory using security = ads. Which service is required for Kerberos authentication?
Hard46A company runs Samba on a Linux server to provide file shares to Windows clients. The server is also a BIND DNS server. After a recent OS upgrade, the Samba service fails to start with the error: 'Failed to create a listening socket for port 445: Permission denied'. The administrator checks that no other service is using port 445. smbd is configured to start as root. What is the most likely cause?
Medium47An organization is using Samba as a PDC with an LDAP backend for user accounts. Which idmap backend configuration is appropriate for RFC 2307?
Hard48Which TWO parameters in the [global] section are REQUIRED for a Samba server to act as a standalone server (not a member of a domain)?
Medium49A system administrator wants to configure a Samba share that grants read-only access to the 'staff' group and full control to the 'managers' group. Which share configuration achieves this?
Easy50A Samba share is configured with 'force user = jane'. A user 'bob' accesses the share. With what effective user ID will file operations be performed?
Medium51Which TWO smb.conf parameters can be used to restrict access to a share based on client IP address or network?
Easy52A company uses Samba to share files from a Linux server to Windows clients. After upgrading Samba from version 4.10 to 4.15, some users report they cannot access shares and receive 'Access denied' errors. The smb.conf has been verified and seems correct. What is the most likely cause?
Medium53Refer to the exhibit. A user cannot connect to the 'share2' Samba share. What is the most likely cause?
Hard54A Linux server running Samba as a domain member is experiencing slow authentication for users. Which two configuration changes are most likely to improve authentication performance?
Medium55A Samba server is configured as a classic PDC (Primary Domain Controller) for a legacy network. The administrator needs to add a new machine account for a client joining the domain. Which command accomplishes this?
Hard56Your company runs a Samba file server (version 4.15) in a mixed environment with Windows 10 and Linux clients. The server is part of an Active Directory domain. Recently, a new security policy requires that all SMB connections use SMB3 encryption. You have configured 'smb encrypt = required' in the [global] section of smb.conf and restarted smbd. However, Windows clients report that they cannot connect to the server, while Linux clients can connect using mount.cifs with the 'seal' option. You check smb.conf and verify that 'server min protocol = SMB3' is set. What is the most likely cause of the Windows clients' inability to connect?
Hard57A company wants to use Samba to share files with Windows clients. Which service must be enabled in Samba to support Windows Active Directory domain membership?
Easy58A Samba server is configured to authenticate users against an Active Directory domain using winbind. After joining the domain, some users report that they cannot access shares, while others can. The administrator runs 'wbinfo -u' and sees a list of domain users. However, 'getent passwd' does not show domain users. Which configuration parameter is most likely missing or misconfigured in /etc/samba/smb.conf?
Medium59A Samba server uses 'security = domain' with an NT4-style domain. After a domain controller outage, users cannot authenticate. Which configuration change would allow fallback to local authentication?
Hard60A Samba server is experiencing slow authentication for domain users. The logs show repeated winbind connections to the domain controllers. The administrator suspects that winbind is not caching credentials properly. Which parameter should be checked or increased to improve caching?
Hard61Which THREE are valid values for the 'security' parameter in smb.conf? (Choose three.)
Hard62A Samba server is configured as a domain member in an Active Directory environment. Users report that after changing their password on a Windows client, they cannot authenticate to Samba shares. The Samba server is using winbind and the 'idmap_ad' backend. What is the most likely cause?
Hard63Refer to the exhibit. What does the output indicate about the user John Doe's access to the file report.txt?
Medium64An administrator needs to configure Samba to allow guest access to a share. Which two parameters must be set?
Medium65A user wants to mount a Samba share on a Linux client using the command line. Which utility is used for that purpose?
Easy66A user 'bob' is unable to save changes to report.doc. Based on the exhibit, what is the most likely reason?
Hard67After modifying /etc/samba/smb.conf, an administrator runs a command to validate the configuration. Which command is correct?
Easy68Given the smb.conf exhibit, which share(s) allow write access to user 'alice' who is a member of the 'staff' group?
Medium69A small office uses a Linux server running Samba to share documents. The share is accessible but very slow, especially when writing large files. The network is 1 Gbps, and disk performance is fine. The smb.conf has default settings. Which change is most likely to improve write performance?
Easy70Which THREE of the following parameters can improve Samba file transfer performance under heavy load?
Medium71A Linux server provides file sharing to Windows clients via Samba. The administrator notices that Windows clients are unable to resolve the NetBIOS name of the server. Which two services are essential for NetBIOS name resolution? (Choose two.)
Easy72Which TWO conditions are most likely to cause 'NT_STATUS_ACCESS_DENIED' when accessing a Samba share?
Hard73A Samba server is configured with 'vfs objects = recycle' to implement a recycle bin. After some time, users notice that deleted files are not appearing in the recycle bin. Which parameter is likely misconfigured?
Hard74A new user needs access to a Samba share. The administrator adds the user to the system with `adduser alice` and then sets up a Samba password. Which command is used to set the Samba password?
Easy75What is the purpose of the 'idmap config * : backend = tdb2' line?
Easy76Which THREE statements about Samba's 'net' command are true? (Choose three.)
Hard77A 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?
Hard78An administrator wants to restrict access to a Samba share based on client IP addresses. Which parameter in the [share] section of smb.conf should be used?
Medium79An enterprise environment uses Samba as an Active Directory domain controller using Samba 4.11. The administrator needs to configure a read-only domain controller (RODC) for a remote branch office. Which of the following steps is correct?
Hard80A Samba server is configured as above. Users alice and bob have local system accounts but neither can connect to the share. What is the most likely cause?
Medium81A Samba server is configured to store NT ACLs on a Linux filesystem that does not support them natively. Which VFS module should be used to map NT ACLs to POSIX ACLs?
Hard82A 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?
Medium83A Samba share requires that users must provide valid credentials, but the share should be accessible to any authenticated user without further restrictions. Which security mode should be used?
Medium84An administrator is setting up a Samba share for a project team. The team members are in different UNIX groups. Which three options can be used to restrict access to specific users or groups? (Choose three.)
Medium85Which THREE commands are specifically used to diagnose Samba issues?
Easy86A Samba server configured as an Active Directory domain member is unable to authenticate users from the domain. The administrator verifies that DNS resolution works, but `wbinfo -u` returns no output. What is the most likely cause?
Hard87A user in group staff (but not admin) tries to write to the share. What is the most likely error?
Medium88A user alice is connected to the 'data' share via smbd, but a file is locked. Which command can forcibly close the file?
Hard89An administrator wants to configure Samba to allow only specific users to access a share. Which TWO configuration parameters in smb.conf can be used to restrict access based on usernames?
Easy90A Samba server provides printer sharing using CUPS. Which three global parameters are essential for CUPS integration? (Select THREE)
Medium91A company is migrating from a workgroup environment to an Active Directory domain. The Samba server is already configured as a domain member using winbind. The administrator wants to ensure that files created by domain users on the Samba server are owned by the corresponding UNIX user accounts derived from the domain. Which idmap backend and configuration is recommended for this purpose?
Hard92A Samba server is configured with 'security = ads' and joined to an Active Directory domain. Users can authenticate but cannot access shares. The smb.conf includes 'winbind use default domain = yes'. What could be the problem?
HardOther domains
All LPIC-2 exam domains
Frequently asked questions
- What does the File Sharing and Samba domain cover on the LPIC-2 exam?
- File Sharing and Samba questions test whether you can apply the concept in context, not just recognise a definition.
- How many questions are in this domain?
- This page lists all 92 File Sharing and Samba questions in the LPIC-2 question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
- What is the best way to practise this domain?
- Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
- Can I practise only File Sharing and Samba questions?
- Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.