[root@ldap ~]# ldapsearch -x -b ‘dc=xyz,dc=com’ ‘(objectclass=*)’
[root@ldap ~]# ldapsearch -x -b ‘dc=xyz,dc=com’ ‘(objectclass=*)’
There are many instances when we want to quit from shell without saving any command in history. We might have run by mistake some rookie command and you dont want to disclose it to others.
kill -9 $$ will do the needful as $$ will provide the PID of the current shell.
Most of the Linux distributions specify local port range from 16384 to 65536 and this may be too low for very high bandwidth and busy boxes, let’s say SMTP, Hosting, POP3/Imap and Proxy servers.
You can adjust this setting by editing /etc/sysctl.conf file and replacing the default:
net.ipv4.ip_local_port_range = 16384 65536
with
net.ipv4.ip_local_port_range = 1024 65536
If you are getting an error while sending mails using the webmail client ‘Squirrel mail’;
SOLUTION
This error is due to the missing entry of the recipient domain in ‘/etc/localdomains’.
Then restart the Exim service.
This should fix the error.
NOTE : If you upgraded exim recently, then you should restore the localdomains in order to update the changes.
Now add the domain name and restart the mail service.
1. Backup old install:
Make a backup of your current SquirrelMail directory.
For example the httpd document directory is /home/httpd/html, that your SquirrelMail install is located at /home/httpd/html/squirrelmail-1.2.6, and that your new SM version is 1.4.0. Substitute version numbers and names as required.
$ cd /home/httpd/html
$ cp -Rp squirrelmail-1.2.6 squirrelmail-1.2.6.bak
2. Unarchive new SquirrelMail:
Make sure that you are in your httpd document directory (/home/httpd/html) and then unarchive the SquirrelMail archive (whatever the filename is):
$ tar -zxvf squirrelmail-1.4.0.tar.gz
3. Copy important files from old install:
The important files to copy are:
A. Preferences
B. Config details
C. Plugins
D. Themes (if you’ve edited or added any of them)
A. Preferences
First, copy your preference data over to the new directory.
$ cp squirrelmail-1.2.6.bak/data/* squirrelmail-1.4.0/data
B. Config details
$ cp squirrelmail-1.2.6.bak/config/config.php squirrelmail-1.4.0/config
C. Copy plugins
$ cp -Rp squirrelmail-1.2.6.bak/plugins/* squirrelmail-1.4.0/plugins
D. Copy themes
$ cp squirrelmail-1.2.6.bak/themes/* squirrelmail-1.4.0/themes/
4. Change permissions:
The web server must have write permission to the data directory.
$ cd squirrelmail-1.4.0
$ chown -R nobody.nobody data
5. Run conf.pl:
Run config/conf.pl to see the new configuration options available with the new version, as well as to verify that all of your old options are set properly.
Always save your options
6. DONE:
That should be all! The most important part is copying your users’ preference files back into the new data directory. This will insure that your users will have their old preferences.
While login through horde, you may sometimes get the following error.
ERROR
“A fatal error has occurred:
DB Error: connect failed
[line 411 of /usr/local/cpanel/base/horde/kronolith/lib/Driver/sql.php]
Details have been logged for the administrator.”
One of the reason for this error is due to missing horde DB from Mysql.
RESOLUTION
$> mysql < /usr/local/cpanel/base/horde/scripts/sql/create.mysql.sql
Then run
$> /scripts/resethorde
$> /scripts/fullhordereset
Now do this :–>
cp /usr/local/cpanel/3rdparty/bin/imapd /usr/sbin
touch /var/cpanel/usecpphp
It should fix the error. 🙂
1) Open the horde configuration file.
cd /usr/local/cpanel/base/horde/config
vi conf.php
2) Change the following two lines from:
$conf[’sql’][’hostspec’] = ‘localhost’;
$conf[’sessionhandler’][’params’][’hostspec’] = ‘localhost’;
To:
$conf[’sql’][’hostspec’] = ‘localhost:/var/lib/mysql/mysql.sock’;
$conf[’sessionhandler’][’params’][’hostspec’] = ‘localhost:/var/lib/mysql/mysql.sock’;
When we login to Horde we get IMAP Authentication errors as below
Notice: (null)(): Retrying LOGIN authentication after AUTHENTICATE LOGIN
failed (errflg=1) in Unknown on line 0
Notice: (null)(): Retrying LOGIN authentication after AUTHENTICATE LOGIN
failed (errflg=1) in Unknown on line 0
Notice: (null)(): Can not authenticate to IMAP server: AUTHENTICATE LOGIN
failed (errflg=2) in Unknown on line 0
Fix :
This issue is happening in many servers and after some research we found that the symlinks passwd.domain.com,shadow.domain.com and the uid.domain.com.gid.domain.com files in /etc/vmail are missing.
cd /etc/vmail
ls -l|grep domain.com
You should see something like this
-rw-r–r– 1 root root 5 Sep 30 22:52 gid.domain.com
lrwxrwxrwx 1 root root 34 Sep 30 22:30 passwd.domain.com -> /home/user/etc/domain.com/passwd
lrwxrwxrwx 1 root root 34 Sep 30 22:30 shadow.domain.com -> /home/user/etc/domain.com/shadow
-rw-r–r– 1 root root 5 Sep 30 22:52 uid.domain.com
-rw-r–r– 1 root root 0 Sep 30 22:30 vhost.domain.com
If you are missing the above files, you can’t login via imap
We fixed the issue using the following method.
touch /etc/passwd ( You can do this command as it will not recreate the file, it will just update the time stamp of the perticular existing file )
/scripts/updateuserdomains
If you are getting Horde login error in Cpanel like :
Warning: Unknown: write failed: Disk quota exceeded (122) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of
session.save_path is correct (/var/cpanel/userhomes/cpanelhorde/sessions) in Unknown on line 0
Then try this Cpanel script :
/scripts/autorepair phpapps_owner_fix
The above script will reset all the quotas for the Cpanel* users.