[Samba] How to move a samba PDC to a diffrent box

This is a discussion on [Samba] How to move a samba PDC to a diffrent box within the Samba forums, part of the Networking and Network Related category; Hello List, i have got a samba pdc running based on the smbldap tools and Debian Sarge. Now we would ...


Go Back   Usenet Forums > Networking and Network Related > Samba

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-03-2008
ml
 
Posts: n/a
Default [Samba] How to move a samba PDC to a diffrent box

Hello List,

i have got a samba pdc running based on the smbldap tools and Debian Sarge.
Now we would like to move everything over to Ubuntu Hardy.

Can i simply:
- Create the same users and groups with the same id on Hardy
- Move the files and profiles over by keeping their permissions (rsync
-avzp ...)
- Set the samba SID to be the old orginial one (i do not know how this
could be done and if it even works)

Will i then simply be able to log back in with my Windows clients?
Is there a HowTo explaining this scenario?

Thanks,
Mario
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
  #2 (permalink)  
Old 06-03-2008
devel@thom.fr.eu.org
 
Posts: n/a
Default Re: [Samba] How to move a samba PDC to a diffrent box

I think there must be some migration guide in samba documentation (read
chapter 5 and 36 in Samba official howto). I think the best would be to
build up your second machine and add it in your domain as BDC, so that all
users/groups/machines/... get propagated to this new machine.
Once done, migrate all your data, then you can safely switch off the first
one and promote your new machine to PDC (changing OS level, and browsing
options domain master/prefered master)

