Article feb2007.tar

Test Your Knowledge of Samba Topics

Emmett Dulaney

Samba is one of those technologies that you must know if you are working with integration today. Its importance is such that it is a focal point of the newly announced LPIC-3 certification from the Linux Professional Institute. Following are fifty questions on general aspects of Samba that anyone working with it at an advanced level should know. Good luck (answers are at the end of the article)!

Questions

1. Which of the following is not one of the common Samba daemons?

A. globd
B. winbindd
C. smbd
D. nmbd

2. Which of the following commands can be used to see where the smb.conf file should be on the system?

A. smbd -a | grep smb.conf
B. smbd -b | grep smb.conf
C. smbd -c | grep smb.conf
D. smbd -d | grep smb.conf

3. Which of the following is a Web-based interface that can be used for configuring Samba?

A. SMBW
B. SNOW
C. SWAT
D. TESTPARM

4. Using Samba, you want to login to a Unix host named EVAN with a login name of Kristin. Which of the following commands should you use?

A. smbclient -l kristin EVAN
B. smbclient //EVAN/kristin
C. smbclient (EVAN) kristin
D. smbclient -h EVAN -n kristin

5. Which of the following commands can be used to see the shares available on the Samba server named SPENCER?

A. smbclient -L SPENCER
B. net show SPENCER
C. showall SPENCER
D. smbshow //SPENCER

6. You want your Samba server to become the master browser for the network. Currently, the "os level” option is smb.conf is set to 20, which is the default. What should you set this to in order to win elections and function as the master browser if it is the only Samba system on the network?

A. 0
B. 1
C. 21
D. 33

7. Which of the following commands is used to reference the static LMHOSTS file?

A. nmbd -D
B. smbd - A
C. nmbd -H
D. smbd -S

8. Which option can be used with the nmblookup utility to do a node status query?

A. -M
B. -R
C. -r
D. -S

9. Which tool can be used to manage user accounts stored in the SAM database via the passdb modular interface?

A. vipw
B. pdbedit
C. prosis
D. conpwd

10. Which command can be used to verify/validate the sections of the smb.conf file?

A. smbverify
B. smbd -i
C. smbd /testparms
D. testparm -s

11. Which of the following smbclient parameters causes the client to write messages to standard error instead of standard output?

A. -S
B. -E
C. -o
D. -os

12. Samba supports the ability for DOS and Windows clients to use files that don't follow the 8.3 naming convention. What is this ability known as?

A. File mapping
B. Name mapping
C. Name mangling
D. File conversion

13. Within Samba, what are the default permissions applied as a directory security mask?

A. 07770700
B. 07550775
C. 07000700
D. 07770777

14. Which Samba utility is available for manipulating NT quotas on SMB file shares?

A. smbquota
B. smbcquotas
C. nmbquota
D. nmbdset

15. By default, where does smbd send error information?

A. Log file
B. Standard output
C. Null
D. All of the above

16. What does Samba use for authentication?

A. .hosts
B. .rhosts
C. /etc/passwd
D. PAM

17. Which account flag within smbpasswd indicates the account is disabled and no SMB/CIFS logins will be allowed?

A. W
B. D
C. N
D. U

18. You are using the smbstatus utility and want to see a short listing of the output. Which option should you use to accomplish this?

A. -t
B. -r
C. -s
D. -b

19. Which of the following utilities can be used to query and return information about who created and used the winbindd daemon?

A. winshow
B. tbshow
C. wbinfo
D. winbindlist

20. Using the smbpasswd utility, which option should be used to delete the entry for a specified username?

A. -d
B. -x
C. -e
D. -D

21. What winbindd option causes the process not to daemonize?

A. -P
B. -S
C. -F
D. -C

22. Within which section of the smb.conf file should you place parameters for services connecting clients to their home directories?

A. [global]
B. [homes]
C. [env]
D. [shared]

23. Which uses can use the pdbedit utility?

A. Only root
B. Members of the admin group
C. -Any user for their own account, only root for other accounts
D. -Any user for their own account, only member of the admin group for all other accounts

24. Which account flag within smbpasswd indicates the account is a regular user account?

A. W
B. D
C. N
D. U

25. What licensing model does Samba employ?

A. GNU XPL
B. GNU LGPL
C. GNU GPL
D. None of the above

26. Within which directory can log files be found for default installations?

A. /tmp/logs/samba
B. /usr/loca/samba/var
C. /etc/logs/samba
D. /var/loca/samba/logs

