Author Topic: Reinstall Zentyal with all users/groups in it?  (Read 618 times)

mrpsycho

  • Zen Apprentice
  • *
  • Posts: 46
  • Karma: +2/-1
    • View Profile
Reinstall Zentyal with all users/groups in it?
« on: June 03, 2019, 10:58:03 pm »
Hello!

is it possible reinstall only Zentyal software, without OS?

and would be great to save all users...

doncamilo

  • Zen Samurai
  • ****
  • Posts: 259
  • Karma: +63/-0
    • View Profile
Re: Reinstall Zentyal with all users/groups in it?
« Reply #1 on: June 10, 2019, 02:25:04 pm »
You can take a zentyal config-backup 
 (see https://doc.zentyal.org/en/backup-conf.html#zentyal-configuration-backup )

If you configures a new fresh Zentyal  with the same modules and interfaces and import the zentyal config-backup file you'll reach your goal.

Cheers!  ;)

mrpsycho

  • Zen Apprentice
  • *
  • Posts: 46
  • Karma: +2/-1
    • View Profile
Re: Reinstall Zentyal with all users/groups in it?
« Reply #2 on: July 10, 2019, 11:46:32 pm »
no, it won't work for me... something broken in my installation, and i can't fix it.... only one thing i need to keep - user database.

doncamilo

  • Zen Samurai
  • ****
  • Posts: 259
  • Karma: +63/-0
    • View Profile
Re: Reinstall Zentyal with all users/groups in it?
« Reply #3 on: July 11, 2019, 01:44:41 pm »
Hi mrpsycho!

There are several ways to export your users All of them need the use of command line tools.

If you want to replicate your entire structure whit the same OU, etc, a easy way is to use ldbsearch and ldbadd to make the export/import operation this way:

Code: [Select]
ldbsearch -H /var/lib/samba/private/sam.ldb '(objectclass=person)' > users.ldif

You'll have on the 'users.ldif' an structure like this:

Code: [Select]
GENSEC backend 'gssapi_spnego' registered
GENSEC backend 'gssapi_krb5' registered
GENSEC backend 'gssapi_krb5_sasl' registered
GENSEC backend 'spnego' registered
GENSEC backend 'schannel' registered
GENSEC backend 'naclrpc_as_system' registered
GENSEC backend 'sasl-EXTERNAL' registered
GENSEC backend 'ntlmssp' registered
GENSEC backend 'ntlmssp_resume_ccache' registered
GENSEC backend 'http_basic' registered
GENSEC backend 'http_ntlm' registered
GENSEC backend 'krb5' registered
GENSEC backend 'fake_gssapi_krb5' registered
# record 1
dn: CN=zentyal-mailfilter-zen6,CN=Users,DC=lab6,DC=lan
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: zentyal-mailfilter-zen6
description: Zentyal mailfilter Service Account
instanceType: 4
whenCreated: 20190202125957.0Z
uSNCreated: 3951
name: zentyal-mailfilter-zen6
objectGUID: d95b65d3-a259-48d7-98c9-f077a638ac5a
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
lastLogon: 0
primaryGroupID: 513
objectSid: S-1-5-21-604409375-772662121-2051941146-1110
logonCount: 0
sAMAccountName: zentyal-mailfilter-zen6
sAMAccountType: 805306368
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=lab6,DC=lan
pwdLastSet: 131935859979233700
userAccountControl: 66048
showInAdvancedViewOnly: TRUE
isCriticalSystemObject: TRUE
accountExpires: 0
lastLogonTimestamp: 132071562248171880
whenChanged: 20190709143024.0Z
uSNChanged: 4093
distinguishedName: CN=zentyal-mailfilter-zen6,CN=Users,DC=lab6,DC=lan

