|
[SMS] - Superb Mini Server Project Support Forum |
|
|
|
View previous topic :: View next topic |
Author |
Message |
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Thu Dec 18, 2008 4:44 pm Post subject: reconfiguring configurations from sms to new hostname |
|
|
I want to understand your setup better. If I run netconfig-lcd, that changes the hostname, ldap domain name. However I noticed that apache and postfix still have sms in them. Also, when logging into phpldapadmin it has egroupware config even though I have not installed egroupware.
So, if I want to change everything that is currently configured with sms with new name, how do I do that?
thanks |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Thu Dec 18, 2008 8:30 pm Post subject: |
|
|
just do
cat /sbin/netconfig-lcd
and look for SMS configuration
Code: | ##########################################
# SMS Configuration
##########################################
# getting the variables
HNM=`hostname`
DNM=`hostname -d`
# Apache Server
sed -e "s,$HNM.$DNM,$HOSTNM.$DOMAIN,g" -i /etc/httpd/httpd.conf
sed -e "s,$HNM,$HOSTNM,g" -i /etc/httpd/httpd.conf
# index.php
sed -e "s,https://$HNM:10000,https://$HOSTNM:10000,g" -i /var/www/htdocs/index.php
sed -e "s,http://$HNM:631,http://$HOSTNM:631,g" -i /var/www/htdocs/index.php
# Postfix Mail Server
sed -e "s,$HNM.$DNM,$HOSTNM.$DOMAIN,g" -i /etc/postfix/main.cf
sed -e "s,$DNM,$DOMAIN,g" -i /etc/postfix/main.cf
sed -e "s,dc=$HNM\,dc=$DNM,dc=$HOSTNM\,dc=$DOMAIN,g" -i /etc/postfix/ldap-aliases.cf
sed -e "s,dc=$HNM\,dc=$DNM,dc=$HOSTNM\,dc=$DOMAIN,g" -i /etc/postfix/ldap-maillists.cf
sed -e "s,dc=$HNM\,dc=$DNM,dc=$HOSTNM\,dc=$DOMAIN,g" -i /etc/postfix/ldap-users.cf
sed -e "s,dc=$HNM\,dc=$DNM,dc=$HOSTNM\,dc=$DOMAIN,g" -i /etc/webmin/postfix/config
# SASL Auhtentication
sed -e "s,dc=$HNM\,dc=$DNM,dc=$HOSTNM\,dc=$DOMAIN,g" -i /etc/saslauthd.conf
# Dovecot IMAP Server
sed -e "s,dc=$HNM\,dc=$DNM,dc=$HOSTNM\,dc=$DOMAIN,g" -i /etc/dovecot-ldap.conf
# Squirrelmail
sed -e "s,$HNM.$DNM,$HOSTNM.$DOMAIN,g" -i /var/www/htdocs/webmail/config/config.php
# PHPLDAPAdmin
sed -e "s,dc=$HNM\,dc=$DNM,dc=$HOSTNM\,dc=$DOMAIN,g" -i /var/www/htdocs/phpldapadmin/config/config.php
# OpenLDAP
sed -e "s,dc=$HNM\,dc=$DNM,dc=$HOSTNM\,dc=$DOMAIN,g" -i /etc/openldap/ldap.conf
sed -e "s,dc=$HNM\,dc=$DNM,dc=$HOSTNM\,dc=$DOMAIN,g" -i /etc/openldap/slapd.conf
sed -e "s,$HNM.$DNM,$HOSTNM.$DOMAIN,g" -i /etc/openldap/ldap.conf
sed -e "s,dc=$HNM\,dc=$DNM,dc=$HOSTNM\,dc=$DOMAIN,g" -i /etc/openldap/sms.ldif
sed -e "s,$HNM,$HOSTNM,g" -i /etc/openldap/sms.ldif
killall slapd
if [ -r /var/run/slapd.pid ]; then rm -f /var/run/slapd.pid; fi
sleep 1
rm -rf /var/lib/openldap-data/*
sleep 1
/etc/rc.d/rc.openldap start
sleep 1
ldapadd -f /etc/openldap/sms.ldif -x -D cn=Manager,dc=$HOSTNM,dc=$DOMAIN -w toor
# end of SMS Configuration
|
Postfix and apache should change, although postfix might have a duplicate entry.
LDAP Database for egroupware is preinstaled just flush it and create your own.
You could skip openldap-data-noarch-1sms.tgz while installing though.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Thu Dec 18, 2008 9:16 pm Post subject: |
|
|
thanks will give it a try. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|
SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional
|
|
|
|