From 1a74d8d1f0758d15c5c35d20e33d9868565812cf Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 20 Jan 2002 14:30:58 +0000 Subject: This is another *BIG* change... Samba now features a pluggable passdb interface, along the same lines as the one in use in the auth subsystem. In this case, only one backend may be active at a time by the 'normal' interface, and only one backend per passdb_context is permitted outside that. This pluggable interface is designed to allow any number of passdb backends to be compiled in, with the selection at runtime. The 'passdb backend' paramater has been created (and documented!) to support this. As such, configure has been modfied to allow (for example) --with-ldap and the old smbpasswd to be selected at the same time. This patch also introduces two new backends: smbpasswd_nua and tdbsam_nua. These two backends accept 'non unix accounts', where the user does *not* exist in /etc/passwd. These accounts' don't have UIDs in the unix sense, but to avoid conflicts in the algroitmic mapping of RIDs, they use the values specified in the 'non unix account range' paramter - in the same way as the winbind ranges are specifed. While I was at it, I cleaned up some of the code in pdb_tdb (code copied directly from smbpasswd and not really considered properly). Most of this was to do with % macro expansion on stored data. It isn't easy to get the macros into the tdb, and the first password change will 'expand' them. tdbsam needs to use a similar system to pdb_ldap in this regard. This patch only makes minor adjustments to pdb_nisplus and pdb_ldap, becouse I don't have the test facilities for these. I plan to incoroprate at least pdb_ldap into this scheme after consultation with Jerry. Each (converted) passdb module now no longer has any 'static' variables, and only exports 1 init function outside its .c file. The non-unix-account support in this patch has been proven! It is now possible to join a win2k machine to a Samba PDC without an account in /etc/passwd! Other changes: Minor interface adjustments: pdb_delete_sam_account() now takes a SAM_ACCOUNT, not a char*. pdb_update_sam_account() no longer takes the 'override' argument that was being ignored so often (every other passdb backend). Extra checks have been added in some places. Minor code changes: smbpasswd no longer attempts to initialise the passdb at startup, this is now done on first use. pdbedit has lost some of its 'machine account' logic, as this behaviour is now controlled by the passdb subsystem directly. The samr subsystem no longer calls 'local password change', but does the pdb interactions directly. This allow the ACB_ flags specifed to be transferred direct to the backend, without interference. Doco: I've updated the doco to reflect some of the changes, and removed some paramters no longer applicable to HEAD. (This used to be commit ff354c99c585068af6dc1ff35a1f109a806b326b) --- docs/docbook/manpages/smb.conf.5.sgml | 94 +++++++++++++++++++++++++--------- docs/docbook/manpages/smbpasswd.8.sgml | 61 +++++----------------- 2 files changed, 83 insertions(+), 72 deletions(-) (limited to 'docs/docbook/manpages') diff --git a/docs/docbook/manpages/smb.conf.5.sgml b/docs/docbook/manpages/smb.conf.5.sgml index 7aa9ea3b9c..a464643234 100644 --- a/docs/docbook/manpages/smb.conf.5.sgml +++ b/docs/docbook/manpages/smb.conf.5.sgml @@ -594,6 +594,7 @@ allow trusted domains announce as announce version + auth methods auto services bind interfaces only browse list @@ -679,8 +680,8 @@ netbios name netbios scope nis homedir + non unix account range nt pipe support - nt smb support null passwords obey pam restrictions oplock break wait time @@ -688,6 +689,7 @@ os2 driver map pam password change panic action + passdb backend passwd chat passwd chat debug passwd program @@ -1205,6 +1207,24 @@ + + auth methods (G) + This option allows the administrator to chose what + authentication methods smbd will use when authenticating + a user. This option defaults to sensible values based on + security. + + Each entry in the list attempts to authenticate the user in turn, until + the user authenticates. In practice only one method will ever actually + be able to complete the authentication. + + + Default: auth methods = <empty string> + Example: auth methods = guest sam ntdomain + + + + available (S) This parameter lets you "turn off" a service. If @@ -2490,7 +2510,7 @@ file (see the smbpasswd(8) program for information on how to set up and maintain this file), or set the security = [server|domain] parameter which + linkend="SECURITY">security = [server|domain|ads] parameter which causes smbd to authenticate against another server. @@ -4918,6 +4938,40 @@ + + non unix account range (G) + The non unix account range parameter specifies + the range of 'user ids' that are allocated by the various 'non unix + account' passdb backends. These backends allow + the storage of passwords for users who don't exist in /etc/passwd. + This is most often used for machine account creation. + This range of ids should have no existing local or NIS users within + it as strange conflicts can occur otherwise. + + NOTE: These userids never appear on the system and Samba will never + 'become' these users. They are used only to ensure that the algorithmic + RID mapping does not conflict with normal users. + + Default: non unix account range = <empty string> + + + Example: non unix account range = 10000-20000 + + + + + This boolean parameter controls whether + smbd(8) will attempt to map + UNIX permissions into Windows NT access control lists. + This parameter was formally a global parameter in releases + prior to 2.2.2. + + Default: nt acl support = yes + + + + + nt acl support (S) This boolean parameter controls whether @@ -4946,27 +5000,6 @@ - - nt smb support (G) - This boolean parameter controls whether smbd(8) will negotiate NT specific SMB - support with Windows NT clients. Although this is a developer - debugging option and should be left alone, benchmarking has discovered - that Windows NT clients give faster performance with this option - set to no. This is still being investigated. - If this option is set to no then Samba offers - exactly the same SMB calls that versions prior to Samba 2.0 offered. - This information may be of use if any users are having problems - with NT SMB support. - - You should not need to ever disable this parameter. - - Default: nt smb support = yes - - - - - null passwords (G) Allow or disallow client access to accounts @@ -5191,6 +5224,21 @@ + + passdb backend (G) + This option allows the administrator to chose what + backend in which to store passwords. This allows (for example) both + smbpasswd and tdbsam to be used without a recompile. Only one can + be used at a time however, and experimental backends must still be selected + (eg --with-tdbsam) at configure time. + + + Default: passdb backend = smbpasswd + Example: passdb backend = tdbsam + + + + passwd chat (G) This string controls the "chat" diff --git a/docs/docbook/manpages/smbpasswd.8.sgml b/docs/docbook/manpages/smbpasswd.8.sgml index 098e874cc8..3c7a6a5150 100644 --- a/docs/docbook/manpages/smbpasswd.8.sgml +++ b/docs/docbook/manpages/smbpasswd.8.sgml @@ -86,9 +86,10 @@ new password typed (type <Enter> for the old password). This option is ignored if the username following already exists in the smbpasswd file and it is treated like a regular change - password command. Note that the user to be added must already exist - in the system password file (usually /etc/passwd) - else the request to add the user will fail. + password command. Note that the default passdb backends require + the user to already exist in the system password file (usually + /etc/passwd), else the request to add the + user will fail. This option is only available when running smbpasswd as root. @@ -119,8 +120,7 @@ If the smbpasswd file is in the 'old' format (pre-Samba 2.0 format) there is no space in the user's password entry to write - this information and so the user is disabled by writing 'X' characters - into the password space in the smbpasswd file. See smbpasswd(5) + this information and the command will FAIL. See smbpasswd(5) for details on the 'old' and new password file formats. @@ -138,10 +138,8 @@ the user will be able to authenticate via SMB once again. If the smbpasswd file is in the 'old' format, then - smbpasswd will prompt for a new password for this user, - otherwise the account will be enabled by removing the 'D' - flag from account control space in the - smbpasswd file. See smbpasswd (5) for + smbpasswd will FAIL to enable the account. + See smbpasswd (5) for details on the 'old' and new password file formats. This option is only available when running smbpasswd as root. @@ -274,45 +272,6 @@ - - -j DOMAIN - This option is used to add a Samba server - into a Windows NT Domain, as a Domain member capable of authenticating - user accounts to any Domain Controller in the same way as a Windows - NT Server. See the security = domain option in - the smb.conf(5) man page. - - In order to be used in this way, the Administrator for - the Windows NT Domain must have used the program "Server Manager - for Domains" to add the primary NetBIOS name of the Samba server - as a member of the Domain. - - After this has been done, to join the Domain invoke - smbpasswd with this parameter. smbpasswd will then - look up the Primary Domain Controller for the Domain (found in - the smb.conf file in the parameter - password server and change the machine account - password used to create the secure Domain communication. This - password is then stored by smbpasswd in a TDB, writeable only by root, - called secrets.tdb - - Once this operation has been performed the - smb.conf file may be updated to set the - security = domain option and all future logins - to the Samba server will be authenticated to the Windows NT - PDC. - - Note that even though the authentication is being - done to the PDC all users accessing the Samba server must still - have a valid UNIX account on that machine. - - - This option is only available when running smbpasswd as root. - - - - - -U username This option may only be used in conjunction @@ -395,7 +354,7 @@ VERSION - This man page is correct for version 2.2 of + This man page is correct for version 3.0 of the Samba suite. @@ -424,3 +383,7 @@ + + + + -- cgit