# record 2
dn: CN=ZEN6,OU=Domain Controllers,DC=lab6,DC=lan
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
objectClass: computer
cn: ZEN6
instanceType: 4
whenCreated: 20190202124238.0Z
uSNCreated: 3583
name: ZEN6
objectGUID: a70ada43-ae26-44c0-9eea-854761d3bf41
userAccountControl: 532480
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
localPolicyFlags: 0
pwdLastSet: 131935849581460000
primaryGroupID: 516
objectSid: S-1-5-21-604409375-772662121-2051941146-1000
accountExpires: 9223372036854775807
sAMAccountName: ZEN6$
sAMAccountType: 805306369
operatingSystem: Samba
operatingSystemVersion: 4.7.6-Ubuntu
dNSHostName: zen6.lab6.lan
objectCategory: CN=Computer,CN=Schema,CN=Configuration,DC=lab6,DC=lan
isCriticalSystemObject: TRUE
rIDSetReferences: CN=RID Set,CN=ZEN6,OU=Domain Controllers,DC=lab6,DC=lan
serverReferenceBL: CN=ZEN6,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=C
 onfiguration,DC=lab6,DC=lan
msDS-SupportedEncryptionTypes: 31
servicePrincipalName: HOST/zen6.lab6.lan
servicePrincipalName: HOST/zen6.lab6.lan/LAB6
servicePrincipalName: ldap/zen6.lab6.lan/LAB6
servicePrincipalName: GC/zen6.lab6.lan/lab6.lan
servicePrincipalName: ldap/zen6.lab6.lan
servicePrincipalName: HOST/zen6.lab6.lan/lab6.lan
servicePrincipalName: ldap/zen6.lab6.lan/lab6.lan
servicePrincipalName: HOST/ZEN6
servicePrincipalName: E3514235-4B06-11D1-AB04-00C04FC2DCD2/42043ce7-04a1-48d5-
 ad05-ecf3f134eb7c/lab6.lan
servicePrincipalName: ldap/42043ce7-04a1-48d5-ad05-ecf3f134eb7c._msdcs.lab6.la
 n
servicePrincipalName: ldap/ZEN6
servicePrincipalName: RestrictedKrbHost/ZEN6
servicePrincipalName: RestrictedKrbHost/zen6.lab6.lan
servicePrincipalName: ldap/zen6.lab6.lan/DomainDnsZones.lab6.lan
servicePrincipalName: ldap/zen6.lab6.lan/ForestDnsZones.lab6.lan
lastLogonTimestamp: 132071559958297770
whenChanged: 20190709142635.0Z
uSNChanged: 4060
lastLogon: 132072470701814450
logonCount: 5
distinguishedName: CN=ZEN6,OU=Domain Controllers,DC=lab6,DC=lan

# record 3
dn: CN=zentyal-mail-zen6,CN=Users,DC=lab6,DC=lan
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: zentyal-mail-zen6
description: Zentyal mail Service Account
instanceType: 4
whenCreated: 20190202124709.0Z
uSNCreated: 3838
name: zentyal-mail-zen6
objectGUID: 3a3d1c4e-1bd2-4afc-af11-2fc63c679021
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
lastLogon: 0
primaryGroupID: 513
objectSid: S-1-5-21-604409375-772662121-2051941146-1104
logonCount: 0
sAMAccountName: zentyal-mail-zen6
sAMAccountType: 805306368
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=lab6,DC=lan
pwdLastSet: 131935852296779970
userAccountControl: 66048
showInAdvancedViewOnly: TRUE
isCriticalSystemObject: TRUE
accountExpires: 0
servicePrincipalName: imap/zen6.lab6.lan
servicePrincipalName: imap/zen6.lab6.lan@LAB6.LAN
servicePrincipalName: smtp/zen6.lab6.lan
servicePrincipalName: smtp/zen6.lab6.lan@LAB6.LAN
servicePrincipalName: pop/zen6.lab6.lan
servicePrincipalName: pop/zen6.lab6.lan@LAB6.LAN
memberOf: CN=Domain Admins,CN=Users,DC=lab6,DC=lan
lastLogonTimestamp: 132071562241015930
whenChanged: 20190709143024.0Z
uSNChanged: 4092
distinguishedName: CN=zentyal-mail-zen6,CN=Users,DC=lab6,DC=lan

