Using Samba

Free Download

Authors:

Edition: 1

Series: O'Reilly System Administration

ISBN: 1565924495, 9781565924499, 9781565929296

Size: 38 MB (40139358 bytes)

Pages: 444/444

File format:

Language:

Publishing Year:

Category:

Robert Eckstein, David Collier-Brown, Peter Kelly1565924495, 9781565924499, 9781565929296

A book/CD-ROM guide to Samba administration, with chapters on installation, configuration, and optimization, and material on recent additions such as integration with Windows NT domains and the SWAT graphic configuration tool. Goes through the PC side of installation in detail, and gives examples for both Windows 95/98 and Windows NT, as well as examples for common Unix operating systems such as Linux 2.0 and Solaris 2.6. For Unix administrators in a PC environment. The CD-ROM is a complete mirror of the Samba FTP site, with sources, ready-to-install binaries, documentations, and related utilities.

Table of contents :
Table of Contents……Page 1
License Info……Page 4
1.1 What is Samba?……Page 7
1.2 What Can Samba Do For Me?……Page 10
Figure 1.2: The Network Neighborhood directory……Page 11
Figure 1.4: Mapping a network drive to a Windows letter-drive……Page 12
Figure 1.6: Shares available on hydra †viewed from chimaera‡……Page 13
1.2.2.1 Seeing things from the Unix side……Page 14
1.3.1 Understanding NetBIOS……Page 16
1.3.2 Getting a Name……Page 17
Figure 1.9: NBNS versus non-NBNS name resolution……Page 18
1.3.4 What’s in a Name?……Page 20
Figure 1.10: The structure of NetBIOS names……Page 21
1.3.4.2 Group names and types……Page 22
1.3.5 Datagrams and Sessions……Page 23
Figure 1.11: A simple Windows domain……Page 26
Figure 1.12: Using a domain controller for authentication……Page 27
1.4.2.1 Levels of browsing……Page 28
Figure 1.13: A Windows domain with a local master and local backup browser……Page 29
1.4.2.2 Browsing elections……Page 30
1.4.3 Can a Windows Workgroup Span Multiple Subnets?……Page 31
Figure 1.14: A workgroup that spans more than one subnet……Page 32
1.4.5 What Can Samba Do?……Page 33
1.5 An Overview of the Samba Distribution……Page 35
1.6 How Can I Get Samba?……Page 37
1.7.2 Ease of Administration……Page 38
1.7.5 Compatibility Improvements……Page 39
1.7.6 Smbwrapper……Page 40
1.8 And That’s Not All………Page 41
2. Installing Samba on a Unix System……Page 42
2.1 Downloading the Samba Distribution……Page 43
2.1.1 Binary or Source?……Page 44
2.1.2 Read the Documentation……Page 45
2.2 Configuring Samba……Page 46
2.3 Compiling and Installing Samba……Page 51
2.3.1 Final Installation Steps……Page 52
2.4 A Basic Samba Configuration File……Page 54
Figure 2.2: SWAT Global Variables page……Page 55
Figure 2.3: SWAT Share Creation screen……Page 56
Figure 2.4: SWAT Share Parameters screen……Page 57
2.4.2 Testing the Configuration File……Page 58
2.5.2 Stand-alone Daemons……Page 60
2.5.2.2 System V Unix……Page 61
2.5.3 Starting From Inetd……Page 62
2.6 Testing the Samba Daemons……Page 63
3.1 Setting Up Windows 95/98 Computers……Page 65
3.1.1.1 Changing the Windows password……Page 66
Figure 3.4: Windows Networking profiles……Page 67
Figure 3.5: The Windows 95/98 Network panel……Page 68
Figure 3.6: Selecting a protocol to install……Page 69
Figure 3.8: Selecting the correct TCP/IP protocol……Page 70
Figure 3.9: STCP/IP Properties panel……Page 71
3.1.2.4 DNS Configuration tab……Page 72
Figure 3.11: The WINS Configuration tab……Page 73
3.1.2.6 Hosts files……Page 74
Figure 3.13: The Identification tab……Page 75
Figure 3.15: Shares on Server……Page 76
3.2 Setting Up Windows NT 4.0 Computers……Page 78
Figure 3.17: Changing the identification……Page 79
Figure 3.18: The Protocols tab……Page 80
Figure 3.19: Select Network Protocol dialog box……Page 81
Figure 3.21: Select Network Service dialog box……Page 82
Figure 3.22: Microsoft TCP/IP Properties for Windows NT……Page 83
Figure 3.23: The DNS panel……Page 84
Figure 3.24: The WINS Address tab……Page 85
3.2.2.4 Hosts files……Page 86
3.2.3 Connecting to the Samba Server……Page 87
Figure 3.27: Server’s shares……Page 88
3.3 An Introduction to SMB/CIFS……Page 90
3.3.1.2 SMB command format……Page 91
3.3.1.3 SMB variations……Page 92
Figure 3.28: Two computers that both have resources to share……Page 93
3.3.3.1 Establishing a virtual connection……Page 94
3.3.4 Negotiating the Protocol Variant……Page 95
3.3.5 Set Session and Login Parameters……Page 96
3.3.6 Making Connection to a Resource……Page 97
4.1 Learning the Samba Configuration File……Page 99
4.1.1 Configuration File Structure……Page 100
4.1.1.3 Line continuation……Page 101
4.1.2 Variables……Page 102
4.2.1 The [ globals] Section……Page 106
4.2.3 The [printers] Section……Page 107
4.2.4 Configuration Options……Page 108
4.3.1 config file……Page 109
4.3.3 copy……Page 110
Figure 4.2: Network Neighborhood showing the Samba server……Page 112
4.4.1 Server Configuration Options……Page 113
4.4.1.2 server string……Page 114
4.4.1.3 workgroup……Page 115
4.5 Disk Share Configuration……Page 116
4.5.1 Disk Share Configuration Options……Page 117
4.5.1.2 guest ok……Page 118
4.5.1.4 volume……Page 119
4.5.1.5 read only and writeable……Page 120
4.6 Networking Options with Samba……Page 121
4.6.1.1 hosts allow……Page 123
4.6.1.3 interfaces……Page 125
4.6.1.5 socket address……Page 126
4.7.1 netbios aliases……Page 127
Figure 4.7: Using NetBIOS aliases for a Samba server……Page 128
4.8 Logging Configuration Options……Page 129
4.8.2 Logging Configuration Options……Page 131
4.8.2.1 log file……Page 132
4.8.2.5 syslog……Page 133
4.8.2.6 syslog only……Page 134
5.1 Browsing……Page 135
5.1.2 Default Services……Page 136
5.1.3 Browsing Elections……Page 137
5.1.4 Domain Master Browser……Page 140
Figure 5.1: Multiple subnets with Samba servers……Page 141
5.1.5 Browsing Options……Page 143
5.1.5.4 browse list……Page 145
5.1.5.8 lm announce……Page 146
5.1.5.12 domain master……Page 147
5.1.5.14 remote announce……Page 148
Figure 5.2: Hidden files in the [data] share……Page 149
Figure 5.3: Hiding files based on filename patterns……Page 150
Figure 5.5: An error dialog trying to follow symbolic links when forbidden by Samba……Page 152
5.2.3 Filesystem Options……Page 153
5.2.3.2 dont descend……Page 154
5.2.3.7 hide dot files……Page 155
5.2.3.9 delete veto files……Page 156
Figure 5.6: DOS and Windows file properties……Page 157
Figure 5.7: How Samba and Unix view the permissions of a file……Page 159
5.3.1 Creation masks……Page 160
5.3.2 File and Directory Permission Options……Page 161
5.3.2.2 directory mask……Page 162
5.3.2.8 map archive……Page 163
5.3.2.10 map hidden……Page 164
5.4 Name Mangling and Case……Page 165
5.4.1 The Samba Mangling Operation……Page 166
5.4.2 Mangling Options……Page 167
5.4.2.2 default case……Page 168
5.4.2.6 mangle case……Page 169
5.4.2.9 mangled map……Page 170
5.5.1 Opportunistic Locking……Page 171
5.5.2 Unix and Locking……Page 172
5.5.2.1 share modes……Page 173
5.5.2.3 strict locking……Page 174
5.5.2.7 kernel oplocks……Page 175
5.5.2.9 lock directory……Page 176
6.1 Users and Groups……Page 177
6.1.1 The [homes] Share……Page 179
6.2 Controlling Access to Shares……Page 181
6.2.1 Guest Access……Page 182
6.2.2.2 valid users and invalid users……Page 183
6.2.3 Username Options……Page 184
6.2.3.2 username level……Page 185
6.3 Authentication Security……Page 187
Figure 6.1: Selecting share-level security on a Windows machine……Page 188
6.3.2 User-level Security……Page 190
Figure 6.2: A typical system setup using server level security……Page 191
6.3.4 Domain-level Security……Page 192
6.3.4.1 Adding a Samba server to a Windows NT Domain……Page 194
6.4 Passwords……Page 195
Figure 6.3: Structure of the smbpasswd file entry †actually one line‡……Page 197
6.4.2.1 Adding entries to smbpasswd……Page 199
6.4.3 Password Synchronization……Page 200
6.4.4 Password Configuration Options……Page 203
6.4.4.2 encrypt passwords……Page 204
6.4.4.6 password level……Page 205
6.4.4.9 smb passwd file……Page 206
6.4.4.11 use rhosts……Page 207
6.5.1 Configuring Samba for Windows Domain Logons……Page 208
6.5.1.1 Windows 95/98 clients……Page 209
6.5.1.3 Creating trust accounts for NT clients……Page 210
Figure 6.4: Configuring a Windows 95/98 client for domain logons……Page 211
Figure 6.5: Configuring a Windows NT client for domain logons……Page 212
6.5.3.1 domain logons……Page 213
6.5.3.4 local group map……Page 214
6.5.3.5 revalidate……Page 215
6.6 Logon Scripts……Page 216
Figure 6.6: Local profiles versus roaming profiles……Page 217
6.6.2 Mandatory profiles……Page 219
6.6.3.2 logon path……Page 220
6.6.4 Other Connection Scripts……Page 221
6.6.5 Working with NIS and NFS……Page 222
6.6.5.1 nis homedir and homedir map……Page 223
7.1 Sending Print Jobs to Samba……Page 224
7.1.1 Print Commands……Page 225
7.1.3 A Minimal Printing Setup……Page 226
7.1.4 The [printers] Share……Page 228
7.1.5 Test Printing……Page 229
7.1.6 Setting Up and Testing a Windows Client……Page 230
Figure 7.3: Printer manufacturers and models……Page 231
7.1.7 Automatically Setting Up Printer Drivers……Page 232
7.1.7.2 Create a printer definition file……Page 233
7.1.7.3 Create a PRINTER$ share……Page 234
7.1.7.5 Testing the configuration……Page 235
Figure 7.6: Automatically configuring the printer driver……Page 236
Figure 7.7: The Printers window……Page 237
7.2.1 BSD printers……Page 238
7.2.3 Samba Printing Options……Page 239
7.2.3.1 printing……Page 241
Figure 7.9: The Add Printer Wizard dialog box in Windows 98……Page 242
7.2.3.7 lpq cache time……Page 243
7.2.3.9 print command, lpq command, lprm command, lppause command, lpresume command……Page 244
7.2.3.10 load printers……Page 245
7.2.3.14 queueresume command……Page 246
7.3 Name Resolution with Samba……Page 247
7.3.2 Setting Up Samba to Use Another WINS Server……Page 248
7.3.3 Setting Up Samba as a WINS Server……Page 249
7.3.4 Name Resolution Configuration Options……Page 250
7.3.4.3 wins proxy……Page 251
7.3.4.8 min wins ttl……Page 252
8.1 Supporting Programmers……Page 254
8.1.1.1 time server……Page 255
8.1.1.5 fake directory create times……Page 256
8.2.1 magic script……Page 258
8.2.2 magic output……Page 259
8.3.1 client code page……Page 260
8.3.2 character set……Page 261
8.3.3 coding system……Page 262
8.3.4 valid chars……Page 263
Figure 8.1: The WinPopup application……Page 264
8.4.1 message command……Page 265
8.5 Recently Added Options……Page 266
8.5.1 change notify timeout……Page 267
8.5.7 inherit permissions……Page 268
8.5.11 netbios scope……Page 269
8.6 Miscellaneous Options……Page 270
8.6.1 deadtime……Page 271
8.6.3 fstype……Page 272
8.6.8 max xmit……Page 273
8.6.13 set directory……Page 274
8.6.18 strip dot……Page 275
8.7 Backups with smbtar……Page 277
Figure 8.3: TCP/IP Bindings……Page 278
Figure 8.4: My Documents Properties……Page 279
Figure 8.5: MyFiles Properties as shared……Page 280
9.1 The Tool Bag……Page 282
9.1.1 Samba Logs……Page 283
9.1.1.1 Log levels……Page 284
9.1.2 Samba Test Utilities……Page 285
9.1.3.2 Using tcpdump……Page 286
9.2.1 How to use the fault tree……Page 289
9.2.2.1 Testing the networking software with ping……Page 290
9.2.2.3 Testing the networking hardware with ping……Page 291
Figure 9.1: Pinging the Samba server from a Windows client……Page 292
9.2.3.1 Testing TCP with FTP……Page 295
9.2.4.1 Before you start……Page 296
9.2.4.3 Looking for daemons bound to ports……Page 297
9.2.4.5 Testing daemons with testparm……Page 298
9.2.5.2 Testing locally with smbclient……Page 300
9.2.5.3 Testing connections with smbclient……Page 302
Figure 9.2: Results of the NET USE command……Page 304
Figure 9.3: Accessing the /tmp directory with Windows Explorer……Page 306
9.2.6 Troubleshooting Browsing……Page 308
9.2.6.1 Testing browsing with smbclient……Page 309
9.2.6.2 Testing the server with nmblookup……Page 311
9.2.6.4 Testing the network with nmblookup……Page 312
Figure 9.4: Using the net view command……Page 313
Figure 9.5: List of shares on a server……Page 314
9.2.8 Troubleshooting Name Services……Page 315
9.2.8.1 Identifying what’s in use……Page 316
9.2.8.2 Cannot look up hostnames……Page 317
9.2.8.3 Long and short hostnames……Page 319
9.2.8.4 Unusual delays……Page 321
9.2.8.5 Localhost issues……Page 322
9.2.9.2 Broadcast addresses……Page 323
9.2.10 Troubleshooting NetBIOS Names……Page 324
9.3.2 Samba Newsgroups……Page 327
9.3.5 Further Reading……Page 328
A.1 About Certificates……Page 330
A.1.3 What are the implications of this certificate structure?……Page 331
Figure A.1: Two possible ways of proxying Windows 95/98 clients……Page 333
A.3 Installing SSLeay……Page 335
A.3.2 Configuring Samba to use SSL……Page 337
A.3.3 Becoming a Certificate Authority……Page 338
A.3.4 Creating Certificates for Clients……Page 340
A.3.6 Testing with smbclient……Page 341
A.4 Setting Up SSL Proxy……Page 342
A.5 SSL Configuration Options……Page 344
A.5.4 ssl CA certDir……Page 346
A.5.8 ssl client cert……Page 347
A.5.11 ssl require servercert……Page 348
A.5.14 ssl compatibility……Page 349
B.1 A Simple Benchmark……Page 350
B.2.1 Benchmarking……Page 352
B.2.2.2 Socket options……Page 353
B.2.2.5 IP packet size †MTU‡……Page 354
Figure B.1: SO_SNDBUF size and performance……Page 355
B.2.2.8 read size……Page 356
B.2.3 Other Samba Options……Page 357
B.2.4 Our Recommendations……Page 358
B.3.1 The Bottlenecks……Page 360
Figure B.2: Data flow through a Samba server, with possible bottlenecks……Page 361
B.3.3 Practical Examples……Page 363
B.3.4 How Many Clients can Samba Handle?……Page 364
B.3.5 Measurement Forms……Page 365
C. Samba Configuration Option Quick Reference……Page 368
Glossary of Configuration Values……Page 411
Configuration File Variables……Page 413
Other signals……Page 415
-o……Page 416
Signals……Page 417
-O socket_options……Page 418
Samba Startup File……Page 419
-R resolve order……Page 420
-n NetBIOS_name……Page 421
Smbclient operations……Page 422
Tar commands……Page 424
-T command filename……Page 425
-d debug_level……Page 426
-U username……Page 427
-S……Page 428
-s server……Page 429
-B broadcast _address……Page 430
-s configuration_file……Page 431
-U username……Page 432
-h……Page 433
rpcclient……Page 434
tcpdump……Page 435
-w file……Page 436
Appendix E. Downloading Samba with CVS……Page 437
F. Sample Configuration File……Page 439

Reviews

There are no reviews yet.

Be the first to review “Using Samba”
Shopping Cart
Scroll to Top