Code for joining a domain in Samba 2.2.0-alpha1
Gerald Carter
gcarter at valinux.com
Tue Apr 10 13:32:13 GMT 2001
On Tue, 10 Apr 2001 04:18:05 Tom Alsberg wrote:
>
> I put some debugging statements in some of the
> functions in rpc_server/srv_netlog.c, including
> api_net_sam_logon(), looked at my logs while trying to
> join a domain, or just trying to log on using
> smbclient, and api_net_sam_logon() didn't seem
> to get called.
sam_logon is used for domain logons. I don't remember
if it is part of the joining process. What you need to do
is to
o set the debug level to 10 in on smbd
o set log file = /tmp/log.%m
o set debug timestamps = no
o join an NT4 client to the domain
o grep the log file for 'api_rpcTNP'
> reply_sesssetup_and_X() in smbd/reply.c however, did
> get called. So I was wondering what its role exactly is
> in that process.
>
> What do you mean by 'replies to SMB calls, not MSRPC'? What
> are those MSRPC calls exactly? Why is MSRPC what I care about
> when joining a machine to the domain? Isn't joining a machine
> to the domain part of the SMB protocol?
MSRPC is Microsoft's version of dce/rpc. It works like this
MSRPC
-----------
named pipes
-----------
SMB
-----------
NetBIOS
-----------
TCP/IP
Not very pretty huh? The SMBsessetup&X call is used to
establish an SMB session in user mode security. The process
is as follows
1. negotiate and SMB protocol dialect to use
(SMBnegprot)
2. authenticate the user
(SMBsessetup&X)
3. connect to a share (IP$)
(SMBtcon&X)
All of these are request / reply pairs.
Once you have a connection to the IPC$ share, the client
can setup an named pipe such as \samr, \spoolss, \srvsvc,
etc... and then begin to issues RPC operations.
It is the RPC ops which implement the domain control protocol
(which is very messy).
Cheers, jerry
----------------------------------------------------------------------
/\ Gerald (Jerry) Carter Professional Services
\/ http://www.valinux.com/ VA Linux Systems gcarter at valinux.com
http://www.samba.org/ SAMBA Team jerry at samba.org
http://www.plainjoe.org/ jerry at plainjoe.org
"...a hundred billion castaways looking for a home."
- Sting "Message in a Bottle" ( 1979 )
----------------------------------------------------------------------
/\ Gerald (Jerry) Carter Professional Services
\/ http://www.valinux.com/ VA Linux Systems gcarter at valinux.com
http://www.samba.org/ SAMBA Team jerry at samba.org
http://www.plainjoe.org/ jerry at plainjoe.org
"...a hundred billion castaways looking for a home."
- Sting "Message in a Bottle" ( 1979 )
More information about the samba-technical
mailing list