[Samba] User migration issues

Joan aseques at gmail.com
Tue Apr 15 07:34:53 MDT 2014


I've been looking throught the archives for a set of things to be done to
migrate a install with samba 3.2.5 (lenny) to another server (wheezy)
I can cope with the name change, that's no problem, but I'd like to avoid
having to recreate the users on the new server, so far I tried this,
without much success

- scp the smb.conf to the new server
- make hot backups
  cd /var/lib/samba
  tdbbackup *.tdb
- scp the backups to the new server
- restore the tbd in the new server
  tdbrestore account_policy.tdb < /tmp/backup_dir/account_policy.tdb.bak
  tdbrestore ntdrivers.tdb < /tmp/backup_dir/ntdrivers.tdb.bak
  tdbrestore ntforms.tdb < /tmp/backup_dir/ntforms.tdb.bak
  tdbrestore ntprinters.tdb < /tmp/backup_dir/ntprinters.tdb.bak
  tdbrestore passdb.tdb < /tmp/backup_dir/passdb.tdb.bak
  tdbrestore registry.tdb < /tmp/backup_dir/registry.tdb.bak
  tdbrestore secrets.tdb < /tmp/backup_dir/secrets.tdb.bak
  tdbrestore share_info.tdb < /tmp/backup_dir/share_info.tdb.bak
  tdbrestore winbindd_idmap.tdb < /tmp/backup_dir/winbindd_idmap.tdb.bak
-sincronize system users and groups (basically done with
https://support.rbtechvt.com/index.php?/Knowledgebase/Article/View/38)
- tried to dump the source server as a tdbsam (output is not filled)
  # pdbedit -e tdbsam:/tmp/dump
  export_database: username="(NULL)"
  tdbsam_open: Converting version 0 database to version 3.
  TDBSAM converted successfullyusers with
- tried again exporting as smbpasswd (got more nonsense)
  export_database: username="(NULL)"
  getsmbfilepwent: malformed password entry (no :)
  getsmbfilepwent: malformed password entry (no :)
  build_sam_pass: Failing attempt to store user with non-uid based user
RID.
  getsmbfilepwent: malformed password entry (no :)
  getsmbfilepwent: malformed password entry (no :)
  mod_smbfilepwd_entry: malformed password entry (no :)
  getsmbfilepwent: malformed password entry (no :)
  getsmbfilepwent: malformed password entry (no :)
  mod_smbfilepwd_entry: malformed password entry (no :)


I am probably missing something, can anyone give me a pointer for a
straighforward migration?
Any help appreciated,

Joan


More information about the samba mailing list