# record 4
dn: CN=Andrea García,CN=Users,DC=lab6,DC=lan
cn:: QW5kcmVhIEdhcmPDrWE=
sn:: R2FyY8OtYQ==
givenName: Andrea
instanceType: 4
whenCreated: 20190202125447.0Z
displayName:: QW5kcmVhIEdhcmPDrWE=
uSNCreated: 3922
name:: QW5kcmVhIEdhcmPDrWE=
objectGUID: 780b661d-6e9b-419a-ad1a-601d33cc854b
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
lastLogon: 0
primaryGroupID: 513
objectSid: S-1-5-21-604409375-772662121-2051941146-1109
accountExpires: 9223372036854775807
logonCount: 0
sAMAccountName: andrea
sAMAccountType: 805306368
userPrincipalName: andrea@LAB6.LAN
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=lab6,DC=lan
uidNumber: 65537
gidNumber: 2513
quota: 500
pwdLastSet: 131935856874770430
userAccountControl: 512
profilePath: \\zen6.LAB6.LAN\profiles\andrea
objectClass: top
objectClass: fetchmailUser
objectClass: posixAccount
objectClass: userZentyalMail
objectClass: person
objectClass: systemQuotas
objectClass: organizationalPerson
objectClass: user
mail: andrea@lab6.lan
mailbox: lab6.lan/andrea/
userMaildirSize: 0
mailquota: 0
mailHomeDirectory: /var/vmail/
memberOf: CN=devops,CN=Groups,DC=lab6,DC=lan
memberOf: CN=news,CN=Groups,DC=lab6,DC=lan
homeDrive: H:
homeDirectory: \\zen6.LAB6.LAN\andrea
lastLogonTimestamp: 131935861225048200
whenChanged: 20190202130202.0Z
uSNChanged: 4045
distinguishedName:: Q049QW5kcmVhIEdhcmPDrWEsQ049VXNlcnMsREM9bGFiNixEQz1sYW4=

# record 5
dn: CN=Gabriel López,CN=Users,DC=lab6,DC=lan
cn:: R2FicmllbCBMw7NwZXo=
sn:: TMOzcGV6
givenName: Gabriel
instanceType: 4
whenCreated: 20190202130144.0Z
displayName:: R2FicmllbCBMw7NwZXo=
uSNCreated: 4036
name:: R2FicmllbCBMw7NwZXo=
objectGUID: f5992fe8-47c0-48d5-b57d-67f835710eeb
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
lastLogon: 0
primaryGroupID: 513
objectSid: S-1-5-21-604409375-772662121-2051941146-1111
accountExpires: 9223372036854775807
logonCount: 0
sAMAccountName: gabriel
sAMAccountType: 805306368
userPrincipalName: gabriel@LAB6.LAN
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=lab6,DC=lan
uidNumber: 65538
gidNumber: 2513
quota: 500
pwdLastSet: 131935861046332010
userAccountControl: 512
profilePath: \\zen6.LAB6.LAN\profiles\gabriel
objectClass: top
objectClass: fetchmailUser
objectClass: posixAccount
objectClass: userZentyalMail
objectClass: person
objectClass: systemQuotas
objectClass: organizationalPerson
objectClass: user
mail: gabriel@lab6.lan
mailbox: lab6.lan/gabriel/
userMaildirSize: 0
mailquota: 0
mailHomeDirectory: /var/vmail/
memberOf: CN=devops,CN=Groups,DC=lab6,DC=lan
homeDrive: H:
whenChanged: 20190202130213.0Z
homeDirectory: \\zen6.LAB6.LAN\gabriel
uSNChanged: 4047
distinguishedName:: Q049R2FicmllbCBMw7NwZXosQ049VXNlcnMsREM9bGFiNixEQz1sYW4=