> Hello List,
>
> i have got a samba pdc running based on the smbldap tools and Debian
> Sarge.
> Now we would like to move everything over to Ubuntu Hardy.
>
> Can i simply:
> - Create the same users and groups with the same id on Hardy
> - Move the files and profiles over by keeping their permissions (rsync
> -avzp ...)
> - Set the samba SID to be the old orginial one (i do not know how this
> could be done and if it even works)
>
> Will i then simply be able to log back in with my Windows clients?
> Is there a HowTo explaining this scenario?
>
> Thanks,
> Mario
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/listinfo/samba
>
>
> Message scanned by ClamAV engine (http://www.clamav.net)
> --------------------------------------------------------
>



--
François Legal


Message scanned by ClamAV engine (http://www.clamav.net)
--------------------------------------------------------
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
  #3 (permalink)  
Old 06-03-2008
Evan Koutsandreou
 
Posts: n/a
Default RE: [Samba] How to move a samba PDC to a diffrent box

this seems to have been created during the rpm install, see below

[root@RHEL5ONE samba]# rpm -ql samba-winbind-32bit-3.0.25-ctdb.16
/lib/libnss_winbind.so
/lib/libnss_winbind.so.2
/lib/libnss_wins.so
/lib/libnss_wins.so.2
/lib/security/pam_winbind.so



[root@RHEL5ONE samba]# ls -lasp /lib | grep libnss
40 -rwxr-xr-x 1 root root 36340 Jul 5 2007 libnss_compat-2.5.so
4 lrwxrwxrwx 1 root root 20 May 26 08:37 libnss_compat.so.2 ->
libnss_compat-2.5.so
816 -rwxr-xr-x 1 root root 824900 Jul 13 2006 libnss_db-2.2.so
4 lrwxrwxrwx 1 root root 16 May 26 08:39 libnss_db.so.2 ->
libnss_db-2.2.so
28 -rwxr-xr-x 1 root root 21848 Jul 5 2007 libnss_dns-2.5.so
4 lrwxrwxrwx 1 root root 17 May 26 08:37 libnss_dns.so.2 ->
libnss_dns-2.5.so
52 -rwxr-xr-x 1 root root 46740 Jul 5 2007 libnss_files-2.5.so
4 lrwxrwxrwx 1 root root 19 May 26 08:37 libnss_files.so.2 ->
libnss_files-2.5.so
28 -rwxr-xr-x 1 root root 22752 Jul 5 2007 libnss_hesiod-2.5.so
4 lrwxrwxrwx 1 root root 20 May 26 08:37 libnss_hesiod.so.2 ->
libnss_hesiod-2.5.so
3036 -rwxr-xr-x 1 root root 3099444 Jul 6 2007 libnss_ldap-2.5.so
4 lrwxrwxrwx 1 root root 18 May 26 08:40 libnss_ldap.so.2 ->
libnss_ldap-2.5.so
48 -rwxr-xr-x 1 root root 42368 Jul 5 2007 libnss_nis-2.5.so
60 -rwxr-xr-x 1 root root 51696 Jul 5 2007 libnss_nisplus-2.5.so
4 lrwxrwxrwx 1 root root 21 May 26 08:37 libnss_nisplus.so.2 ->
libnss_nisplus-2.5.so
4 lrwxrwxrwx 1 root root 17 May 26 08:37 libnss_nis.so.2 ->
libnss_nis-2.5.so
20 -rwxr-xr-x 1 root root 19408 Jan 31 10:30 libnss_winbind.so
0 lrwxrwxrwx 1 root root 17 Jun 3 18:36 libnss_winbind.so.2 ->
libnss_winbind.so
1016 -rwxr-xr-x 1 root root 1032916 Jan 31 10:30 libnss_wins.so
0 lrwxrwxrwx 1 root root 14 Jun 3 18:36 libnss_wins.so.2 ->
libnss_wins.so




-----Original Message-----
From: samba-bounces+e.koutsandreou=optusnet.com.au@lists.samba .org
[mailto:samba-bounces+e.koutsandreou=optusnet.com.au@lists.samba .org] On
Behalf Of devel@thom.fr.eu.org
Sent: Tuesday, 3 June 2008 7:28 PM
To: ml
Cc: samba@lists.samba.org
Subject: Re: [Samba] How to move a samba PDC to a diffrent box

I think there must be some migration guide in samba documentation (read
chapter 5 and 36 in Samba official howto). I think the best would be to
build up your second machine and add it in your domain as BDC, so that all
users/groups/machines/... get propagated to this new machine.
Once done, migrate all your data, then you can safely switch off the first
one and promote your new machine to PDC (changing OS level, and browsing
options domain master/prefered master)

> Hello List,
>
> i have got a samba pdc running based on the smbldap tools and Debian
> Sarge.
> Now we would like to move everything over to Ubuntu Hardy.
>
> Can i simply:
> - Create the same users and groups with the same id on Hardy
> - Move the files and profiles over by keeping their permissions (rsync
> -avzp ...)
> - Set the samba SID to be the old orginial one (i do not know how this
> could be done and if it even works)
>
> Will i then simply be able to log back in with my Windows clients?
> Is there a HowTo explaining this scenario?
>
> Thanks,
> Mario
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/listinfo/samba
>
>
> Message scanned by ClamAV engine (http://www.clamav.net)
> --------------------------------------------------------
>



--
François Legal


Message scanned by ClamAV engine (http://www.clamav.net)
--------------------------------------------------------
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
  #4 (permalink)  
Old 06-03-2008
Wes Deviers
 
Posts: n/a
Default Re: [Samba] How to move a samba PDC to a diffrent box

On Tue 3 Jun 2008 4:42:40 am ml wrote:
> Hello List,
>
> i have got a samba pdc running based on the smbldap tools and Debian Sarge.
> Now we would like to move everything over to Ubuntu Hardy.
>
> Can i simply:
> - Create the same users and groups with the same id on Hardy
> - Move the files and profiles over by keeping their permissions (rsync
> -avzp ...)
> - Set the samba SID to be the old orginial one (i do not know how this
> could be done and if it even works)
>
> Will i then simply be able to log back in with my Windows clients?
> Is there a HowTo explaining this scenario?
>
> Thanks,
> Mario



I don't know how "official" it is, but if you move all the files and
everything beforehand, making sure to keep the ACLs, then shutdown samba on
machine 1. Then move

/etc/samba
/var/lib/samba

to the new machine, overwriting the existing ones created by the .debs. Start
samba on the new machine, and you're done.

Of course, that's not very high-availability, and it's assuming you're not
using LDAP or something...even though it should work. Have to make sure
everybody is off of the original. I may be forgetting something, but I've
done it dozens of times; one of the benefits of samba versus MS
implementations is that there's much "magic" involved and so it really can be
as simple as moving the files.

Wes
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
  #5 (permalink)  
Old 06-03-2008
John Drescher
 
Posts: n/a
Default Re: [Samba] How to move a samba PDC to a diffrent box

> i have got a samba pdc running based on the smbldap tools and Debian Sarge.
> Now we would like to move everything over to Ubuntu Hardy.
>

I have done this quite a few times.

> Can i simply:
> - Create the same users and groups with the same id on Hardy


slapcat

slapadd

or
configure syncrepl in openldap-2.3 or greater and add the new ldap
sever as a read only replicator of the first. Then start slapd to sync
and then you can remove the master and sync commands and restart slapd

> - Move the files and profiles over by keeping their permissions (rsync -avzp
> ...)

Seems ok. I do not have any actual user shares or profiles on my pdc.
These are on my fileservers instead.

> - Set the samba SID to be the old orginial one (i do not know how this could
> be done and if it even works)
>

net setdomainsid

> Will i then simply be able to log back in with my Windows clients?
> Is there a HowTo explaining this scenario?
>

After you copy the smb.conf, nsswitch.conf and configure openldap and
start all the required services.

John
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
  #6 (permalink)  
Old 06-18-2008
John Drescher
 
Posts: n/a
Default Re: [Samba] How to move a samba PDC to a diffrent box

> Sorry to bother you. I hope you can help me with my issue.
>

Always cc to the list as well.

> We have a domain with more than 100 users and we need to replace our PDC.
> The PDC main function is to authenticate our users to connect to the shared
> drive and to authenticate computer login. The PDC is running samba with
> openldap on Gentoo machine. I have two BDCs with ACL set to read and write
> only. It was set that way to make the syncing process easier. The syncing
> process is like a chain using slurpd. We plan to use "syncrepl" later.
>
> What is the best way to do to replace the PDC? I already have a Gentoo
> machine up and running. I copied over all the samba and openldap files from
> the old PDC to this new machine. I also exported the database by running
> the "slapcat -l" command. I am hesitant to start the slapd, slurpd and
> samba service as I am not so sure if I am doing the right thing.
>

Disconnect the network cable on the new machine to make sure you are
not interfering with the rest of the network.
Start slapd then use slapadd to add your ldap to the database. Use
slapcat to verify that all was added and the ldif looks correct. Then
start samba and see if the smbclient can connect to itself.

Is the old machine the same name as the new? How about the ipddress?
Are you using wins, lmhosts or dns for your clinets to find the pdc?

BTW, I have to cut this a lot shorter than I want but I am very busy
at the day job and if I do not get my tasks done several new users
will not have a pc on Monday.

John
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
  #7 (permalink)  
Old 06-18-2008
Ivan Ordonez
 
Posts: n/a
Default Re: [Samba] How to move a samba PDC to a diffrent box



John Drescher wrote:
>> Sorry to bother you. I hope you can help me with my issue.
>>
>>

> Always cc to the list as well.
>
>
>> We have a domain with more than 100 users and we need to replace our PDC.
>> The PDC main function is to authenticate our users to connect to the shared
>> drive and to authenticate computer login. The PDC is running samba with
>> openldap on Gentoo machine. I have two BDCs with ACL set to read and write
>> only. It was set that way to make the syncing process easier. The syncing
>> process is like a chain using slurpd. We plan to use "syncrepl" later.
>>
>> What is the best way to do to replace the PDC? I already have a Gentoo
>> machine up and running. I copied over all the samba and openldap files from
>> the old PDC to this new machine. I also exported the database by running
>> the "slapcat -l" command. I am hesitant to start the slapd, slurpd and
>> samba service as I am not so sure if I am doing the right thing.
>>
>>

> Disconnect the network cable on the new machine to make sure you are
> not interfering with the rest of the network.
> Start slapd then use slapadd to add your ldap to the database. Use
> slapcat to verify that all was added and the ldif looks correct. Then
> start samba and see if the smbclient can connect to itself.
>
> Is the old machine the same name as the new? How about the ipddress?
> Are you using wins, lmhosts or dns for your clinets to find the pdc?
>

I will try your suggestion. We plan on using the same name on the new
machine and the same IP address as well.
We are using WINS for our client to find the PDC.

Thanks for all the help.
> BTW, I have to cut this a lot shorter than I want but I am very busy
> at the day job and if I do not get my tasks done several new users
> will not have a pc on Monday.
>
> John
>
>

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
  #8 (permalink)  
Old 06-19-2008
Robert
 
Posts: n/a
Default Re: [Samba] How to move a samba PDC to a diffrent box

On Wednesday 18 June 2008, John Drescher wrote:
> > We have a domain with more than 100 users and we need to replace our PDC.
> > The PDC main function is to authenticate our users to connect to the
> > shared drive and to authenticate computer login. The PDC is running
> > samba with openldap on Gentoo machine. I have two BDCs with ACL set to
> > read and write only. It was set that way to make the syncing process
> > easier. The syncing process is like a chain using slurpd. We plan to
> > use "syncrepl" later.
> >
> > What is the best way to do to replace the PDC? I already have a Gentoo
> > machine up and running. I copied over all the samba and openldap files
> > from the old PDC to this new machine. I also exported the database by
> > running the "slapcat -l" command. I am hesitant to start the slapd,
> > slurpd and samba service as I am not so sure if I am doing the right
> > thing.

>
> Disconnect the network cable on the new machine to make sure you are
> not interfering with the rest of the network.
> Start slapd then use slapadd to add your ldap to the database. Use
> slapcat to verify that all was added and the ldif looks correct. Then
> start samba and see if the smbclient can connect to itself.
>
> Is the old machine the same name as the new? How about the ipddress?
> Are you using wins, lmhosts or dns for your clinets to find the pdc?
>
> BTW, I have to cut this a lot shorter than I want but I am very busy
> at the day job and if I do not get my tasks done several new users
> will not have a pc on Monday.
>
> John


I'll add my two cents. I recently did this, except we aren't using ldap.
Didn't see the advantage. It was a new box with a different IP address. Long
story short: All but 2 XP SP2 refused to join the new domain. Told me Logon
failure: unknown user name or bad password. The Win2K and XP SP1 machines did
not have a problem, and the log files show root authenticated successfully,
so it looks like XP SP2 is the problem, but I have no idea why 2 joined when
all the rest didn't.

Still haven't found the reason or fix and most machines are workgroup members
now...Good luck, hopefully you won't need it.

--
Fail to learn history-repeat it.
Fail to learn rights-lose them.
Learn both-get screwed by previous two groups.
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
  #9 (permalink)  
Old 06-19-2008
Scott Lovenberg
 
Posts: n/a
Default Re: [Samba] How to move a samba PDC to a diffrent box

Robert wrote:
> On Wednesday 18 June 2008, John Drescher wrote:
>
>>> We have a domain with more than 100 users and we need to replace our PDC.
>>> The PDC main function is to authenticate our users to connect to the
>>> shared drive and to authenticate computer login. The PDC is running
>>> samba with openldap on Gentoo machine. I have two BDCs with ACL set to
>>> read and write only. It was set that way to make the syncing process
>>> easier. The syncing process is like a chain using slurpd. We plan to
>>> use "syncrepl" later.
>>>
>>> What is the best way to do to replace the PDC? I already have a Gentoo
>>> machine up and running. I copied over all the samba and openldap files
>>> from the old PDC to this new machine. I also exported the database by
>>> running the "slapcat -l" command. I am hesitant to start the slapd,
>>> slurpd and samba service as I am not so sure if I am doing the right
>>> thing.
>>>

>> Disconnect the network cable on the new machine to make sure you are
>> not interfering with the rest of the network.
>> Start slapd then use slapadd to add your ldap to the database. Use
>> slapcat to verify that all was added and the ldif looks correct. Then
>> start samba and see if the smbclient can connect to itself.
>>
>> Is the old machine the same name as the new? How about the ipddress?
>> Are you using wins, lmhosts or dns for your clinets to find the pdc?
>>
>> BTW, I have to cut this a lot shorter than I want but I am very busy
>> at the day job and if I do not get my tasks done several new users
>> will not have a pc on Monday.
>>
>> John
>>

>
> I'll add my two cents. I recently did this, except we aren't using ldap.
> Didn't see the advantage. It was a new box with a different IP address. Long
> story short: All but 2 XP SP2 refused to join the new domain. Told me Logon
> failure: unknown user name or bad password. The Win2K and XP SP1 machines did
> not have a problem, and the log files show root authenticated successfully,
> so it looks like XP SP2 is the problem, but I have no idea why 2 joined when
> all the rest didn't.
>
> Still haven't found the reason or fix and most machines are workgroup members
> now...Good luck, hopefully you won't need it.
>
>

Something to this effect happened to me once about two years ago. I
think the punch line was that I broke the SID when I changed the IP or
hostname, IIRC. All XP Pro SP2 clients. I think I ended up blowing
away the machine accounts and rejoining the clients to the domain (I
only had about a dozen, so it was just me kicking myself as I recalled
the thought, "this might not be wise" echoing through my minds' ear as I
rebooted the server after changing the configuration, instead of having
to join hundreds of clients back again). Have you verified that this
hasn't happened to you?
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
  #10 (permalink)  
Old 06-19-2008
Bruno La Torre
 
Posts: n/a
Default Re: [Samba] How to move a samba PDC to a diffrent box



Ivan Ordonez ha scritto:
>
>
> John Drescher wrote:
>>> Sorry to bother you. I hope you can help me with my issue.
>>>
>>>

>> Always cc to the list as well.
>>
>>
>>> We have a domain with more than 100 users and we need to replace our
>>> PDC.
>>> The PDC main function is to authenticate our users to connect to the
>>> shared
>>> drive and to authenticate computer login. The PDC is running samba
>>> with
>>> openldap on Gentoo machine. I have two BDCs with ACL set to read
>>> and write
>>> only. It was set that way to make the syncing process easier. The
>>> syncing
>>> process is like a chain using slurpd. We plan to use "syncrepl" later.
>>>
>>> What is the best way to do to replace the PDC? I already have a Gentoo
>>> machine up and running. I copied over all the samba and openldap
>>> files from
>>> the old PDC to this new machine. I also exported the database by
>>> running
>>> the "slapcat -l" command. I am hesitant to start the slapd, slurpd and
>>> samba service as I am not so sure if I am doing the right thing.
>>>
>>>

>> Disconnect the network cable on the new machine to make sure you are
>> not interfering with the rest of the network.
>> Start slapd then use slapadd to add your ldap to the database. Use
>> slapcat to verify that all was added and the ldif looks correct. Then
>> start samba and see if the smbclient can connect to itself.
>>
>> Is the old machine the same name as the new? How about the ipddress?
>> Are you using wins, lmhosts or dns for your clinets to find the pdc?
>>

> I will try your suggestion. We plan on using the same name on the new
> machine and the same IP address as well. We are using WINS for our
> client to find the PDC.
>
>

you must set on the new PDC the SID of the old PDC
see "net getlocalsid" and "net setlocalsid"

bruno
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:50 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0