[Samba] Samba as PDC and BDC on the same network.

Clement DIEBOLD clement.diebold at univ-fcomte.fr
Tue Mar 8 11:31:34 GMT 2005


Jean-Jacques Moulis a écrit :

>On Mon, 07 Mar 2005 09:57:47 +0000 Clement DIEBOLD <clement.diebold at univ-fcomte.fr> wrote:
>
>CD> >CD> >>>> Then, if I put :
>CD> >CD> >> @echo off
>CD> >CD> >> echo "Script de demarrage"
>CD> >CD> >> net use T: \\PDC\temp /PERSISTENT:NO
>CD> >CD> >>
>CD> >CD> >> Then, if the PDC becomes down, this script wouldn't work and i must 
>CD> >CD> >> be there to change the name of the server in the script.
>CD> >CD> >>
>CD> >CD> >> So, what should I do ??
>CD> >CD> >>
>CD> >CD> >> Thanks for the responses.
>CD> >CD> >>
>CD> >CD> > Any idea ??
>CD> >CD> >
>CD> >CD> > Thanks
>CD> >CD> 
>CD> >CD> Nobody :(
>CD> >
>CD> > A preexec script on the BDC netlogon share could modify the logon script
>CD> >according to the availability of the PDC.
>CD> >  
>CD> >
>CD> Can you give me an example of the preexec script please?
>
>in smb.conf
>......
>[netlogon]
>.....
>        browseable = no
>        public = no
>        root preexec = search_for_life_signs
>....
>
>
>search_for_life_signs:
>
>#! /bin/sh
>if ping PDC > /dev/null 2>&1 ; then
>cp epitaph_for_the_PDC LOGON.BAT
>fi
>
>
>Even if you are located at a place with such mournful connotation 
>I don't think your PDC will expire so often.
>
>This idea of a preexec script is not that good after all
>Instead of a preexec script you should run a cron job on the BDC that make the LOGON.BAT
>change when the PDC is unavailable.
>
>You should also have a better check than ping, perhaps something with smbclient.
>The check should also allow for some transient failures of the PDC.
>The change should be oneway, I suppose, you probably want to know where the most
>recent data is.
>
>
>
>
>
>
> 
>CD> -- 
>CD> Clément DIEBOLD
>CD> Service Informatique
>CD> LMARC Université de Franche-Comté
>CD> 24, chemin de l'Epitaphe
>CD> 25000 Besançon
>CD> Tel : 03 81 66 60 53
>CD> Fax : 03 81 66 67 00
>  
>
OK, but know how to change the
   logon home = \\%L\%U
   logon path = \\%L\Profiles\%U
in my smb.conf when the PDC is down?

Thanks for your answers.

-- 
Clément DIEBOLD
Service Informatique
LMARC Université de Franche-Comté
24, chemin de l'Epitaphe
25000 Besançon
Tel : 03 81 66 60 53
Fax : 03 81 66 67 00
--



More information about the samba mailing list