Getting pdc name

Richard Renard rrenard at
Thu Dec 11 17:46:52 GMT 2003

hi all,

In order to implement the replication process in samba i need to have the name
of the PDC.

since i use the cli_full_connection() function to connect to the pdc

i need the name when samba is started so it can do a DatabaseDelta or
DatabaseSync if needed.

i tried to make a "query for pdc" request but no servers seems to respond even
when sent directly to the pdc.

when looking around in namequery[_dc].c i see 2 functions which can be useful
- get_dc_list
- nam_status_find

they are used in rpc_dc_name, but there are 2 problems with this function
- i cant call it whithin nmbd
- i cant force it to "use_pdc_only"

should i write a new function ? or maybe someone have a clue to resolve this

thanks in advance

ps: if i am not clear tell me

Richard Renard
rrenard at

More information about the samba-technical mailing list