27. You have run the command smbclient -L CENTRY on your Unix server named CENTRY and received an error that you indicates a bad password. Which of the following lines in the smb.conf file could likely be causing this error?

A. hosts allow
B. rhosts common
C. location
D. layer

28. You want to force all clients to use a local profile (no roaming). Which two entries should be added to smb.conf to accomplish this (choose two)?

A. logon home =
B. logon path =
C. roaming = no
D. local = yes

29. What does the command smbpasswd -a root do?

A. Resets the Samba password for the root user
B. Makes all Samba users have root permissions
C. Adds the user root to the Samba password backend
D. Shows the existing permissions in Samba

30. In order for roaming profiles to be used, you must specify the location of the profile within smb.conf. What else must you do?

A. Enable the user of individual profiles
B. Disable the use of group profiles
C. Configure the Samba server as a domain controller
D. Copy all profiles t the Samba server

31. Your implementation of Samba requires tweaking of variables in PAM. In what two locations could the configuration files be found (choose two)?

A. /var/pam
B. /var/tmp/pam.conf
C. /etc/pam.d/
D. /etc/pam.conf

32. Within which section of the smb.conf file should you place parameters that apply as defaults for items not otherwise specified?

A. [global]
B. [homes]
C. [env]
D. [shared]

33. If you want to use CUPS printing with Samba, which of the following lines should be smb.conf?

A. [printcap /cups]
B. all printing = /etc/cups
C. print setup = cupsd.conf
D. printing = cups

34. Which account flag within smbpasswd indicates the account is a workstation trust account?

A. W
B. D
C. N
D. U

35. After configuring CUPS to be used with Samba, what utility can be used to transfer printer drivers into the Samba share?

A. smbaddcups
B. cupsaddsmb
C. addcupssmb
D. addsmbcups

36. You want to query the WINS server KAREN for the domain master browser used by the AU workgroup. Which command should you use?

A. net -R KAREN -M 'AU'
B. use -R KAREN -MB AU
C. nmblookup -U KAREN -R 'AU#1B'
D. nmbd - m AU -r KAREN

37. In which share should Samba printer drives need to reside with CUPS?

A. [printers]
B. [shares]
C. [drivers]
D. [print$]

38. Samba depends on default mappings for three global groups. For which one of the following does this not apply?

A. Domain Admins
B. Domain Guests
C. Domain Printers
D. Domain Users

39. Connection logs from Samba can commonly be found beneath /usr/loca/samba/var or which of the following?

A. /etc/nmbd/logs
B. /etc/logs/samba
C. /var/log/samba
D. /nmbd/samba/logs

40. Which utility is included with the Samba suite and can be used to change SIDs in Windows Registry files?

A. edtsid
B. SIDEdit
C. SIDWalker
D. profiles

41. Using the smbpasswd utility, which option should be used to disable the entry for a specified username?

A. -d
B. -x
C. -e
D. -D

42. Which Samba utility is similar to Network Neighborhood in the Windows world?

A. smbshow
B. smbtree
C. smbhood
D. smblist

43. Which account flag within smbpasswd indicates the account has no password?

A. W
B. D
C. N
D. U

44. Which of the following is the default location of the smb.conf file?

A. /etc
B. /etc/samba
C. /usr/samba/lib
D. /usr/local/samba/lib/

45. In which Samba file can an entry be placed for Administrator users to map to root users?

A. /etc/samba/passwd
B. /etc/samba/smb.conf
C. /etc/samba/smbusers
D. /etc/samba/hosts

46. On which port does SWAT run, by default?

A. 1601
B. 1301
C. 1101
D. 901

47. You want to verify that an anonymous connection can be made to the Samba server. What can be used with smbclient to specify a null username and password?

A. -U%
B. -2<&1
C. -()
D. None of the above

48. Which option can be used with the nmblookup utility to see the version number of the program?

A. -B
B. -V
C. -T
D. -O

49. Which of the following commands can be used to delete any ACLs specified on the command line?

A. acls -r
B. rcpclient -rm
C. smbcacls -D
D. cacls -rd

50. While creating a user account with the pdbedit utility, you want to specify that user's home directory. Which option can be used to specify this?

A. -d
B. -h
C. -A
D. -shadow

Answers

1. The three common Samba daemons are nmbd, smbd, and winbindd. Answer: A.

2. The command smbd-b | grep smb.conf will identify where the file should be based on where the binaries are located. Answer: B.

