- Table of Contents
- Copyright
- About the Lead Authors
- About the Contributing Authors
- Acknowledgments
- Tell Us What You Think!
- Introduction
- I. Red Hat Linux Installation and User Services
- Chapter 1. Introduction to Red Hat Linux
- Chapter 2. Installation of Your Red Hat System
- Chapter 3. LILO and Other Boot Managers
- Chapter 4. Configuring the X Window System, Version 11
- Chapter 5. Window Managers
- Chapter 6. Connecting to the Internet
- Chapter 7. IRC, ICQ, and Chat Clients
- Chapter 8. Using Multimedia and Graphics Clients
- II. Configuring Services
- Chapter 9. System Startup and Shutdown
- Chapter 10. SMTP and Protocols
- Chapter 11. FTP
- Chapter 12. Apache Server
- Chapter 13. Internet News
- Chapter 14. Domain Name Service and Dynamic Host Configuration Protocol
- Chapter 15. NIS: Network Information Service
- Chapter 16. NFS: Network Filesystem
- Chapter 17. Samba
- Installing Samba
- Getting a Simple Samba Setup Running
- Configuring Samba
- Configuring a Samba File Server with linuxconf
- Sharing Files and Print Services
- Optimizing Samba Performance
- Testing Your Configuration
- Running the Samba Server
- Accessing Shares
- Common smb.conf Options
- Samba Resources
- Using Samba as a Logon Server
- Samba Troubleshooting Tips
- Samba Security
- Using SWAT for Web-Based Samba Configuration
- Using Samba as a Linux Migration Tool
- Summary
- III. System Administration and Management
- Chapter 18. Linux Filesystems, Disks, and Other Devices
- Chapter 19. Printing with Linux
- Chapter 20. TCP/IP Network Management
- Chapter 21. Linux System Administration
- Chapter 22. Backup and Restore
- Chapter 23. System Security
- IV. Red Hat Development and Productivity
- Chapter 24. Linux C/C++ Programming Tools
- Chapter 25. Shell Scripting
- Chapter 26. Automating Tasks
- Chapter 27. Configuring and Building Kernels
- Chapter 28. Emulators, Tools, and Window Clients
- V. Appendixes
- A. The Linux Documentation Project
- B. Top Linux Commands and Utilities
- C. The GNU General Public License
- D. Red Hat Linux RPM Package Listings
Sharing Files and Print Services
After configuring your defaults for the Samba server, you can create specific shared directories limited to certain groups of people or available to everyone. For example, say you want to make a directory available to only one user. To do so, you would create a new section and fill in the needed information. Typically, you'll need to specify the user, directory path, and configuration information to the SMB server, as shown here:
[jacksdir] comment = Jack's remote source code directory path = /usr/local/src valid users = tackett browseable = yes public = no writable = yes create mode = 0700
This sample section creates a shared directory called jacksdir. It's best to keep share names to under nine characters to avoid warnings in the testparm utility, and to avoid problems on older SMB clients incapable of using longer share names. The path to the directory on the local server is /usr/local/src. Because the browseable entry is set to yes, jacksdir will show up in the client's network browse list (such as Windows Explorer). However, because the public entry is set to no and the valid users entry lists only tackett, only the user tackett can access this directory using Samba. You can grant access to more users and to groups by specifying them (using an at sign prepended to the group name) in the valid users entry. Here's the valid users= line after giving group devel access:
valid users = tackett, @devel
A printer share is created by placing a print ok=yes (or synonym) and a printer name= in the share. Here is an example:
[vals_lp] print ok = yes printer name = lp_mine path = /home/everyone valid users = valerie, @devel browseable = yes
Here is a printer that is listed as vals_lp on the client because of the browseable=yes. It prints out of printcap printer lp_mine. Its spool directory is /home/everyone, and valid users are valerie and the devel group.
The primary differences between a printer share like this and the [printers] section is that the [printers] section displays all printcap printers without being browseable, whereas a printer share such as the preceding displays only the printer whose value appears in the printer name= option, and then only if a browseable=yes option appears. The [printers] section does not have or require a printer name= option because its purpose is to display all printers to the client and allow the client access to all printers.
All the same Samba printer troubleshooting tips previously listed in the [printers] section of this chapter apply to printer shares.
Optimizing Samba Performance | Next Section

Account Sign In
View your cart