From e4840f0db911eaf3aee1195030c6efca70d78f14 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 6 Dec 2001 07:37:58 +0000 Subject: merge from 2.2 (This used to be commit c5ee06b7c8fc9f1fec679acc7d7f47f333707456) --- docs/docbook/projdoc/winbind.sgml | 162 ++++++++++++++++++++++---------------- 1 file changed, 95 insertions(+), 67 deletions(-) (limited to 'docs/docbook/projdoc/winbind.sgml') diff --git a/docs/docbook/projdoc/winbind.sgml b/docs/docbook/projdoc/winbind.sgml index b496f30dd7..8ea419d758 100644 --- a/docs/docbook/projdoc/winbind.sgml +++ b/docs/docbook/projdoc/winbind.sgml @@ -16,6 +16,13 @@
tridge@linuxcare.com.au
+ + JohnTrostel + + Snapserver +
jtrostel@snapserver.com
+
+
16 Oct 2000 @@ -372,9 +379,10 @@ somewhat to fit the way your distribution works. If you have a samba configuration file that you are currently -using... BACK IT UP! If your system already uses PAM, BACK UP -THE /etc/pam.d directory contents! If you -haven't already made a boot disk, MAKE ON NOW! +using... BACK IT UP! If your system already uses PAM, +back up the /etc/pam.d directory +contents! If you haven't already made a boot disk, +MAKE ONE NOW! @@ -386,10 +394,11 @@ you get frustrated with the way things are going. ;-) -The newest version of SAMBA (version 2.2.2), available from -cvs.samba.org, now include a functioning winbindd daemon. Please refer -to the main SAMBA web page or, better yet, your closest SAMBA mirror -site for instructions on downloading the source code. +The latest version of SAMBA (version 2.2.2 as of this writing), now +includes a functioning winbindd daemon. Please refer to the +main SAMBA web page or, +better yet, your closest SAMBA mirror site for instructions on +downloading the source code. @@ -399,8 +408,8 @@ SAMBA machine, PAM (pluggable authentication modules) must be setup properly on your machine. In order to compile the winbind modules, you should have at least the pam libraries resident on your system. For recent RedHat systems (7.1, for instance), that -means 'pam-0.74-22'. For best results, it is helpful to also -install the development packages in 'pam-devel-0.74-22'. +means pam-0.74-22. For best results, it is helpful to also +install the development packages in pam-devel-0.74-22. @@ -419,8 +428,9 @@ directory structure, including the pam modules are used by pam-aware services, several pam libraries, and the /usr/doc and /usr/man entries for pam. Winbind built better in SAMBA if the pam-devel package was also installed. This package includes -the header files needed to compile pam-aware applications. For instance, my RedHat -system has both 'pam-0.74-22' and 'pam-devel-0.74-22' RPMs installed. +the header files needed to compile pam-aware applications. For instance, +my RedHat system has both pam-0.74-22 and +pam-devel-0.74-22 RPMs installed. @@ -428,38 +438,39 @@ system has both 'pam-0.74-22' and 'pam-devel-0.74-22' RPMs installed. The configuration and compilation of SAMBA is pretty straightforward. -The first three steps maynot be necessary depending upon +The first three steps may not be necessary depending upon whether or not you have previously built the Samba binaries. -root# autoconf -root# make clean -root# rm config.cache -root# ./configure --with-winbind -root# make -root# make install +root# autoconf +root# make clean +root# rm config.cache +root# ./configure --with-winbind +root# make +root# make install -This will, by default, install SAMBA in /usr/local/samba. See the -main SAMBA documentation if you want to install SAMBA somewhere else. +This will, by default, install SAMBA in /usr/local/samba. +See the main SAMBA documentation if you want to install SAMBA somewhere else. It will also build the winbindd executable and libraries. -Configure nsswitch.conf and the winbind libraries +Configure <filename>nsswitch.conf</filename> and the +winbind libraries -The libraries needed to run the winbind daemon through nsswitch -need to be copied to their proper locations, so +The libraries needed to run the winbindd daemon +through nsswitch need to be copied to their proper locations, so -root# cp ../samba/source/nsswitch/libnss_winbind.so /lib +root# cp ../samba/source/nsswitch/libnss_winbind.so /lib @@ -467,30 +478,31 @@ I also found it necessary to make the following symbolic link: -root# ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2 +root# ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2 Now, as root you need to edit /etc/nsswitch.conf to allow user and group entries to be visible from the winbindd -daemon, as well as from your /etc/hosts files and NIS servers. My -/etc/nsswitch.conf file look like this after editing: +daemon. My /etc/nsswitch.conf file look like +this after editing: passwd: files winbind - shadow: files winbind + shadow: files group: files winbind The libraries needed by the winbind daemon will be automatically -entered into the ldconfig cache the next time your system reboots, but it +entered into the ldconfig cache the next time +your system reboots, but it is faster (and you don't need to reboot) if you do it manually: -root# /sbin/ldconfig -v | grep winbind +root# /sbin/ldconfig -v | grep winbind @@ -517,16 +529,17 @@ include the following entries in the [global] section: [global] <...> # separate domain and username with '+', like DOMAIN+username - winbind separator = + + winbind separator = + # use uids from 10000 to 20000 for domain users - winbind uid = 10000-20000 + winbind uid = 10000-20000 # use gids from 10000 to 20000 for domain groups - winbind gid = 10000-20000 + winbind gid = 10000-20000 # allow enumeration of winbind users and groups - winbind enum users = yes - winbind enum groups = yes + winbind enum users = yes + winbind enum groups = yes # give winbind users a real shell (only needed if they have telnet access) - template shell = /bin/bash + template homedir = /home/winnt/%D/%U + template shell = /bin/bash @@ -544,7 +557,7 @@ a domain user who has administrative privileges in the domain. -root# /usr/local/samba/bin/smbpasswd -j DOMAIN -r PDC -U Administrator +root# /usr/local/samba/bin/smbpasswd -j DOMAIN -r PDC -U Administrator @@ -569,7 +582,7 @@ command as root: -root# /usr/local/samba/bin/winbindd +root# /usr/local/samba/bin/winbindd @@ -578,7 +591,12 @@ is really running... -root# ps -ae | grep winbindd +root# ps -ae | grep winbindd + + +This command should produce output like this, if the daemon is running + + 3025 ? 00:00:00 winbindd @@ -588,7 +606,7 @@ users on your PDC -root# # /usr/local/samba/bin/wbinfo -u +root# /usr/local/samba/bin/wbinfo -u @@ -606,7 +624,8 @@ CEO+TsInternetUser -Obviously, I have named my domain 'CEO' and my winbindd separator is '+'. +Obviously, I have named my domain 'CEO' and my winbindd +separator is '+'. @@ -615,7 +634,7 @@ the PDC: -root# /usr/local/samba/bin/wbinfo -g +root# /usr/local/samba/bin/wbinfo -g CEO+Domain Admins CEO+Domain Users CEO+Domain Guests @@ -634,7 +653,7 @@ Try the following command: -root# getent passwd +root# getent passwd @@ -648,14 +667,14 @@ The same thing can be done for groups with the command -root# getent group +root# getent group -Fix the /etc/rc.d/init.d/smb startup files +Fix the <filename>/etc/rc.d/init.d/smb</filename> startup files The winbindd daemon needs to start up after the @@ -718,6 +737,13 @@ stop() { } + +If you restart the smbd, nmbd, +and winbindd daemons at this point, you +should be able to connect to the samba server as a domain member just as +if you were a local user. + + @@ -726,32 +752,42 @@ stop() { Configure Winbind and PAM -If you have made it this far, you know that winbindd is working. -Now it is time to integrate it into the operation of samba and other -services. The pam configuration files need to be altered in +If you have made it this far, you know that winbindd and samba are working +together. If you want to use winbind to provide authentication for other +services, keep reading. The pam configuration files need to be altered in this step. (Did you remember to make backups of your original /etc/pam.d files? If not, do it now.) -To get samba to allow domain users and groups, I modified the -/etc/pam.d/samba file from +You will need a pam module to use winbindd with these other services. This +module will be compiled in the ../source/nsswitch directory +by invoking the command + +root# make nsswitch/pam_winbind.so + - -auth required /lib/security/pam_stack.so service=system-auth -account required /lib/security/pam_stack.so service=system-auth - + +from the ../source directory. The +pam_winbind.so file should be copied to the location of +your other pam security modules. On my RedHat system, this was the +/lib/security directory. + -to +root# cp ../samba/source/nsswitch/pam_winbind.so /lib/security + +The /etc/pam.d/samba file does not need to be changed. I +just left this fileas it was: + + + -auth required /lib/security/pam_winbind.so auth required /lib/security/pam_stack.so service=system-auth -account required /lib/security/pam_winbind.so account required /lib/security/pam_stack.so service=system-auth @@ -795,10 +831,11 @@ changed to look like this: -auth sufficient /lib/security/pam_winbind.so auth required /lib/security/pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed +auth sufficient /lib/security/pam_winbind.so auth required /lib/security/pam_stack.so service=system-auth auth required /lib/security/pam_shells.so +account sufficient /lib/security/pam_winbind.so account required /lib/security/pam_stack.so service=system-auth session required /lib/security/pam_stack.so service=system-auth @@ -830,15 +867,6 @@ line after the winbind.so line to get rid of annoying double prompts for passwords. - -Finally, don't forget to copy the winbind pam modules from -the source directory in which you originally compiled the new -SAMBA up to the /lib/security directory so that pam can use it: - - - -root# cp ../samba/source/nsswitch/pam_winbind.so /lib/security - -- cgit