Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
reconfiguring configurations from sms to new hostname
View previous topic :: View next topic  
Author Message
baboo
Senior Member


Joined: 04 Sep 2007
Posts: 676

PostPosted: Thu Dec 18, 2008 4:44 pm    Post subject: reconfiguring configurations from sms to new hostname Reply with quote

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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Thu Dec 18, 2008 8:30 pm    Post subject: Reply with quote

just do
cat /sbin/netconfig-lcd
and look for SMS configuration Wink
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
View user's profile Send private message Visit poster's website
baboo
Senior Member


Joined: 04 Sep 2007
Posts: 676

PostPosted: Thu Dec 18, 2008 9:16 pm    Post subject: Reply with quote

thanks will give it a try.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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