Samba Server Interview Questions & Answers

4 avg. rating (80% score) - 1 votes

Samba Server Interview Questions & Answers

Are you preparing for Samba Server interview? Samba Server is a free software written in C and Python which released its stable version in May 2018. It can run on any platform. Samba integrates with Unix, Linux servers to form a Active Directory. It communicates using SMB (Server Message Block) protocol. Candidates are supposed to have basic knowledge on the Samba Server. Many companies are in need of such people. There is less number of people who are skilled in Samba Server. There is huge demand for this technology in the market. Opportunities are everywhere for this technology. Good knowledge on how the process is done will fetch you the job. Wisdomjobs framed Samba Server interview questions and answers to make it easier for your interview preparation.

Samba Server Interview Questions

Samba Server Interview Questions
    1. Question 1. Does Samba Support Pam?

      Answer :

      Yes

    2. Question 2. What Is Role Of "ntlm"?

      Answer :

      The challenge/response authentication protocol available to Windows clients and servers for validating connection requests.

    3. Question 3. Explain "force Group" Parameter Used In Smb.conf?

      Answer :

      It will define the group id to be used for all file access in the place of the user’s primary group.

    4. Question 4. Explain "force User" Parameter Used In Smb.conf?

      Answer :

      It will define the user id to be used for all file access.

    5. Question 5. My Clients Are Getting The Error Message That The Disk Is Full When Trying To Print To My Samba Server, But There Is Plenty Of Space. What Is The Problem?

      Answer :

      If smbd is unable to write the spooled file to the directory defined by the path parameter for a printer if the write permission were denied, for example it would respond to the client with the message, Disk is Full. Samba will also return this error message if the amount of free disk space in the spool directory has fallen below the value specified by the min print space parameter.

    6. Question 6. I Am Trying To Use Swat, But I Keep Getting The Message There Was No Response. The Server Could Be Down Or Not Responding. What Is The Problem?

      Answer :

      The most likely cause is that SWAT is not listening to connections, or you have used the wrong URL in trying to connect to SWAT. SWAT usually lives behind port 901, so the URL you should use is http://ID_ADDRESS_OF_SERVER:901/

    7. Question 7. What Is Swat?

      Answer :

      SWAT is GUI Based administration tool for samba server.

    8. Question 8. Can Samba Be A Member Of More Than One Workgroup At The Same Time?

      Answer :

      No, Samba can be a member of only one workgroup.

    9. Question 9. How Many Simultaneous Connections Can A Samba Server Support?

      Answer :

      In theory, there is no limit. In practice, the limit is determined by the server’s hardware, specifically the total amount of available RAM and the CPU power. It might also depend on the amount of activity from the smbd processes.

    10. Question 10. Explain "smbstatus" Command?

      Answer :

      The smbstatus utility displays information about connected users and currently locked files.

    11. Question 11. Is It Possible For Samba To Share File Systems That Have Been Mounted Using Nfs?

      Answer :

      Yes. However, this can be problematic if the NFS server that provides the file system fails, causing the Samba server to hang. It is always safer to use Samba to share a local file system.

    12. Question 12. What Is The Use Of "smbclient" Command?

      Answer :

      "smbclient" is used to display the list of shares on your server. This verifies that smbd is running and functioning correctly. The -L option instructs smbclient to enumerate the shares on the server rather than actually connecting to one. The   -N switch instructs smbclient to use an anonymous login rather than the login name of the current user.

      smbclient -L localhost -N
      Antother use of "smbclient" command to connect the samba share.
      smbclient //<server>/<share> -U <username>

    13. Question 13. How You Will Verify That Your Smb.conf File Doesn’t Have Any Mistakes And Misspellings?

      Answer :

      "testparm " tool that verifies the syntax of a configuration file(smb.conf).

      testparm -s smb.conf

    14. Question 14. I Want To Use User Level Security For My Samba Server Than What I Have To Add In Smb.conf File?

      Answer :

      security = user.

    15. Question 15. How Man Sections Samba Configuration File (smb.conf) Contains?

      Answer :

      smb.conf file contains three sections:

      1. [global] Contains settings that determine Samba overall behavior.
      2. [homes] A default share for providing a home directory for all users.
      3. [printers] A default share for exporting all printers on the host via CIFS.

    16. Question 16. If A Netbios Name Is Not Defined In Smb.conf, Than What Will Be Netbios Name?

      Answer :

      If a netbios name is not defined, Samba will use the IP hostname of the server by default.

    17. Question 17. How Smb Protocol Works?

      Answer :

      There will be three stages in creating an SMB connection between a client and a specific share on a server.

      The first stage in connecting to an SMB share is to negotiate the SMB protocol dialect to use. In the request packet, the client sends a text listing of all the SMB dialects that it understands. The server selects the most advanced protocol that it knows and responds to the client, specifying the protocol number from the list. At this point, the client and server have agreed that SMB commands can be used for the remainder of the conversation.

      The second stage is to create a session connection between the client and server. To do this, the client issues a session setup request, which includes a sername and some proof of validity, such as a password. The server attempts to validate requesting user. If successful, the server then returns a session UID to client. This UID is unique for each session and has no relation to the server internal representation of users.

      The third stage before access to files on a remote share is allowed is for the client to make a successful tree connection to the shared resource. The client sends to the server a tree connect request, which includes the UID previously issued by the server. At this stage the server verifies that the authenticated user is authorized to access the requested resource. If the user has sufficient privileges to access the share, the client is issued a tree connection ID (TID). The TID is used in all requests to access files contained in the resource to which the TID refers.

      In this way SMB protocol works.

    18. Question 18. What Tcp And Udp Ports Required For Netbios Over Tcp/ip Use?

      Answer :

      The NBT name service uses port 137/udp, the NBT session service uses port 139/tcp, and the NBT datagram service uses port 138/udp.

    19. Question 19. Can Samba Replaces My Windows Nt Pdc?

      Answer :

      Not completely. Samba domain control capabilities for a Windows 9x client are  solid and complete, and so these clients would probably never know the difference. The domain control support for Windows NT/2000 clients is still being developed. Currently, enough has been implemented to allow a Windows NT client to join a Samba-controlled domain, but there is more to domain control than that. The most conspicuous absence is the lack of support for Windows NT trust relationships and the SAM replication protocol used between NT PDCs and Backup Domain Controllers (BDCs).

    20. Question 20. Can Samba Fully Replace My Windows Nt Server That Is Not A Primary Domain Controller (pdc)?

      Answer :

      Samba can completely serve files and printers to Windows, just as a Windows NT server would.

    21. Question 21. How Do I Replicate The Smbpasswd File?

      Answer :

      Replication of the smbpasswd file is sensitive. It has to be done whenever changes to the SAM are made. Every user's password change is done in the smbpasswd file and has to be replicated to the BDC. So replicating the smbpasswd file very often is necessary.As the smbpasswd file contains plaintext password equivalents, it must not be sent unencrypted over the wire. The best way to set up smbpasswd replication from the PDC to the BDC is to use the utility rsync. rsync can use ssh as a transport. ssh itself can be set up to accept only rsync transfer without requiring the user to type a password.As said a few times before, use of this method is broken and awed. Machine trust accounts will go out of sync, resulting in a broken domain. This method is not recommended. Try using LDAP instead.

    22. Question 22. Can Samba Be A Backup Domain Controller To An Nt4 Pdc?

      Answer :

      No. The native NT4 SAM replication protocols have not yet been fully implemented.

    23. Question 23. What Are The Secrity Or Authentication Mode For Samba Server?

      Answer :

      • ADS
      • DOMAIN
      • SERVER
      • USER
      • SHARE

    24. Question 24. How Does A Workstation Find Its Domain Controller?

      Answer :

      There are two different mechanisms to locate a domain controller: one method is used when NetBIOS over TCP/IP is enabled and the other when it has been disabled in the TCP/IP network configuration. Where NetBIOS over TCP/IP is disabled, all name resolution involves the use of DNS, broadcast messaging over UDP, as well as Active Directory communication technologies.

    25. Question 25. Which Protocol Samba Server Uses ?

      Answer :

      SMB, which stands for Server Message Block, is a protocol for sharing files, printers, serial ports, and communications abstractions such as named pipes and mail slots between computers.

    26. Question 26. What Are The Samba Server Types ?

      Answer :

      • Primary Domain Controller (PDC)
      • Backup Domain Controller (BDC)
      • ADS Domain Controller

    27. Question 27. How To Manually Create Machine Trust Accounts ?

      Answer :

      /usr/sbin/useradd -g machines -d /var/lib/nobody -c "machine nickname" -s /bin/false machine_name$
      passwd -l machine_name$

    28. Question 28. Which Selinux Security Context Used For Samba ?

      Answer :

      samba_share_t

    29. Question 29. What Is Samba?

      Answer :

      “Samba is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients." Samba is freely available, unlike other SMB/CIFS implementations, and allows for interoperability between Linux/Unix servers and Windows-based clients.

    30. Question 30. What Is The Configuration File For Samba?

      Answer :

      /etc/samba/smb.conf

    31. Question 31. What Is Cifs?

      Answer :

      The Common Internet File System (CIFS), also known as Server Message Block (SMB), is a network protocol whose most common use is sharing files on a Local Area Network (LAN).  The protocol allows a client to manipulate files just as if they were on the local computer.  Operations such as read, write, create, delete, and rename are all supported – the only difference being that the files are not on the local computer and are actually on a remote server.

    32. Question 32. On Which Ports Samba Server Works ?

      Answer :

      • UDP port 137 for netbios-ns, the NETBIOS Name Service
      • UDP port 138 for netbios-dgm, the NETBIOS Datagram Service
      • TCP port 139 for netbios-ssn, the NETBIOS session service
      • TCP port 445 for microsoft-ds, the Microsoft Domain Service

    33. Question 33. When I Click On My Samba Server In The Network Neighborhood, I Am Continually Prompted For A Password To The Ipc$ Share No Matter What I Enter?

      Answer :

      The Windows client is attempting to use encrypted passwords. However, the Samba server is configured to support only clear-text passwords. You should either enable encrypted passwords on the server or enable clear-text passwords on the Windows client.

    34. Question 34. What Is Winbindd Daemon?

      Answer :

      This daemon should be started when Samba is a member of a Windows NT4 or ADS domain. It is also needed when Samba has trust relationships with another domain. The winbindd daemon will check the smb.conf file for the presence of the idmap uid and idmap gid  parameters. If they are found, winbindd will use the values specified for UID and GID allocation. If these parameters are not specified, winbindd  will start but it will not be able to allocate UIDs or GIDs.

    35. Question 35. What Is Smdb Daemon?

      Answer :

      This daemon handles all TCP/IP-based connection services for file- and print-based operations. It also manages local authentication. It should be started immediately following the startup of nmbd.

    36. Question 36. What Is Nmbd Daemon?

      Answer :

      This daemon handles all name registration and resolution requests. It is the primary vehicle involved in network browsing. It handles all UDP-based protocols. The nmbd daemon should be the first command started as part of the Samba startup process.

    37. Question 37. Why Is Security = Domain Better Than Security = Server?

      Answer :

      There are three reasons why security = domain is better. The first is because this method enables the Samba server to participate in domain trust relationships. This is impossible with server-level security. The second reason is that, under server-level security, each smbd process must keep an open connection with the authentication server. This can drain a Windows NT PDC quickly. Under domain-level security, this connection is maintained only long enough to perform the validation, thus conserving valuable resources. The final reason is that, as a domain member, the Samba server has access to much more information about user accounts, which can be used to automate the creation and deletion of user accounts upon demand.

    38. Question 38. How To Start And Stop Samba Server?

      Answer :

      /etc/init.d/smb  restart
                    Or
      Service smb restart

    39. Question 39. How To Automate Smb Share Mounting During System Startup?

      Answer :

      Add smb share entry in /etc/fstab file.

      //IP_ADDRESS_OF_SERVER/Shared   /shared    smbfs    noauto,defaults  0  0

    40. Question 40. Explain The Parameter "wins Support = Yes" Used In Smb.conf?

      Answer :

      If the Samba server was configured to provide WINS support ("wins support = Yes"), then the WINS server is able to provide name resolution for all of the hosts that are not listed in the /etc/hosts file or within the DNS. Making this adjustment in the Name Service Switch configuration file (/etc/nsswitch.conf) allows the Linux system to query the WINS server for local name resolution. This saves manual adjustments to host files.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Unix/Linux Tutorial