# LDIF skeleton for LDAP tree initialization
#

# Users, Organizational Unit
dn: ou=Users,{{ basedn }}
objectClass: top
objectClass: organizationalUnit
ou: Users

# Groups, Organizational Unit
dn: ou=Groups,{{ basedn }}
objectClass: top
objectClass: organizationalUnit
ou: Groups

# Computers, Organizational Unit
dn: ou=Computers,{{ basedn }}
objectClass: top
objectClass: organizationalUnit
ou: Computers

# Idmap, Organizational Unit
dn: ou=Idmap,{{ basedn }}
objectClass: top
objectClass: organizationalUnit
ou: Idmap

# Samba Domain Name, defaults
dn: sambaDomainName={{ smb_domain }},{{ basedn }}
sambaAlgorithmicRidBase: 1000
sambaNextUserRid: 1000
sambaLogonToChgPwd: 0
sambaMinPwdAge: 0
sambaLockoutDuration: 30
sambaLockoutObservationWindow: 30
sambaLockoutThreshold: 0
sambaForceLogoff: -1
sambaRefuseMachinePwdChange: 0
sambaDomainName: {{ smb_domain }}
sambaSID: {{sid.stdout}}
sambaNextRid: 1000
objectClass: top
objectClass: sambaDomain
objectClass: sambaUnixIdPool
sambaPwdHistoryLength: 3
sambaMinPwdLength: 9
sambaMaxPwdAge: -1
gidNumber: 2000
uidNumber: 2000

# admin, Users, Windows Domain Admin
dn: uid=admin,ou=Users,{{ basedn }}
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: sambaSamAccount
objectClass: posixAccount
objectClass: shadowAccount
uid: admin
cn: admin
sn: admin
gidNumber: 512
uidNumber: 512
homeDirectory: /home/admin
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
sambaPwdMustChange: 2147483647
sambaHomeDrive: H:
sambaPrimaryGroupSID: {{sid.stdout}}-512
sambaAcctFlags: [U          ]
sambaSID: {{sid.stdout}}-500
loginShell: /bin/false
gecos: Netbios Domain Administrator
sambaPwdLastSet: {{pass|this_second}}
sambaNTPassword: {{pass|nthash}}
sambaLMPassword: {{pass|lmhash}}
userPassword: {{ hashed_pass.stdout }}
shadowLastChange: {{pass|this_day}}

# nobody, Users, Windows guest user
dn: uid=nobody,ou=Users,{{ basedn }}
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: sambaSamAccount
objectClass: posixAccount
objectClass: shadowAccount
cn: nobody
sn: nobody
gidNumber: 514
uid: nobody
uidNumber: 65534
homeDirectory: /nonexistent
sambaPwdLastSet: 0
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
sambaPwdMustChange: 2147483647
sambaHomeDrive: H:
sambaPrimaryGroupSID: {{sid.stdout}}-514
sambaLMPassword: NO PASSWORDXXXXXXXXXXXXXXXXXXXXX
sambaNTPassword: NO PASSWORDXXXXXXXXXXXXXXXXXXXXX
sambaAcctFlags: [NUD        ]
sambaSID: {{sid.stdout}}-501
loginShell: /bin/false


# Domain Admins, Groups, from Windows Default Groups
dn: cn=Domain Admins,ou=Groups,{{ basedn }}
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 512
cn: Domain Admins
memberUid: admin
description: Netbios Domain Administrators
sambaSID: {{sid.stdout}}-512
sambaGroupType: 2
displayName: Domain Admins

# Domain Users, Groups, from Windows Default Groups
dn: cn=Domain Users,ou=Groups,{{ basedn }}
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 513
cn: Domain Users
description: Netbios Domain Users
sambaSID: {{sid.stdout}}-513
sambaGroupType: 2
displayName: Domain Users

# Domain Guests, Groups, from Windows Default Groups
dn: cn=Domain Guests,ou=Groups,{{ basedn }}
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 514
cn: Domain Guests
description: Netbios Domain Guests Users
sambaSID: {{sid.stdout}}-514
sambaGroupType: 2
displayName: Domain Guests

# Domain Computers, Groups, from Windows Default Groups
dn: cn=Domain Computers,ou=Groups,{{ basedn }}
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 515
cn: Domain Computers
description: Netbios Domain Computers accounts
sambaSID: {{sid.stdout}}-515
sambaGroupType: 2
displayName: Domain Computers

# Administrators, Groups, from Windows Default Groups
dn: cn=Administrators,ou=Groups,{{ basedn }}
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 544
cn: Administrators
description: Netbios Domain Members can fully administer the computer/sambaDom
 ainName
sambaSID: S-1-5-32-544
sambaGroupType: 5
displayName: Administrators

# Account Operators, Groups, from Windows Default Groups
dn: cn=Account Operators,ou=Groups,{{ basedn }}
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 548
cn: Account Operators
description: Netbios Domain Users to manipulate users accounts
sambaSID: S-1-5-32-548
sambaGroupType: 5
displayName: Account Operators

# Print Operators, Groups, from Windows Default Groups
dn: cn=Print Operators,ou=Groups,{{ basedn }}
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 550
cn: Print Operators
description: Netbios Domain Print Operators
sambaSID: S-1-5-32-550
sambaGroupType: 5
displayName: Print Operators

# Backup Operators, Groups, from Windows Default Groups
dn: cn=Backup Operators,ou=Groups,{{ basedn }}
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 551
cn: Backup Operators
description: Netbios Domain Members can bypass file security to back up files
sambaSID: S-1-5-32-551
sambaGroupType: 5
displayName: Backup Operators

# Replicators, Groups, from Windows Default Groups
dn: cn=Replicators,ou=Groups,{{ basedn }}
objectClass: top
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 552
cn: Replicators
description: Netbios Domain Supports file replication in a sambaDomainName
sambaSID: S-1-5-32-552
sambaGroupType: 5
displayName: Replicators

