Chapter 11. Single Sign-on with Samba for Mixed Linux/Windows LANs

As delightful as it would be to have a job where you have to deal only with nice reliable Linux boxes, the reality is that mixed networks are more usual. The real world demands that we know how to integrate multiple platforms, primarily Windows, Linux, and Unix, with occasional dashes of Mac OS X and Classic Mac. This chapter tells you how to integrate Linux and Windows, as those are the dominant platforms. Unix and Mac OS X are similar enough to Linux that you can figure them out pretty easily. If you need help with other platforms, or with running a Windows domain, please see Appendix A for good reference materials.

We'll approach the problem of integrating Windows and Linux from two angles: you have a Windows Active Directory domain that you want to add some Linux hosts to, or you have a Linux network that you want to add some Windows hosts to. There are several possible roles for Samba:

Linux machines can tuck in nicely just about anywhere, and thanks to Samba and Winbind, they can even become fully fledged Active Directory objects. Samba is the key to making all of this work; you'll need it on all participating Linux hosts.

If you're running a Windows NT4 domain controller and thinking of upgrading, consider replacing it with Samba. Samba works great as a drop-in replacement for an NTdomain controller. A Linux server running Samba handles a bigger load, and is more stable and secure. It does not replace a Windows 2000/2003 server running Active Directory, because Active Directory comes with user and resource management tools that Samba does not provide. But, as a straight-across NT4-type domain controller, Samba excels. It has these advantages:

If you start out with Samba as your domain controller, and then decide you want to upgrade to Active Directory, no problem. Samba 3 fits right into Active Directory with a few configuration tweaks, unlike NT4, which requires a complete reinstallation to change its role from a domain controller to a domain member.

Samba makes a great file and print server for mixed Windows/Linux LANs, so once you learn any part of Samba, you can continue to build on your knowledge.

With Linux, there are no artificial distinctions between server and workstation versions. Any Linux can be customized to serve whatever role you wish; you won't find yourself wrestling with crippled editions designed solely to extract more money from you.

Calculating how much horsepower and storage you need is an imprecise endeavor, but we can cobble up some useful guidelines. For 50 users or fewer, any old Pentium II or better with at least 128 MB of RAM and enough disk space will do the job just fine. If you're running X Windows, make it 256 MB of RAM. Of course, much depends on how hard your users pummel the server, how many users you have, how much file storage is on the server, and how many programs you have running on the server.

As your userbase grows, you can calculate memory requirements, as this simple illustration for 100 users shows:

	Application   Memory per User    User
	   Name         (MBytes)        Total

	Samba (nmbd)       16.0          16
	Samba (winbind)    16.0          16
	Samba (smbd)       4.0          400
	Basic OS           128          128
	total              167.5        560

Samba spawns a process for every user. As your userbase grows, having adequate memory and a fast disk subsystem improve performance more than having a fast CPU.

In addition to shared files, users have private home directories on the server. You can set quotas on users in the ordinary manner to keep storage under control, using the quota command (see Recipe 8.22, "Using Disk Quotas," in Linux Cookbook [O'Reilly]).