[Samba] Importing standalone users into Active Directory
rpenny at samba.org
Thu Jul 29 19:52:14 UTC 2021
On Thu, 2021-07-29 at 12:18 -0700, David Brodbeck via samba wrote:
> I've done a lot of Googling but haven't found the answer to this yet.
> I have a standalone Samba server I want to add to my Samba4 Active
> Directory domain. However, the standalone server has about 300 Samba
> accounts in its local tdbsam database that I need to retain. As I see
> there are two possibilities:
> 1. Import the tdbsam accounts into Active Directory. This would be my
> - I've found information on importing tdb files from NT4-style
> to new AD domains using samba-tool, but nothing about taking users
> from a
> standalone server and inserting them into an existing AD.
> - I looked into pdbedit but it doesn't seem to have AD as one of
> backend options (or maybe I'm just missing it.)
> 2. Have Samba authenticate against the TDB file when it can't find an
> account for a user.
> - Researching this led me to references to the command "auth
> which looked promising, but it was removed in 2017.
> Has anyone faced this problem, and found a good solution? I really
> want to have to continue to maintain this server as a standalone one,
> getting 300 people to all set new passwords simultaneously is not
> going to
You can output the samba database with:
pdbedit -L -w
This will produce output like this:
See 'man pdbedit' for more information
You can then parse that for the data you require and use it to create
your users in AD, though you will have 'crack' the NT hash
More information about the samba