Author Topic: Copying SAMBA users and groups  (Read 640 times)

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 15
  • Posts: 286
    • View Profile
    • Blonde Guy
Copying SAMBA users and groups
« on: February 18, 2017, 09:48:46 pm »
If I have a SAMBA server, and I want to migrate to new hardware, how can I transfer my users and groups from the old server to the new one?


Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 45
  • Posts: 366
    • View Profile
Re: Copying SAMBA users and groups
« Reply #1 on: February 18, 2017, 09:58:09 pm »
Hi Neil,

If I have a SAMBA server, and I want to migrate to new hardware, how can I transfer my users and groups from the old server to the new one?

From memory, %unixroot%\etc - master.passwd pwd.db spwd.db groups

There may be other files, but they should all have a similar timestamp...

Cheers,

Paul

Herwig Bauernfeind

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 32
    • View Profile
Re: Copying SAMBA users and groups
« Reply #2 on: February 20, 2017, 07:08:53 am »
While Pauls comment is right, it omits the essential /samba/private directory.

I d suggest to use the builtin archive feature of b4smb.cmd - look into this file, it has a feature to take a complete Samba configuration snapshot upon each start.

The complete config is saved into a ZIP file, ready to be unzipped in a new environement.

In case the new server resides in a different place, make sure to change the paths in smb.conf accordingly.

Hope it helps,
Herwig

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 15
  • Posts: 286
    • View Profile
    • Blonde Guy
Re: Copying SAMBA users and groups
« Reply #3 on: February 20, 2017, 06:47:18 pm »
Thanks Paul and Herwig. I looked at b4smb.cmd, and it lacks the groups file, and backs up a few files that look extraneous, like *.pid. It looks like a great start for a backup/restore script.

I can see the backups on my system. I had not known they were there.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com