mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 01:14:21 +01:00
adding samba ad-dc deployement
This commit is contained in:
parent
a5dfc100c6
commit
228808c637
@ -13,4 +13,20 @@ sudo sed -i "s%tools.staticdir.dir.*%tools.staticdir.dir = '`pwd`/resources/stat
|
|||||||
chown -R openldap:openldap /etc/ldap/
|
chown -R openldap:openldap /etc/ldap/
|
||||||
/etc/init.d/slapd restart
|
/etc/init.d/slapd restart
|
||||||
ldapadd -H ldap://localhost -x -D "cn=admin,dc=example,dc=org" -f /etc/ldap/content.ldif -w password
|
ldapadd -H ldap://localhost -x -D "cn=admin,dc=example,dc=org" -f /etc/ldap/content.ldif -w password
|
||||||
sed -i "s/\(127.0.0.1.*\)/\1 ldap.ldapcherry.org/" /etc/hosts
|
sed -i "s/\(127.0.0.1.*\)/\1 ldap.ldapcherry.org ad.ldapcherry.org/" /etc/hosts
|
||||||
|
|
||||||
|
|
||||||
|
smbconffile=/etc/samba/smb.conf
|
||||||
|
domain=dc
|
||||||
|
realm=dc.ldapcherry.org
|
||||||
|
sambadns=INTERNAL
|
||||||
|
targetdir=/var/lib/samba/
|
||||||
|
role=dc
|
||||||
|
printf '' > "${smbconffile}" && \
|
||||||
|
${sambacmd} domain provision ${hostip} \
|
||||||
|
--domain="${domain}" --realm="${realm}" --dns-backend="${sambadns}" \
|
||||||
|
--targetdir="${targetdir}" --workgroup="${domain}" --use-rfc2307 \
|
||||||
|
--configfile="${smbconffile}" --server-role="${role}" -d 1 && \
|
||||||
|
mv "${targetdir}/etc/smb.conf" "${smbconffile}"
|
||||||
|
|
||||||
|
/etc/init.d/samba-ad-dc restart
|
||||||
|
Loading…
Reference in New Issue
Block a user