Redhat71-Linux-Samba-HOWTO Collection.pdf

(151 KB) Pobierz
SAMBA Project Documentation
SAMBA Project Documentation
SAMBA Team
Abstract
This book is a collection of HOWTOs added to Samba documentation over the years. I try to ensure that all
are current, but sometimes the is a larger job than one person can maintain. The most recent version of this
document can be found at http://www.samba.org/ on the "Documentation" page. Please send updates to
Cheers, jerry
133739916.002.png
SAMBA Project Documentation
Table of Contents
Chapter 1. How to Install and Test SAMBA. ...................................................................................................1
1.1. Step 0: Read the man pages. .............................................................................................................1
1.2. Step 1: Building the Binaries. ...........................................................................................................1
1.3. Step 2: The all important step. ..........................................................................................................1
1.4. Step 3: Create the smb configuration file.. .......................................................................................2
1.5. Step 4: Test your config file with testparm.. ....................................................................................2
1.6. Step 5: Starting the smbd and nmbd. ................................................................................................2
1.6.1. Step 5a: Starting from inetd.conf. ..................................................................................................3
1.6.2. Step 5b. Alternative: starting it as a daemon. ................................................................................3
1.7. Step 6: Try listing the shares available on your server. ...................................................................4
1.8. Step 7: Try connecting with the unix client. .....................................................................................4
1.10. What If Things Don't Work? ..........................................................................................................5
1.10.1. Diagnosing Problems. ..................................................................................................................5
1.10.2. Scope IDs. ....................................................................................................................................5
1.10.3. Choosing the Protocol Leve. .......................................................................................................5
1.10.4. Printing from UNIX to a Client PC. ............................................................................................6
1.10.5. Locking. .......................................................................................................................................6
1.10.6. Mapping Usernames. ...................................................................................................................7
1.10.7. Other Character Sets. ...................................................................................................................7
Chapter 2. LanMan and NT Password Encryption in Samba 2.x.. ................................................................8
2.1. Introduction. ......................................................................................................................................8
2.2. How does it work?. ...........................................................................................................................8
2.3. Important Notes About Security. ......................................................................................................9
2.3.1. Advantages of SMB Encryption. ...................................................................................................9
2.3.2. Advantages of non−encrypted passwords.. ..................................................................................10
2.4. The smbpasswd file. ........................................................................................................................10
2.5. The smbpasswd Command. ............................................................................................................11
2.6. Setting up Samba to support LanManager Encryption. ..................................................................12
Chapter 3. Hosting a Microsoft Distributed File System tree on Samba ....................................................13
3.1. Instructions. .....................................................................................................................................13
3.1.1. Notes. ...........................................................................................................................................14
Chapter 4. Printing Support in Samba 2.2.x. .................................................................................................15
4.1. Introduction. ....................................................................................................................................15
4.2. Configuration. .................................................................................................................................15
4.2.1. Creating [print$.. .........................................................................................................................16
4.2.2. Setting Drivers for Existing Printers. ...........................................................................................17
4.2.3. Support a large number of printers. .............................................................................................17
4.2.4. Adding New Printers via the Windows NT APW. ......................................................................18
4.2.5. Samba and Printer Ports. ..............................................................................................................18
4.3. The Imprints Toolse. ......................................................................................................................19
4.3.1. What is Imprints?. ........................................................................................................................19
4.3.2. Creating Printer Driver Packages. ................................................................................................19
4.3.3. The Imprints server. .....................................................................................................................19
4.3.4. The Installation Client. ................................................................................................................19
i
133739916.003.png
SAMBA Project Documentation
Table of Contents
4.4. Migration to from Samba 2.0.x to 2.2.x. .........................................................................................20
Chapter 5. security = domain in Samba 2.x. ...................................................................................................22
5.1. Joining an NT Domain with Samba 2.2. .........................................................................................22
5.2. Samba and Windows 2000 Domains. .............................................................................................23
5.3. Why is this better than security = server?. ......................................................................................24
Chapter 6. How to Configure Samba 2.2 as a Primary Domain Controller ...............................................25
6.1. Background. ....................................................................................................................................25
6.2. Configuring the Samba Domain Controller. ...................................................................................26
6.4. Common Problems and Errors. .......................................................................................................28
6.5. System Policies and Profiles. ..........................................................................................................29
6.6. What other help can I get ?. ............................................................................................................30
6.6.1. URLs and similar. ........................................................................................................................31
6.6.2. Mailing Lists. ...............................................................................................................................32
6.7. DOMAIN_CONTROL.txt : Windows NT Domain Control & Samba. .........................................32
Chapter 7. Unifed Logons between Windows NT and UNIX using Winbind. ............................................35
7.1. Abstract. ..........................................................................................................................................35
7.2. Introduction. ....................................................................................................................................35
7.3. What Winbind Provides. .................................................................................................................35
7.3.1. Target Uses. .................................................................................................................................36
7.4. How Winbind Works. .....................................................................................................................36
7.4.1. Microsoft Remote Procedure Calls. .............................................................................................36
7.4.2. Name Service Switch. ..................................................................................................................37
7.4.3. Pluggable Authentication Modules. .............................................................................................37
7.4.4. User and Group ID Allocation. ....................................................................................................38
7.4.5. Result Caching. ............................................................................................................................38
7.5. Installation and Configuration. .......................................................................................................38
7.6. Limitations. .....................................................................................................................................38
7.7. Conclusion. .....................................................................................................................................39
Chapter 8. UNIX Permission Bits and WIndows NT Access Control Lists. ...............................................40
8.2. How to view file security on a Samba share. ..................................................................................40
8.3. Viewing file ownership. ..................................................................................................................40
8.4. Viewing file or directory permissions. ............................................................................................41
8.4.1. File Permissions. ..........................................................................................................................41
8.4.2. Directory Permissions. .................................................................................................................41
8.5. Modifying file or directory permissions. ........................................................................................42
8.6. Interaction with the standard Samba create mask parameters. ......................................................42
8.7. Interaction with the standard Samba file attribute mapping. .........................................................44
Chapter 9. OS2 Client HOWTO. .....................................................................................................................45
9.1. FAQs. ..............................................................................................................................................45
ii
133739916.004.png
SAMBA Project Documentation
Table of Contents
iii
133739916.005.png
Chapter 1. How to Install and Test SAMBA
1.1. Step 0: Read the man pages
The man pages distributed with SAMBA contain lots of useful info that will help to get you started. If you
don't know how to read man pages then try something like:
$ nroff −man smbd.8 | more
Other sources of information are pointed to by the Samba web site, http://www.samba.org
1.2. Step 1: Building the Binaries
To do this, first run the program ./configure in the source directory. This should automatically configure
Samba for your operating system. If you have unusual needs then you may wish to run
root# ./configure −−help
first to see what special options you can enable. Then exectuting
root# make
will create the binaries. Once it's successfully compiled you can use
root# make install
to install the binaries and manual pages. You can separately install the binaries and/or man pages using
root# make installbin
and
root# make installman
Note that if you are upgrading for a previous version of Samba you might like to know that the old versions
of the binaries will be renamed with a ".old" extension. You can go back to the previous version with
root# make revert
if you find this version a disaster!
1.3. Step 2: The all important step
At this stage you must fetch yourself a coffee or other drink you find stimulating. Getting the rest of the
install right can sometimes be tricky, so you will probably need it.
If you have installed samba before then you can skip this step.
Chapter 1. How to Install and Test SAMBA
1
133739916.001.png
Zgłoś jeśli naruszono regulamin