LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-15-2018, 07:07 PM   #1
cahalsall
LQ Newbie
 
Registered: Jan 2006
Location: Belmopan, Belize, Central America
Distribution: Centos, FreeBSD
Posts: 23

Rep: Reputation: 1
Migrating Samba from CentOS 6 to 7


I have managed to migrate Samba NT Domains using tdbsam backend from CentOS 5 to 6 without any problems. I have not tried to migrate from 6 to 7 yet, but just looking at the changes within the Operating System it seems that the old way of doing it will not work. Have anyone managed to do this successfully?
 
Old 02-16-2018, 07:48 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
I think it would help if you were to provide more information about your network. What exactly to you mean by "Samba NT Domains," for example, as Samba is Linux and NT is Windows?

This will provide some quidelines: https://www.linuxquestions.org/linux...Ask_a_Question
 
Old 03-27-2018, 12:31 AM   #3
cahalsall
LQ Newbie
 
Registered: Jan 2006
Location: Belmopan, Belize, Central America
Distribution: Centos, FreeBSD
Posts: 23

Original Poster
Rep: Reputation: 1
Sorry should have been clearer. Samba "NT type Domain" as opposed to Active Directory or LDAP. It was meant to be a general question. With tdbsam the key to migrating a samba servers lie in the /var/lib/samba/private and /etc/samba directories as well as content from the /etc/passwd, /etc/group and /etc/shadow files.

Here is an example of the script I use to backup samba server settings.

Code:
export UGIDLIMIT=500
awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534)' /etc/passwd > /root/serverbk/passwd.mig
awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534)' /etc/group > /root/serverbk/group.mig
awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534) {print $1}' /etc/passwd | tee - |egrep -f - /etc/shadow > /root/serverbk/shadow.mig
/bin/cp -f /etc/gshadow /root/serverbk/gshadow.mig

/bin/cp -apf /etc/samba /root/serverbk/
/bin/cp -apf /var/lib/samba/private /root/serverbk/
/bin/cp -apf /var/lib/samba/netlogon /root/serverbk/
/usr/bin/net groupmap list > /root/serverbk/groupmap.list
/bin/cp -apf /root/bin /root/serverbk/
/usr/bin/lpstat -v > /root/serverbk/printer.list
/bin/ls -l /sambashares > /root/serverbk/share.list

/usr/bin/crontab -l > /root/serverbk/crontab-root.list
/sbin/runuser -l adminuser -c '/usr/bin/crontab -l'  > /root/serverbk/crontab-adminuser.list

# Optional (can cause some problems, better just backup data without settings and config files)
# tar -zcvpf /root/serverbk/home.tar.gz /home
There is also a restore script.

Last edited by cahalsall; 03-27-2018 at 12:45 AM.
 
  


Reply



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 On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Migrating a Samba server from CentOS to Slackware... where's the 'smbpassd' file? kikinovak Slackware 7 10-16-2011 06:20 AM
Migrating Samba-3 to a New Server Sum1 Linux - Software 0 01-06-2011 12:59 AM
Migrating Postfix and cyrus imap from OpenSuse 10.0 to CentOS 5.1 Eric_Cartman Linux - Server 0 08-24-2008 10:21 AM
migrating user to samba spivy66 Red Hat 2 02-14-2006 09:34 AM
Help migrating to CentOS 4.x tacmao1 Linux - Enterprise 3 03-11-2005 03:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration