1. Download the latest atrpms-repo rpm from
http://dl.atrpms.net/el6-x86_64/atrpms/stable/
2. Install atrpms-repo rpm:
# rpm -Uvh atrpms-repo*rpm
3. Install gstreamer-ffmpeg rpm package:
# yum install gstreamer-ffmpeg
[fusion]
name=fusion
baseurl=http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/
enabled=1
gpgcheck=0
[atrpms]
name=atrpms
baseurl=http://dl.atrpms.net/el6-x86_64/atrpms/stable/
enabled=1
gpgcheck=0
Thursday, November 29, 2012
Tuesday, November 27, 2012
Creating a Certificate Authority OR Self Signing
To create the private Certificate Authority we could make one as below..
How the whole thing works
1.First create Certificate Authority with needed credentials as per needed certificate details.To sign a certificate signing request the authority must have a certificate with same credentials as that of certificate signing request . so after configuring /etc/pki/tls/openssl.cnf with needed credential we need to create a private key and a certificate in the certificate authority
2.create the private key and certificate signing request at client side as per needed credential.
3.scp the certificate signing request csr from the client to the server which is the certificate authority and sign the csr with the certificate authority and get the certificate and send the certificate back to client
Signing of the certificate will be successful only if the the credentials in the certificate authorities certificate and that in certificate signing request matches
Packages needed are openssl*
1.
In server where we need to create the certificate authority
cd /etc/pki/tls/openssl.cnf
In that file we need to change the following as per out need
#######
dir = /etc/pki/CA ----------------------> root directory of Certificate authority
certificate = $dir/my-ca.crt ------------------> Certificate of the CA which is used to check against the csr
crl = $dir/crl.pem ------------------> certificate revocation list if the certificate is compromised
private_key = $dir/private/my-ca.key -----------> private key of Certificate authority used to create the CA's certificate
#######Basic Credentials that should be same in both csr and the certificate in CA
stateOrProvinceName_default = North Carolina
localityName_default = Raleigh
0.organizationName_default = Example, Inc.
#######There are more credentials which are used in certificate creation
#######Make the needed directories in CA
mkdir /etc/pki/CA/{cert,crl,newcerts}
touch /etc/pki/CA/index.txt
echo 01 > /etc/pki/CA/serial
NOW Creating the CA's private key and CERTIFICATE in corresponding places
cd /etc/pki/CA
openssl genrsa -out private/my-ca.key -des3 2048
openssl req -new -x509 -key private/my-ca.key -days 365 > my-ca.crt
2.
Creating privet key and Certificate Signing Request at client side
Creating private key
openssl genrsa -out private.key -des3 2048
Creating certificate sigining request with private key
openssl req -new -key private.key -out certificate.csr
here you will be asked for needed credentials ..Remember if the credentials are different in csr and ca the signing will be failure
3
With certificate.csr in Certificate Authority server we can sign the certificate
openssl ca -in certificatecsr.csr -out certificate.crt
here the ca implies that it will use the configuration from /etc/pki/tls/openssl.cnf to sign the signing request.
Or the other way is to self sign as follow after creating the private key and csr we could do self signing as follows
openssl x509 -req -days 365 -in certificate.csr -signkey private.key -out certificate.crt
How the whole thing works
1.First create Certificate Authority with needed credentials as per needed certificate details.To sign a certificate signing request the authority must have a certificate with same credentials as that of certificate signing request . so after configuring /etc/pki/tls/openssl.cnf with needed credential we need to create a private key and a certificate in the certificate authority
2.create the private key and certificate signing request at client side as per needed credential.
3.scp the certificate signing request csr from the client to the server which is the certificate authority and sign the csr with the certificate authority and get the certificate and send the certificate back to client
Signing of the certificate will be successful only if the the credentials in the certificate authorities certificate and that in certificate signing request matches
Packages needed are openssl*
1.
In server where we need to create the certificate authority
cd /etc/pki/tls/openssl.cnf
In that file we need to change the following as per out need
#######
dir = /etc/pki/CA ----------------------> root directory of Certificate authority
certificate = $dir/my-ca.crt ------------------> Certificate of the CA which is used to check against the csr
crl = $dir/crl.pem ------------------> certificate revocation list if the certificate is compromised
private_key = $dir/private/my-ca.key -----------> private key of Certificate authority used to create the CA's certificate
#######Basic Credentials that should be same in both csr and the certificate in CA
stateOrProvinceName_default = North Carolina
localityName_default = Raleigh
0.organizationName_default = Example, Inc.
#######There are more credentials which are used in certificate creation
#######Make the needed directories in CA
mkdir /etc/pki/CA/{cert,crl,newcerts}
touch /etc/pki/CA/index.txt
echo 01 > /etc/pki/CA/serial
NOW Creating the CA's private key and CERTIFICATE in corresponding places
cd /etc/pki/CA
openssl genrsa -out private/my-ca.key -des3 2048
openssl req -new -x509 -key private/my-ca.key -days 365 > my-ca.crt
2.
Creating privet key and Certificate Signing Request at client side
Creating private key
openssl genrsa -out private.key -des3 2048
Creating certificate sigining request with private key
openssl req -new -key private.key -out certificate.csr
here you will be asked for needed credentials ..Remember if the credentials are different in csr and ca the signing will be failure
3
With certificate.csr in Certificate Authority server we can sign the certificate
openssl ca -in certificatecsr.csr -out certificate.crt
here the ca implies that it will use the configuration from /etc/pki/tls/openssl.cnf to sign the signing request.
Or the other way is to self sign as follow after creating the private key and csr we could do self signing as follows
openssl x509 -req -days 365 -in certificate.csr -signkey private.key -out certificate.crt
Tuesday, November 13, 2012
Install Dolphin in Vps / Hosting
Installing Dolphin
We can install dolphin in two ways either as main site or as a sub directory ie a folder inside the main site. The difference between this two are is that to get the dolphin installed as the main site uncompress the tar file in the public_html folder so that we can access the site as following
http://your-domain-name/
and in second type we will be uncompressing the tar file in a directory inside public_html so that we can access the site as follows
http://your-domain-name/<name-we-give>
Downloading Dolphin
Change to the Dolphin directory by entering the following command:
Download the latest Dolphin release by entering the following command:
Unzip the archive by entering the following command:
We could create the database and user using cpanel mysql window. Normally the database are named as username_databasename and username as username_name
mysql
CREATE USER USER_NAME IDENTIFIED BY PASSWORD
CREATE DATABASE DATABASE_NAME;
GRAND ALL ON DATABASE_NAME TO USER_NAME;
FLUSH PRIVILEGES;
EXIT;
GRANT ALL PRIVILEGES ON db_base.* TO db_user @’%’ IDENTIFIED BY ‘db_passwd’;
Navigate to http://host-name.com/dolphin/install/index.php.
The Dolphin installation page appears,
Click Install to begin.
If any of the file get failed we need to do that manually using chmod 755 for needed files.
All of the files listed should be Writable. Click Next to continue. The Paths Check webpage appears, as shown below.
If we get ImageMagick installed failed we need to install it manually .we could intall that using the cpanel scripts
Check whether ImageMagicK is installed or not:-à/scripts/checkimagemagick
Install ImageMagick :à/scripts/installimagemagick
/usr/bin/convert –version
If we get GD library failed intall it using
/scripts/easyapache
Even after installing GD library if we get GD library failed we need to edit
Find and edit the php.ini
And add
extension=php_gd2.dll
extension=php_gd.dll
and run the check again.
All of the paths listed should be "found". You should also see a GD library installed message at the bottom of the webpage. Click Next to continue. The Database webpage appears.
Enter the details for the Dolphin database you created earlier in this guide. Click Next to continue. The Configuration webpage appears.
Complete the form by entering the required information for your website, and then click Next to continue. The Cron Jobs webpage appears.
Now you'll need to set up a cron job specified on the webpage. We can also do this from the cpanel in graphical way. To set up your cron job, you'll need to open your crontab for editing by entering the following command:
To save the cron job, press Control-X, and then press Y to save.
Back in your web browser, click Next. The Permissions Reversal webpage appears, as shown below.
To reverse your permissions, enter the following commands, one by one.
Back in your web browser, click Check. The webpage should now indicate that the directory is "Non-writable", as shown below.
Click Next. If the webpage shown below appears its finished
After that copy the languages from the install/lang directory to dolphin/lang that in dolphin.
mv /<path-to-document-root>/public_html/dolphin/install/langs/* /<path-to-document-root>/public_html/dolphin/langs/
Now you'll want to remove the install directory by entering the following commands, one by one:
Change the permissions of the cache, cache_public, langs, and tmp folders by entering the following commands, one by one:
You can now log into your admin panel at http://host-name.com/dolphin/administration/.
We can install dolphin in two ways either as main site or as a sub directory ie a folder inside the main site. The difference between this two are is that to get the dolphin installed as the main site uncompress the tar file in the public_html folder so that we can access the site as following
http://your-domain-name/
and in second type we will be uncompressing the tar file in a directory inside public_html so that we can access the site as follows
http://your-domain-name/<name-we-give>
Downloading Dolphin
Cd /<path-to-root_directory>/public_html
mkdir dolphin
Change to the Dolphin directory by entering the following command:
cd dolphin
Download the latest Dolphin release by entering the following command:
http://www.boonex.com/paymentprovider/payment#download
wget http://get.boonex.com/Dolphin-v.7.0
Unzip the archive by entering the following command:
unzip Dolphin-v.7.0
Adding a MySQL User and Database
We could create the database and user using cpanel mysql window. Normally the database are named as username_databasename and username as username_name
mysql
CREATE USER USER_NAME IDENTIFIED BY PASSWORD
CREATE DATABASE DATABASE_NAME;
GRAND ALL ON DATABASE_NAME TO USER_NAME;
FLUSH PRIVILEGES;
EXIT;
GRANT ALL PRIVILEGES ON db_base.* TO db_user @’%’ IDENTIFIED BY ‘db_passwd’;
Configuring Permissions
Cd /<path-to-root-document>/public_html/dolphin
chmod 777 ./inc ./backup ./cache ./cache_public ./langs ./media/app ./media/images ./media/images/banners ./media/images/blog ./media/images/classifieds ./media/images/membership ./media/images/profile ./media/images/profile_bg ./media/images/promo ./media/images/promo/original ./tmp ./plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer ./plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/HTML ./plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/CSS ./plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/Test ./plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/URI
chmod 777 ./flash/modules/board/files ./flash/modules/chat/files ./flash/modules/photo/files ./flash/modules/im/files ./flash/modules/mp3/files ./flash/modules/video/files ./flash/modules/video_comments/files
chmod 666 inc/prof.inc.php
chmod 666 ./flash/modules/global/data/integration.dat ./flash/modules/board/xml/config.xml ./flash/modules/board/xml/langs.xml ./flash/modules/board/xml/main.xml ./flash/modules/board/xml/skins.xml ./flash/modules/chat/xml/config.xml ./flash/modules/chat/xml/langs.xml ./flash/modules/chat/xml/main.xml ./flash/modules/chat/xml/skins.xml ./flash/modules/desktop/xml/config.xml ./flash/modules/desktop/xml/langs.xml ./flash/modules/desktop/xml/main.xml ./flash/modules/desktop/xml/skins.xml ./flash/modules/global/xml/config.xml ./flash/modules/global/xml/main.xml ./flash/modules/im/xml/config.xml ./flash/modules/im/xml/langs.xml ./flash/modules/im/xml/main.xml ./flash/modules/im/xml/skins.xml ./flash/modules/mp3/xml/config.xml ./flash/modules/mp3/xml/langs.xml ./flash/modules/mp3/xml/main.xml ./flash/modules/mp3/xml/skins.xml ./flash/modules/photo/xml/config.xml ./flash/modules/photo/xml/langs.xml ./flash/modules/photo/xml/main.xml ./flash/modules/photo/xml/skins.xml ./flash/modules/video/xml/config.xml ./flash/modules/video/xml/langs.xml ./flash/modules/video/xml/main.xml ./flash/modules/video/xml/skins.xml ./flash/modules/video_comments/xml/config.xml ./flash/modules/video_comments/xml/langs.xml ./flash/modules/video_comments/xml/main.xml ./flash/modules/video_comments/xml/skins.xml
chmod 777 flash/modules/global/app/ffmpeg.exe
Running the Install Script
Navigate to http://host-name.com/dolphin/install/index.php.
The Dolphin installation page appears,
Click Install to begin.
If any of the file get failed we need to do that manually using chmod 755 for needed files.
All of the files listed should be Writable. Click Next to continue. The Paths Check webpage appears, as shown below.
If we get ImageMagick installed failed we need to install it manually .we could intall that using the cpanel scripts
Check whether ImageMagicK is installed or not:-à/scripts/checkimagemagick
Install ImageMagick :à/scripts/installimagemagick
/usr/bin/convert –version
If we get GD library failed intall it using
/scripts/easyapache
- "Start customizing based on profile"
- Select the Apache version and click next step.
- Select the Major PHP Version and click next step.
- Select the PHP Minor Version and click next step.
- Scroll down to the bottom and click "Exhaustive Options List". (If the module you are needing isn't listed)
- Select the modules you wish to add (GD library) then scroll to the bottom and click "Save and Build".
Even after installing GD library if we get GD library failed we need to edit
Find and edit the php.ini
And add
extension=php_gd2.dll
extension=php_gd.dll
and run the check again.
All of the paths listed should be "found". You should also see a GD library installed message at the bottom of the webpage. Click Next to continue. The Database webpage appears.
Enter the details for the Dolphin database you created earlier in this guide. Click Next to continue. The Configuration webpage appears.
Complete the form by entering the required information for your website, and then click Next to continue. The Cron Jobs webpage appears.
Now you'll need to set up a cron job specified on the webpage. We can also do this from the cpanel in graphical way. To set up your cron job, you'll need to open your crontab for editing by entering the following command:
sudo crontab -e
MAILTO=myemail@gmail.com
* * * * * cd /var/www/periodic; /usr/bin/php -q cron.php
To save the cron job, press Control-X, and then press Y to save.
Back in your web browser, click Next. The Permissions Reversal webpage appears, as shown below.
To reverse your permissions, enter the following commands, one by one.
cd /<path-to-document-root>/public_html/dolphin
find ./ -type d -exec chmod 755 {} \;
sudo find ./ -type f -exec chmod 644 {} \;
chmod 755 flash/modules/global/app/ffmpeg.exe;
Back in your web browser, click Check. The webpage should now indicate that the directory is "Non-writable", as shown below.
Click Next. If the webpage shown below appears its finished
After that copy the languages from the install/lang directory to dolphin/lang that in dolphin.
mv /<path-to-document-root>/public_html/dolphin/install/langs/* /<path-to-document-root>/public_html/dolphin/langs/
Now you'll want to remove the install directory by entering the following commands, one by one:
cd /<path-to-root-document>/public/dolphin
rm -rf install
Change the permissions of the cache, cache_public, langs, and tmp folders by entering the following commands, one by one:
chmod 777 cache
chmod 777 cache_public
chmod 777 tmp
You can now log into your admin panel at http://host-name.com/dolphin/administration/.
Installing Wordpresss in VPS / Hosting places
We can install wordpress in our domain in two ways . Either as main site ie in public_html or as an sub website inside a directory in the public_html..difference between then is just about uncompromising the tar file in public_html directory or in a sub directory . For doing that in either way all the steps are same .
First we need to download the tar file and we need to uncompress it in the needed directory .
cd /<path-to-document-root>/public_html
wget http://wordpress.org/latest.tar.gz
now decompress the file
tar -xvzf latest.tar.gz
change the privilage of the folder by
chmod -R 777 *
noramally to make it the main site we copy the tar file and extract the tar file in same public_html directroy so that it can be accessed like
http://your-domain-name
To make it a sub website first we need to make a direcotry with any name inside the public_html and untar the tar file into that it can be accessed by
http://your-domain-name/<name-we-give>
Second thing we need is a database which we can create through the cpanel or through the shell .when creating the databse user throug the cpanel we need to create a database first and later a user and we need to give full permission to that user over that database. All this can be done through
cpanel>>Home>>Mysql databse …Or
by following commands in the shell .To do it through shell we need to get into our server/vps through ssh and run the following command.Normally the databases will be named as username_databasename . And user of that database as username_name.
mysql
CREATE USER USER_NAME IDENTIFIED BY PASSWORD
CREATE DATABASE DATABASE_NAME;
GRAND ALL ON DATABASE_NAME TO USER_NAME;
FLUSH PRIVILEGES;
EXIT;
GRANT ALL PRIVILEGES ON db_base.* TO db_user @'%' IDENTIFIED BY 'db_passwd';
Now go to browser and type “http://your-domain-name/” or “ http://your-domain-name/<name-we-give>” to get the auto install configuration file of the wordpress.There we will be asked for following and we need to fill in the needed details..Remember to give correct database name and user name leave the rest of options as it is
database: database_name
username:user_name
password:password
host:localhost:
and click next
If all things ends correctly it will be done and you will get the welcome page
First we need to download the tar file and we need to uncompress it in the needed directory .
cd /<path-to-document-root>/public_html
wget http://wordpress.org/latest.tar.gz
now decompress the file
tar -xvzf latest.tar.gz
change the privilage of the folder by
chmod -R 777 *
noramally to make it the main site we copy the tar file and extract the tar file in same public_html directroy so that it can be accessed like
http://your-domain-name
To make it a sub website first we need to make a direcotry with any name inside the public_html and untar the tar file into that it can be accessed by
http://your-domain-name/<name-we-give>
Second thing we need is a database which we can create through the cpanel or through the shell .when creating the databse user throug the cpanel we need to create a database first and later a user and we need to give full permission to that user over that database. All this can be done through
cpanel>>Home>>Mysql databse …Or
by following commands in the shell .To do it through shell we need to get into our server/vps through ssh and run the following command.Normally the databases will be named as username_databasename . And user of that database as username_name.
mysql
CREATE USER USER_NAME IDENTIFIED BY PASSWORD
CREATE DATABASE DATABASE_NAME;
GRAND ALL ON DATABASE_NAME TO USER_NAME;
FLUSH PRIVILEGES;
EXIT;
GRANT ALL PRIVILEGES ON db_base.* TO db_user @'%' IDENTIFIED BY 'db_passwd';
Now go to browser and type “http://your-domain-name/” or “ http://your-domain-name/<name-we-give>” to get the auto install configuration file of the wordpress.There we will be asked for following and we need to fill in the needed details..Remember to give correct database name and user name leave the rest of options as it is
database: database_name
username:user_name
password:password
host:localhost:
and click next
If all things ends correctly it will be done and you will get the welcome page
Wednesday, November 7, 2012
Creating the Cpanel account with WHM
Log into your WHMIn the left menu under "Account Functions", click "Create a New Account"
Fill in the details for the new account. Here's a brief outline of the settings you'll be putting in:
After you have filled in all of the details above, click the "Create" button at the bottom of the page.
Congratulations, you have just created a new cPanel account!
Fill in the details for the new account. Here's a brief outline of the settings you'll be putting in:
- Domain Information
- Enter the main domain name on the account, set a cPanel username and password for it, and then enter the email address to be associated with the account.
- Package
- WHM allows you to create packages, which make it easier to manage cPanel accounts. For Example, you may have a "Power Plan" package like InMotion Hosting offers. Within that package you could set limits such as the number of addon domains to associate to the account. If you don't have any packages set, select the "Select Options Manually" option and set those limitations now.
- Settings
- Choose the cPanel theme to assign the user (InMotion Hosting currently uses x3) and select the appropriate language for the user.
- Reseller Settings
- If you have the access to create a cPanel account, it means that you have reseller permissions. Decide here if this new account you're creating should have WHM access and be able to create accounts themselves.
- DNS Settings
- Decide how the domain's nameservers should be configured on the server. If the nameservers specified for this domain name are going to be on another server, choose the option "Use the nameservers specified at the Domain's Regsitrar"
- Mail Routing Settings
- Decide how the server handles email for this specific domain. For example, should it attempt to deliver the email locally or should it look at the external MX records and decide? It's recommended to use "Automatically Detect Configuration" if you're not sure about this setting
- .
After you have filled in all of the details above, click the "Create" button at the bottom of the page.
Congratulations, you have just created a new cPanel account!
Tuesday, November 6, 2012
Installing cPanel manually
In order to install cpanel/WHM on your VPS , you will need to log into your server as root first.
ssh root@server-ip
In above server-ip should be your server's ip. We should install cpanel/whm only in a fresh system ,configured with a proper yum or apt-get system .
From a windows machine we can use putty to log into the server ...
Minimum Requirements as per cpanel's original site
To obtain a list of
You should make sure these
To remove a
You should disable SELinux after installing Red Hat Enterprise Linux, CentOS, or CloudLinux. To disable SELinux, you can either:
If you disable SELinux from the command line, the contents of
If you are installing a CentOS, Red Hat Enterprise Linux, CloudLinux operating system, you should deactivate the default firewall and check for updates.
To deactivate the firewall, run the commands:
To check for updates, run the command:
change the hostname of the VPS to a valid hostname like "server.domain.com".
The installation of cPanel can take a long time and it is better if you install "screen". Depending on your operating system you can install screen running yum or apt-get (yum install screen or apt-get install screen).
Now you will want to download and install cPanel:
screen -S cpanel
cd /home
wget http://layer1.cpanel.net/latest
sh latest
ctrl -A-D ...to detach from screen
screen -ls will list the screens
If you get disconnected, you can ssh back into your server as root, and run:
screen -r cpanel
After everything is complete, and there are no errors, you should be able to access the WHM control panel by visiting
https://your_ip:2087
ssh root@server-ip
In above server-ip should be your server's ip. We should install cpanel/whm only in a fresh system ,configured with a proper yum or apt-get system .
From a windows machine we can use putty to log into the server ...
Minimum Requirements as per cpanel's original site
Processor | 266 MHz |
Memory | 512 MB RAM (1 GB recommended when hosting many accounts) |
Disk Space | 10 GB hard disk |
Removing YUM groups
To obtain a list of
yum
groups, run the command:yum grouplist
You should make sure these
yum
groups are not installed:- FTP Server
- GNOME Desktop Environment
- KDE (K Desktop Environment)
- Mail Server
- Mono
- Web Server
- X Window System
To remove a
yum
group, run the command yum groupremove
. For example, if you wish to remove Mono
and Mail Server
, enter:yum groupremove "Mono" "Mail Server"
Disabling SELinux security features
You should disable SELinux after installing Red Hat Enterprise Linux, CentOS, or CloudLinux. To disable SELinux, you can either:
- Use the graphical interface while configuring your operating system, or
- Edit
/etc/selinux/config
from the command line and set theSELINUX
parameter todisabled
using a text editor, such as nano or vi.
If you disable SELinux from the command line, the contents of
/etc/selinux/config
should resemble:# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
Deactivating default firewall and checking for updates
If you are installing a CentOS, Red Hat Enterprise Linux, CloudLinux operating system, you should deactivate the default firewall and check for updates.
To deactivate the firewall, run the commands:
chkconfig iptables off
service iptables stop
To check for updates, run the command:
yum update
change the hostname of the VPS to a valid hostname like "server.domain.com".
Installing cpanel
The installation of cPanel can take a long time and it is better if you install "screen". Depending on your operating system you can install screen running yum or apt-get (yum install screen or apt-get install screen).
Now you will want to download and install cPanel:
screen -S cpanel
cd /home
wget http://layer1.cpanel.net/latest
sh latest
ctrl -A-D ...to detach from screen
screen -ls will list the screens
If you get disconnected, you can ssh back into your server as root, and run:
screen -r cpanel
After everything is complete, and there are no errors, you should be able to access the WHM control panel by visiting
https://your_ip:2087
Friday, October 26, 2012
Kerberose authentication in rhel
Kerberose authentication
To use kerberose authentication we need to set up server with all the needed principle and their passwords.and we must configure the client to use the proper kerberpse server as needed.
Server Configuration
server:virtual19.virtual.com
IP:192.168.100.19
client:virtual21.virtual.com
IP:192.168.100.21
Packages needed are
yum install -y krb5-server
yum install -y krb5-libs
yum install -y readline-devel
vim /etc/krb5.conf
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
default_realm = VIRTUAL.COM
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
[realms]
VIRTUAL.COM = {
kdc = virtual19.virtual.com
admin_server = virtual19.virtual.com
}
[domain_realm]
virtual19.virtual.com = VIRTUAL.COM
virtual21.virtual.com = VIRTUAL.COM
[appdefault]
validate=true
vim /var/kerberos/krb5kdc/kdc.conf
[kdcdefaults]
kdc_ports = 88
kdc_tcp_ports = 88
[realms]
VIRTUAL.COM = {
master_key_type = aes256-cts
default_principle_flags = +preauth
acl_file = /var/kerberos/krb5kdc/kadm5.acl
dict_file = /usr/share/dict/words
admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab
supported_enctypes = aes256-cts:normal aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal
}
kdb5_util create -r VIRTUAL.COM -s
kadmin.local
kadmin: listprincs
kadmin: addprinc root/admin
kadmin: ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/admin
kadmin: ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/changepw
kadmin: addprinc -randkey host/virtual19.virtual.com
kadmin: ktadd -k /etc/krb5.keytab host/virtual19.virtual.com
vim /var/kerberos/krb5kdc/kadm5.acl
*/admin@VIRTUAL.COM *
service krb5kdc restart
chkconfig krb5kdc on
service kadmin restart
chkconfig kadmin on
----------------------------------------------------------
Client side configuration
----------------------------------------------------------
copy the /etc/krb5.conf from server to client
authconfig-tui
select the kerberised password authentication then they will ask for kdc and krb5 server and releam name to which we need to enter the correct entry .When closing the utils the system will configure itself for connection to kerberose server
Now we need to add that machine to kerberose server database
kadmin
kadmin: addprinc -randkey host/virtual21.virtual.com
kadmin: ktadd -k /etc/krb5.keytab host/virtual21.virtual.com
now the client machine is added to server and now the tickets will be issued as normal and to check that
klist to list the tickets got from server
-------------------------------------------------------------------.
Now adding nis user to kerberose
At server make a principle for the nis users and that is it
kadmin.local
kadmin: addprinc nisuser1
now will be prompted for kerberose password which at client will enable the user to login as user using kerberised security .
To use kerberose authentication we need to set up server with all the needed principle and their passwords.and we must configure the client to use the proper kerberpse server as needed.
Server Configuration
server:virtual19.virtual.com
IP:192.168.100.19
client:virtual21.virtual.com
IP:192.168.100.21
Packages needed are
yum install -y krb5-server
yum install -y krb5-libs
yum install -y readline-devel
vim /etc/krb5.conf
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
default_realm = VIRTUAL.COM
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
[realms]
VIRTUAL.COM = {
kdc = virtual19.virtual.com
admin_server = virtual19.virtual.com
}
[domain_realm]
virtual19.virtual.com = VIRTUAL.COM
virtual21.virtual.com = VIRTUAL.COM
[appdefault]
validate=true
vim /var/kerberos/krb5kdc/kdc.conf
[kdcdefaults]
kdc_ports = 88
kdc_tcp_ports = 88
[realms]
VIRTUAL.COM = {
master_key_type = aes256-cts
default_principle_flags = +preauth
acl_file = /var/kerberos/krb5kdc/kadm5.acl
dict_file = /usr/share/dict/words
admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab
supported_enctypes = aes256-cts:normal aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal
}
kdb5_util create -r VIRTUAL.COM -s
kadmin.local
kadmin: listprincs
kadmin: addprinc root/admin
kadmin: ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/admin
kadmin: ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/changepw
kadmin: addprinc -randkey host/virtual19.virtual.com
kadmin: ktadd -k /etc/krb5.keytab host/virtual19.virtual.com
vim /var/kerberos/krb5kdc/kadm5.acl
*/admin@VIRTUAL.COM *
service krb5kdc restart
chkconfig krb5kdc on
service kadmin restart
chkconfig kadmin on
----------------------------------------------------------
Client side configuration
----------------------------------------------------------
copy the /etc/krb5.conf from server to client
authconfig-tui
select the kerberised password authentication then they will ask for kdc and krb5 server and releam name to which we need to enter the correct entry .When closing the utils the system will configure itself for connection to kerberose server
Now we need to add that machine to kerberose server database
kadmin
kadmin: addprinc -randkey host/virtual21.virtual.com
kadmin: ktadd -k /etc/krb5.keytab host/virtual21.virtual.com
now the client machine is added to server and now the tickets will be issued as normal and to check that
klist to list the tickets got from server
-------------------------------------------------------------------.
Now adding nis user to kerberose
At server make a principle for the nis users and that is it
kadmin.local
kadmin: addprinc nisuser1
now will be prompted for kerberose password which at client will enable the user to login as user using kerberised security .
Subscribe to:
Posts (Atom)