# record 6
dn: CN=Administrator,CN=Users,DC=lab6,DC=lan
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: Administrator
description: Built-in account for administering the computer/domain
instanceType: 4
whenCreated: 20190202124237.0Z
uSNCreated: 3545
name: Administrator
objectGUID: 15bd17c5-c2fe-4278-8e77-374fc44dfdee
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
pwdLastSet: 131935849578194170
primaryGroupID: 513
objectSid: S-1-5-21-604409375-772662121-2051941146-500
adminCount: 1
sAMAccountName: Administrator
sAMAccountType: 805306368
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=lab6,DC=lan
isCriticalSystemObject: TRUE
memberOf: CN=Domain Admins,CN=Users,DC=lab6,DC=lan
memberOf: CN=Schema Admins,CN=Users,DC=lab6,DC=lan
memberOf: CN=Enterprise Admins,CN=Users,DC=lab6,DC=lan
memberOf: CN=Group Policy Creator Owners,CN=Users,DC=lab6,DC=lan
memberOf: CN=Administrators,CN=Builtin,DC=lab6,DC=lan
uidNumber: 2500
gidNumber: 2512
userAccountControl: 66048
accountExpires: 0
lastLogonTimestamp: 132071559973255780
whenChanged: 20190709142637.0Z
uSNChanged: 4076
lastLogon: 132073165843009180
logonCount: 6
distinguishedName: CN=Administrator,CN=Users,DC=lab6,DC=lan

# record 7
dn: CN=Jacob Perrote,CN=Users,DC=lab6,DC=lan
objectClass: top
objectClass: userZentyalMail
objectClass: posixAccount
objectClass: fetchmailUser
objectClass: person
objectClass: systemQuotas
objectClass: organizationalPerson
objectClass: user
cn: Jacob Perrote
sn: Perrote
givenName: Jacob
instanceType: 4
whenCreated: 20190711111141.0Z
displayName: Jacob Perrote
uSNCreated: 4128
name: Jacob Perrote
objectGUID: b3115f50-1e35-45e0-aca0-0f2d611c6b97
userAccountControl: 512
badPwdCount: 0
codePage: 0
countryCode: 0
homeDirectory: \\zen6.LAB6.LAN\jacob
homeDrive: H:
badPasswordTime: 0
lastLogoff: 0
lastLogon: 0
pwdLastSet: 0
primaryGroupID: 513
profilePath: \\zen6.LAB6.LAN\profiles\jacob
objectSid: S-1-5-21-604409375-772662121-2051941146-1112
accountExpires: 9223372036854775807
logonCount: 0
sAMAccountName: jacob
sAMAccountType: 805306368
userPrincipalName: jacob@LAB6.LAN
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=lab6,DC=lan
mail: jacob@lab6.lan
uidNumber: 65589
quota: 500
mailHomeDirectory: /var/vmail/
userMaildirSize: 0
mailbox: lab6.lan/jacob/
mailquota: 0
gidNumber: 2513
whenChanged: 20190711111145.0Z
uSNChanged: 4129
distinguishedName: CN=Jacob Perrote,CN=Users,DC=lab6,DC=lan

# record 8
dn: CN=Admin DC,CN=Users,DC=lab6,DC=lan
cn: Admin DC
sn: DC
description: Domain Admin
givenName: Admin
instanceType: 4
whenCreated: 20190202125406.0Z
displayName: Admin DC
uSNCreated: 3903
name: Admin DC
objectGUID: 212b7c13-d4a1-46f6-97a5-a56a9cc8e75c
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
primaryGroupID: 513
objectSid: S-1-5-21-604409375-772662121-2051941146-1107
accountExpires: 9223372036854775807
sAMAccountName: admindc
sAMAccountType: 805306368
userPrincipalName: admindc@LAB6.LAN
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=lab6,DC=lan
uidNumber: 65535
gidNumber: 2513
quota: 500
pwdLastSet: 131935856465623970
userAccountControl: 512
profilePath: \\zen6.LAB6.LAN\profiles\admindc
objectClass: top
objectClass: fetchmailUser
objectClass: posixAccount
objectClass: userZentyalMail
objectClass: person
objectClass: systemQuotas
objectClass: organizationalPerson
objectClass: user
mail: admindc@lab6.lan
mailbox: lab6.lan/admindc/
userMaildirSize: 0
mailquota: 0
mailHomeDirectory: /var/vmail/
memberOf: CN=Domain Admins,CN=Users,DC=lab6,DC=lan
homeDrive: H:
homeDirectory: \\zen6.LAB6.LAN\admindc
lastLogon: 132072471176212350
logonCount: 1
lastLogonTimestamp: 132072471176212350
whenChanged: 20190710154517.0Z
uSNChanged: 4124
distinguishedName: CN=Admin DC,CN=Users,DC=lab6,DC=lan

