mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-25 10:44:30 +01:00
various fixes un deploy.sh
This commit is contained in:
parent
ee328537ab
commit
241ecb5ff7
@ -15,22 +15,26 @@ sudo sed -i "s%template_dir.*%template_dir = '`pwd`/resources/templates/'%" /etc
|
|||||||
sudo sed -i "s%tools.staticdir.dir.*%tools.staticdir.dir = '`pwd`/resources/static/'%" /etc/ldapcherry/ldapcherry.ini
|
sudo sed -i "s%tools.staticdir.dir.*%tools.staticdir.dir = '`pwd`/resources/static/'%" /etc/ldapcherry/ldapcherry.ini
|
||||||
|
|
||||||
chown -R openldap:openldap /etc/ldap/
|
chown -R openldap:openldap /etc/ldap/
|
||||||
|
rm /etc/ldap/slapd.d/cn\=config/*mdb*
|
||||||
/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:390 -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 ad.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
|
smbconffile=/etc/samba/smb.conf
|
||||||
domain=dc
|
domain=dc
|
||||||
realm=dc.ldapcherry.org
|
realm=dc.ldapcherry.org
|
||||||
sambadns=INTERNAL
|
sambadns=SAMBA_INTERNAL
|
||||||
targetdir=/var/lib/samba/
|
targetdir=/var/lib/samba/
|
||||||
role=dc
|
role=dc
|
||||||
|
sambacmd=samba-tool
|
||||||
|
adpass=qwertyP455
|
||||||
|
|
||||||
printf '' > "${smbconffile}" && \
|
printf '' > "${smbconffile}" && \
|
||||||
${sambacmd} domain provision ${hostip} \
|
${sambacmd} domain provision ${hostip} \
|
||||||
--domain="${domain}" --realm="${realm}" --dns-backend="${sambadns}" \
|
--domain="${domain}" --realm="${realm}" --dns-backend="${sambadns}" \
|
||||||
--targetdir="${targetdir}" --workgroup="${domain}" --use-rfc2307 \
|
--targetdir="${targetdir}" --workgroup="${domain}" --use-rfc2307 \
|
||||||
--configfile="${smbconffile}" --server-role="${role}" -d 1 && \
|
--configfile="${smbconffile}" --server-role="${role}" -d 1 --adminpass="${adpass}" && \
|
||||||
mv "${targetdir}/etc/smb.conf" "${smbconffile}"
|
mv "${targetdir}/etc/smb.conf" "${smbconffile}"
|
||||||
|
|
||||||
/etc/init.d/samba-ad-dc restart
|
/etc/init.d/samba-ad-dc restart
|
||||||
|
Loading…
Reference in New Issue
Block a user