[Samba] Copy usernames and passwords to another machine

mathias dufresne infractory at gmail.com
Thu Sep 24 14:04:35 UTC 2015


Hi,

Your 2 Samba servers are file servers only? No AD nor NT4 domain?

If they are both file servers you would need:
- Samba installed on both server, same configuration as a start (could of
course be changed later)
- Same users defined in system side (copying your users lines from
/etc/passwd and /etc/shadow from working file server to the new one. Don't
copy services accounts - as ssh, postgresql...- nor root account, just
Samba users lines).
- Same Samba database on both servers. Here you have to find on your
working file server where is stored that database, I have no idea about
that.

Once all that is copied from your working server to the new one both should
work identically (except for shares where paths or files could be missing).

That's just an idea, I didn't tested that.

Cheers,

mathias


2015-09-24 15:47 GMT+02:00 Chris Rodgers <
christopher.rodgers at cardiov.ox.ac.uk>:

> Dear All,
>
> I have two linux machines. The first is setup with samba users already on
> Samba 4.2 on Fedora 22.
>
> I'd like to also add these users on the second machine (RHEL7 also Samba
> 4), and keep the same passwords.
>
> I have looked on the Samba FAQs and see I can use:
> pdbedit -e smbpasswd:FILENAME_HERE
>
> But there seem to be three potential problems:
> 1. Approximately half of the accounts on my system give an error:
> "build_sam_pass: Failing attempt to store user with non-uid based user RID."
> 2. All the smbpasswd-style lines that are output by pdbedit have the first
> hash set to XXXXXXXXXXXXXXXXXXXXX. The manual says this means the accounts
> are disabled?? So will no accounts work after migration?
> 3. There are warnings on the web that the smbpasswd format doesn't
> store all the information in the tdbsam backend. Does this matter??
>
> So, any advice on what is the best way to do this migration would be
> appreciated.
>
> Thanks,
>
> Chris.
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>


More information about the samba mailing list