# record 9
dn: CN=dns-zen6,CN=Users,DC=lab6,DC=lan
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: dns-zen6
description: DNS Service Account for zen6
instanceType: 4
whenCreated: 20190202124238.0Z
uSNCreated: 3601
name: dns-zen6
objectGUID: 67bd4ab4-a291-4b31-852c-a7c86ad4f64d
userAccountControl: 512
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
pwdLastSet: 131935849582190920
primaryGroupID: 513
objectSid: S-1-5-21-604409375-772662121-2051941146-1101
accountExpires: 9223372036854775807
sAMAccountName: dns-zen6
sAMAccountType: 805306368
servicePrincipalName: DNS/zen6.lab6.lan
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=lab6,DC=lan
isCriticalSystemObject: TRUE
memberOf: CN=DnsAdmins,CN=Users,DC=lab6,DC=lan
lastLogon: 132072482562968950
logonCount: 4
lastLogonTimestamp: 132072482562968950
whenChanged: 20190710160416.0Z
uSNChanged: 4125
distinguishedName: CN=dns-zen6,CN=Users,DC=lab6,DC=lan

# record 10
dn: CN=krbtgt,CN=Users,DC=lab6,DC=lan
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: krbtgt
description: Key Distribution Center Service Account
instanceType: 4
whenCreated: 20190202124238.0Z
whenChanged: 20190202124238.0Z
uSNCreated: 3547
uSNChanged: 3547
showInAdvancedViewOnly: TRUE
name: krbtgt
objectGUID: 2b352b80-d0ae-40e6-9e80-650e7d693f4a
userAccountControl: 514
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
lastLogon: 0
pwdLastSet: 131935849578742750
primaryGroupID: 513
objectSid: S-1-5-21-604409375-772662121-2051941146-502
adminCount: 1
accountExpires: 9223372036854775807
logonCount: 0
sAMAccountName: krbtgt
sAMAccountType: 805306368
servicePrincipalName: kadmin/changepw
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=lab6,DC=lan
isCriticalSystemObject: TRUE
memberOf: CN=Denied RODC Password Replication Group,CN=Users,DC=lab6,DC=lan
distinguishedName: CN=krbtgt,CN=Users,DC=lab6,DC=lan

# record 11
dn: CN=Guest,CN=Users,DC=lab6,DC=lan
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: Guest
description: Built-in account for guest access to the computer/domain
instanceType: 4
whenCreated: 20190202124237.0Z
uSNCreated: 3546
name: Guest
objectGUID: 270b72a6-5b3d-42df-a971-78585c762c57
userAccountControl: 66082
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
lastLogon: 0
pwdLastSet: 0
primaryGroupID: 514
objectSid: S-1-5-21-604409375-772662121-2051941146-501
accountExpires: 9223372036854775807
logonCount: 0
sAMAccountName: Guest
sAMAccountType: 805306368
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=lab6,DC=lan
isCriticalSystemObject: TRUE
memberOf: CN=Guests,CN=Builtin,DC=lab6,DC=lan
uidNumber: 65534
whenChanged: 20190202124304.0Z
gidNumber: 2514
uSNChanged: 3795
distinguishedName: CN=Guest,CN=Users,DC=lab6,DC=lan