3. SWAT is the Web-based interface that can be used for configuring Samba. Answer: C.

4. The command smbclient //EVAN/kristin will attempt to establish a connection with host EVAN using the login name of kristin. Answer: B.

5. The command smbclient -L SPENCER will show the shares available on the host SPENCER. Answer: A.

6. Setting the value to 33 will put it above Windows 200x servers (which use a value of 32) and help it win the elections. Answer: D.

7. The command nmbd -H is used to identity the NetBIOS LMHOSTS file to use for name resolution. Answer: C.

8. The -S option is used to do a node status query (returning the NetBIOS names registered). Answer: C.

9. The pdbedit utility can be used to manage user accounts stored in the SAM database via the passdb modular interface. Answer: B.

10. The command testparm -s can be used to verify/validate the sections of the smb.conf file. Answer: D.

11. The -E parameter sends messages to standard error. Answer: B.

12. Name mangling in Samba supports the ability for DOS and Windows clients to use files that don't follow the 8.3 naming convention. Answer: C.

13. The default security mask permissions set are 07770700. Answer: A.

14. The smbcquotas Samba utility is available for manipulating NT quotas on SMB file shares. Answer: B.

15. By default, smbd sends error information to a log file. Answer: A.

16. By default, Samba uses PAM for authentication. Answer: D.

17. The D flag indicates the account is disabled. Answer: B.

18. The -b option is used to signal the utility to give brief output. Answer: D.

19. The wbinfo utility can be used to query and return information about who created and used the winbindd daemon. Answer: C.

20. The -x option is used to delete an entry. Answer: B.

21. The -F winbindd option causes the process not to daemonize. This is useful when working with other process supervisors. Answer: C.

22. In the [homes] section of the smb.conf file you should lace parameters for services connecting clients to their home directories. Answer: B.

23. Only the root user can use the pdbedit utility. Answer: A.

24. The U flag indicates the account is for a regular user. Answer: D.

25. The licensing model used by Samba is the GNU General Public License (GPL). Answer: C.

26. Beneath /usr/loca/samba/var you can find log files for default installations. Answer: B.

27. The hosts allow entry could be causing this error to occur. Answer: A.

28. Setting both the logon home and logon path to blank entries will accomplish this. Answer: A & B.

29. This command adds the user root to the Samba password backend. Answer: C.

30. You must configure the Samba server as a domain controller. Answer: C.

31. There may be a single configuration file (/etc/pam.conf) or a set of files (beneath /etc/pam.d) depending upon your implementation. Answer: C & D.

32. In the [global] section of the smb.conf file you should place parameters that apply as defaults for items not otherwise specified. Answer: A.

33. The printing = cups line needs to be present in the configuration file. Answer: D.

34. The W flag indicates the account is a workstation trust -- used when NT workstations and servers need to join the domain. Answer: A.

35. The cupsaddsmb utility can be used to accomplish this. Answer: B.

36. The command nmblookup -U KAREN -R 'AU#1B' will show the domain master browser used by the AU workgroup on the WINS server KAREN. Answer: C.

37. They should be in then [print$] share. Answer: D.

38. Domain Printers is not a valid entry. All other choices are mapped. Answer: C.

39. A common location for connection logs is /var/log/samba. Answer: C.

40. The profiles utility is included with the Samba suite and can be used to change SIDs in Windows Registry files. Answer: D.

41. The -d option should be used to disable the entry for a specified username Answer: A.

42. The smbtree utility is similar to Network Neighborhood in the Windows world. Answer: B.

43. The N flag indicates the account has no password. Answer: C.

44. Although it can be -- and sometimes is -- installed in other locations, /usr/local/samba/lib is the default location of the smb.conf file. Answer: D.

45. In the /etc/samba/smbusers Samba file, an entry can be placed for Administrator users to map to root users. Answer: C.

46. By default, SWAT runs on port 901. Answer: D.

47. The -U% parameter specifies a null username and password. Answer: A.

48. The -V option will show the version number. Answer: B.

49. The command smbcacls -D can be used to delete any ACLs specified on the command line. Answer: C.

50. The -h option is used to specify the home directory for the user account. Answer: B.

Emmett Dulaney is the author of the A+ Fast Pass and several books on Linux/Unix and certification as well as a columnist for UnixReview. Emmett's blog can be found at http://edulaney.blogspot.com, and he can be reached (and welcomes your comments) at edulaney@iquest.net.