1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
samba-mirror/source3/auth
Gerald Carter b8723aaa65 Here's the code to make winbindd work on a Samba DC
to handle domain trusts.  Jeremy and I talked about this
and it's going in as working code.  It keeps winbind clean
and solves the trust problem with minimal changes.

To summarize, there are 2 basic cases where the deadlock would
occur.  (1) lookuping up secondary groups for a user, and
(2) get[gr|pw]nam() calls that fall through the NSS layer because
they don't exist anywhere.

o To handle case #1, we bypass winbindd in sys_getgrouplist() unless
  the username includes the 'winbind separator'.

o Case #2 is handled by adding checks in winbindd to return failure
  if we are a DC and the domain matches our own.

This code has been tested using basic share connections, domain
logons, and with pam_winbind (both with and without 'winbind
use default domain').  The 'trustdomain' auth module should work
as well if an admin wants to manually create UNIX users for
acounts in the trusted domains.

Other misc fixes:

  * we need to fix check_ntlm_password() to be able to determine
    if an auth module is authoritative over a user (NT_STATUS_WRONG_PASSWORD,
    etc...).  I worked around my specific situation, but this needs to be
    fixed.  the winbindd auth module was causing delays.
  * fix named server mutex deadlock between trust domain auth module
    and winbindd looking up a uid
  * make sure SAM_ACCOUNT gets stored in the server_info struct for the
    _net_sam_logon() reply.

Configuration details:

The recommended method for supporting trusts is to use winbind.
The gets us around some of the server mutex issues as well.

  * set 'files winbind' for passwd: and group: in /etc/nsswitch.conf
  * create domain trusts like normal
  * join winbind on the pdc to the Samba domain using 'net rpc join'
  * add normal parameters to smb.conf for winbind
  * set 'auth method = guest sam winbind'
  * start smbd, nmbd, & winbindd

Problems that remain:

  * join a Windows 2k/XP box to a Samba domain.
  * create a 2-way trust between the Samba domain
    and an NT domain
  * logon to the windows client as a user from theh trusted
    domain
  * try to browse server in the trusted domain (or other
    workstations).  an NT client seems to work ok, but 2k
    and XP either prompt for passwords or fail with errors.

apparanently this never got tested since no one has ever been
able to logon as a trusted user to a Samba domain from a Windows
client.
(This used to be commit f804b590f9)
2003-06-29 03:39:50 +00:00
..
auth_builtin.c Use NTSTATUS as return value for smb_register_*() functions and init_module() 2003-04-28 17:48:48 +00:00
auth_compat.c updated the 3.0 branch from the head branch - ready for alpha18 2002-07-15 10:35:28 +00:00
auth_domain.c Here's the code to make winbindd work on a Samba DC 2003-06-29 03:39:50 +00:00
auth_ntlmssp.c Add an extra parameter to our 'set_remote_machine_name' and 2003-03-18 09:52:55 +00:00
auth_rhosts.c Found out a good number of NT_STATUS_IS_ERR used the wrong way. 2003-06-22 10:09:52 +00:00
auth_sam.c Add some static. Patch by Stefan Metzmacher <metze@metzemix.de> 2003-06-04 16:40:50 +00:00
auth_server.c Add some static. Patch by Stefan Metzmacher <metze@metzemix.de> 2003-06-04 16:40:50 +00:00
auth_unix.c Add some static. Patch by Stefan Metzmacher <metze@metzemix.de> 2003-06-04 16:40:50 +00:00
auth_util.c Here's the code to make winbindd work on a Samba DC 2003-06-29 03:39:50 +00:00
auth_winbind.c Add some static. Patch by Stefan Metzmacher <metze@metzemix.de> 2003-06-04 16:40:50 +00:00
auth.c Here's the code to make winbindd work on a Samba DC 2003-06-29 03:39:50 +00:00
pampass.c Merge from HEAD - make Samba compile with -Wwrite-strings without additional 2003-01-03 08:28:12 +00:00
pass_check.c Cleanups: (merge from HEAD) 2003-02-10 11:47:21 +00:00