Showing posts from July, 2012

Enabling DomainKeys and SPF record in cPanel server

On CPanel servers most of the work is done using cpanel username which then reflect setting on particular domains. To enable DomainKey/SPF You can use the following steps: Login to Cpanel >>Select Email Authentication, from mail session Enable Domain Keys and Enable SPF Or you can do these things from the back-end, as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1)To Add Domainkeys for a single user use the command: # /usr/local/cpanel/bin/domain_keys_installer username 2)To Add DomainKey for all Cpanel users you can use: ls /var/cpanel/users | while read a; \ do \ /usr/local/cpanel/bin/domain_keys_installer $a \ done or simply use the step 1 for all users. 3) To add SPF for a single account # /usr/local/cpanel/bin/spf_installer account-name 4) To add SPF for all cpanel users ls /var/cpanel/users | while read a; do /usr/local/cpanel/bin/spf_installer $a done Enjoy :)

Configuration files in plesk

As plesk is a fully efficient front end tool, we don't recommend you to change the context of configuration files and you can do almost all the tasks from front end itself except some tweak settings. Below attached is a set of plesk back end files which you can edit, before editing the configurations please make sure to take a back up of each files.  +++++++++++++++++++++++++++++++++++++++++++++++++++ Plesk root directory : /usr/local/psa Version : /usr/local/psa/version Admin password is stored : /etc/psa/.psa.shadow Plesk configuration file : /etc/psa/psa.conf Restart Plesk : /etc/rc.d/init.d/plesk restart Apache ———- Main httpd configuration file : /etc/httpd/conf/httpd.conf Plesk httpd : /etc/httpd/conf.d/zz010_psa_httpd.conf Include conf files are under : /etc/httpd/conf.d (depends on the location specified in main httpd) Startup script for plesk apache : /usr/local/psa/admin/bin/httpsdctl start Apache main log files under : /var/log/httpd

Creating new user for MSSQL database

You can login to the IP address, but you must create a user to connect to that database, you can create a user as follows:- Select SQL Server Management Studio >> Connect To your server >> Expand Your server >> Expand Security >> Logins >> Right Click >> New login Give login name >> give username >> select SQL Server Authentication (By default windows authentication) >> Select your database in the “default database field” Select Server Roll tab >> give proper rolls (dbcreator) Select User mappings tab >> select your database >> give proper database roll memberships (select all) This will create a user who can connect remotely, but due to some bug you need to do some more things. Expand Databases >> select your database >> Expand Security >> select Users >> delete the created user Right click >> New User >> Give user name >> For login name

Some useful tips

Tip1. Single command to set user password:- # usermod -p $(echo newpass | openssl passwd -1 -stdin) u1 Tip2. Recovering deleted images from flash cards:- # aptitude update # aptitude install testdisk The tool which we are using is "photorec". Now we are going to remount the flash disk. # dd if=/dev/sdd1 of=disk.img bs=1024M # mkdir ./recovered # photorec /d ./recovered disk.img The recovered file will be in the directory ./recovered.  Tips. Securely erasing files, by filling your disk:- # aptitude update # aptitude install secure-delete Once installed you can overwrite the unused content of any mounted partition like so: # sfill /home # mount | grep /dev Once completed, the huge file is removed, meaning you have free disk space again.