# Referral
ref: ldap://lab6.lan/CN=Configuration,DC=lab6,DC=lan

# Referral
ref: ldap://lab6.lan/DC=DomainDnsZones,DC=lab6,DC=lan

# Referral
ref: ldap://lab6.lan/DC=ForestDnsZones,DC=lab6,DC=lan

# returned 14 records
# 11 entries
# 3 referrals

Remove all the entries related to builtin accounts like


Code: [Select]
"# record 6
dn: CN=Administrator,CN=Users,DC=lab6,DC=lan
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: Administrator
description: Built-in account for administering the computer/domain
instanceType: 4
whenCreated: 20190202124237.0Z
uSNCreated: 3545
name: Administrator
objectGUID: 15bd17c5-c2fe-4278-8e77-374fc44dfdee
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
pwdLastSet: 131935849578194170
primaryGroupID: 513
objectSid: S-1-5-21-604409375-772662121-2051941146-500
adminCount: 1
sAMAccountName: Administrator
sAMAccountType: 805306368
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=lab6,DC=lan
isCriticalSystemObject: TRUE
memberOf: CN=Domain Admins,CN=Users,DC=lab6,DC=lan
memberOf: CN=Schema Admins,CN=Users,DC=lab6,DC=lan
memberOf: CN=Enterprise Admins,CN=Users,DC=lab6,DC=lan
memberOf: CN=Group Policy Creator Owners,CN=Users,DC=lab6,DC=lan
memberOf: CN=Administrators,CN=Builtin,DC=lab6,DC=lan
uidNumber: 2500
gidNumber: 2512
userAccountControl: 66048
accountExpires: 0
lastLogonTimestamp: 132071559973255780
whenChanged: 20190709142637.0Z
uSNChanged: 4076
lastLogon: 132073165843009180
logonCount: 6
distinguishedName: CN=Administrator,CN=Users,DC=lab6,DC=lan
"
Afterwards you have to remove on the users records that you want to import several lines that have to be setted by the new samba4 server. At last you'll have some records as this one that I have done for trial:

Code: [Select]
# record 4
dn: CN=Jacob Perrote,CN=Users,DC=lab6,DC=lan
cn: Jacob Perrote
sn: Perrote
givenName: Jacob
instanceType: 4
displayName: Jacob Perrote
name: Jacob Perrote
uidNumber: 65589 #[b] Change this with a value of the correct range of your system.[/b]
accountExpires: 9223372036854775807
logonCount: 0
sAMAccountName: jacob
userPrincipalName: jacob@LAB6.LAN
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=lab6,DC=lan
quota: 500
userAccountControl: 512
profilePath: \\zen6.LAB6.LAN\profiles\jacob
objectClass: top
objectClass: fetchmailUser
objectClass: posixAccount
objectClass: userZentyalMail
objectClass: person
objectClass: systemQuotas
objectClass: organizationalPerson
objectClass: user
mail: jacob@lab6.lan
mailbox: lab6.lan/jacob/
userMaildirSize: 0
mailquota: 0
mailHomeDirectory: /var/vmail/
homeDrive: H:
homeDirectory: \\zen6.LAB6.LAN\jacob
distinguishedName: CN=Jacob Perrote,CN=Users,DC=lab6,DC=lan

Afterwards in your new system you can import these users this way:

Code: [Select]
sudo ldbadd -H /var/lib/samba/private/sam.ldb users.ldif

You can do it with all the objects you want to export.

Another way is to make an script using the samba-tool suite to automatize this command:

Code: [Select]
sudo samba-tool user add <username> [<password>] [options]

Read this https://wiki.samba.org/index.php/Adding_users_with_samba_tool in order to know the configuration options for each user.

The last way is to use the Zentyal Ebox API. It's the better of the ways but you have to be able to programming Perl.

You can view the API on the Zentyal github.

If you need some more help let me know.

Cheers!
« Last Edit: July 11, 2019, 01:58:15 pm by doncamilo »