Home > Linux, Redhat > Moving samba from one Linux server to another

Moving samba from one Linux server to another

Suppose you want to replace an existing samba server with a newer system. What steps are involved in this?

On the target system ensure samba is installed:
# yum install samba

Next, copy over the smb.conf and smbpasswd files:
# scp :/etc/samba/smb.conf /etc/samba/smb.conf
# scp :/etc/samba/smbpasswd /etc/samba/smbpasswd

Now, edit your smb.conf file and ensure you “netbios name” is correct for the new server.

Make sure smb service runs at startup:
# chkconfig smb on

On the source server export the user database.  In this example we use smbpasswd format.
pdbedit -e smbpasswd:/root/samba-users.backup

Import the new smbpasswd file and verify there are no errors, if clean it will import all your users:
# pdbedit -i smbpasswd:smbpasswd

Lastly, start the smb service and test your client connections:
# service smb start

Categories: Linux, Redhat
  1. anthonyvenable110
    February 26, 2013 at 8:42 pm

    Reblogged this on anthonyvenable110.

  2. Chris stallaert
    November 24, 2015 at 9:00 pm

    Thank you for this, I am using webmin to copy the smb.conf files. Wish me luck.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: