Latest Entries »

Exim4 does not transfer mails to the root user by default. If you’re trying to test Exim4 by sending an email to the root user, it will never be delivered to root user.That’s a default configuration from Debian. Instead, all emails for root user are transferred to /var/mail/mail.
Here is where it is configured :

root@localhost:~# cat /etc/exim4/conf.d/router/mmm_mail4root

### router/mmm_mail4root
#################################
# deliver mail addressed to root to /var/mail/mail as user mail:mail
# if it was not redirected in /etc/aliases or by other means
# Exim cannot deliver as root since 4.24 (FIXED_NEVER_USERS)

mail4root:
  debug_print = “R: mail4root for $local_part@$domain”
  driver = redirect
  domains = +local_domains
  data = /var/mail/mail
  file_transport = address_file
  local_parts = root
  user = mail
  group = mail
If you need to redirect emails to root, then add the right user in /etc/aliases at line where root word stands. Then run the command newaliases to take this change into account. Send a test email to root and log in to the user you’ve just configured and check its email box with the mail command. You should be able to read the email you’ve just sent a few seconds before.

There are two possible ways to install VMware tools on Linux servers. Either you install them through the VSphere client, either you can automate this task with Puppet. VMware has provided special repositories for all the Linux distribution flavors :  VMware Operating System Specific Packages (OSPs)

Here are the main steps to complete this installation :

->Download the public keys of the VMware OSPs repositories :

rpm –import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub

rpm –import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub

->Add a  new repo for YUM in /etc/yum.repos.d/ :

cat /etc/yum.repos.d/vmware-tools.repo
[vmware-tools]
name=VMware Tools
baseurl=http://packages.vmware.com/tools/esx/5.1/rhel6/x86_64
enabled=1
gpgcheck=1

->Fetch the metapackage vmware-tools-esx-nox and it will install all the required dependencies.

Here is now an example of a working Puppet manifest to deploy and install the VMware Tools on Linux servers running RHEL 6.4  :

cat vmwaretools.pp

class vmwaretools {
        exec { “Fetching RSA key”:
        command => “rpm –import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub”,
        path => “/sbin:/bin”
        }

        exec { “Fetching DSA key”:
        command => “rpm –import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub”,
        path => “/sbin:/bin”
        }

        exec { “Setting VMWare yum repo” :
        command => “echo -e \”[vmware-tools]\nname=VMware Tools\nbaseurl=http://packages.vmware.com/tools/esx/5.1/rhel6/x86_64\nenabled=1\ngpgcheck=1\” > /etc/yum.repos.d/vmware-tools.repo”,
        path => “/sbin:/bin”
        }

        package { “vmware-tools-esx-nox”:
          ensure => “installed”
        }
}

Do not forget to reload the puppetmaster on the server where it is located :

service puppetmaster reload

More information about VMware OSPs repositories : Read more

If you are running several namebased SSL VirtualHosts with mod_GnuTLS, you need to provide the adequate intermediate certificate to check that your SSL certificates chains are valid. With mod_GnuTLS, it is quite tricky to set it up. You do not have any options. The only way to make it work is to do as follow :

For a Debian-based distro :

root@localhost:~# cd /etc/ssl/certs

root@localhost:~#cat your_SSL_intermediate_certificate_provider.pem your_ssl_website_certificate.crt > your_new_ssl_certificate.crt

In the Apache config file for your SSL website, add the following line :

GnuTLSCertificateFile /etc/ssl/certs/your_new_ssl_certificat_site.crt

root@localhost:~#/etc/init.d/apache2 reload

More infos about GnuTLS

Some webradios provide mono stream while listening online.

To emulate a stereo stream, you just have to add some options to mplayer.

For instance :

[fool@localhost:~]$ mplayer  -af extrastereo=0,volume=5 -vo null -playlist mms://*

For more information about these options in MPlayer :


Tweaking audio channels with mplayer

 

 

 

If you want the home directory of a user to be created at the first login, you probably use the PAM’s module pam_oddjob_mkhomedir to do that job. This operation is done for users not locally registered on the server.

You may have encounter this error after trying to log in for the first time. The authentication has worked well but the user does not have its own home directory.

org.freedesktop.DBus.Error.ServiceUnknown: The name com.redhat.oddjob_mkhomedir was not provided by any .service files
Could not chdir to home directory /home/CONCUR/$USER: No such file or directory

This is because a service called oddjobd,  is not started on your server.

root@localhost:~#service oddjobd start

Make sure that this service will be available at boot time.

root@localhost:~#chkconfig –level 2345 oddjobd on

Some web-based management tools use Java applets to perform configuration tasks. Within Debian Squeeze, you have two JRE available : openjdk-6-jre and sun-java6-jre. Concerning web browsers, two kinds of Java plug-ins can be installed : the official Oracle Java plug-in from the sun-java6-plugin package and the alternative Icedtea plug-in  from the icedtea6-plugin package.

The Oracle Java Plug-in is better suited for its integration within web browsers. To install it :

root@localhost:~#apt-get install sun-java6-plugin

To use one implementation of Java (either OpenJDK or Oracle java), make sure that your environment is properly configured. update-java-alternatives (utility from the java-common package) can be used for this purpose.

To list the existing Java environments :

root@localhost:~# update-java-alternatives -l
java-6-openjdk 1061 /usr/lib/jvm/java-6-openjdk
java-6-sun 63 /usr/lib/jvm/java-6-sun

To force the use of one given environment :

root@localhost:~#update-java-alternatives -s java-6-sun

To make sure that your installed applications only use the Oracle Java 6, check the output of update-alternatives -l . You should have the following output :

root@localhost:~#update-alternatives -l |grep java

update-alternatives –get-selections |grep java
appletviewer                   manual   /usr/lib/jvm/java-6-sun/bin/appletviewer
apt                            manual   /usr/lib/jvm/java-6-sun/bin/apt
ControlPanel                   manual   /usr/lib/jvm/java-6-sun/jre/bin/ControlPanel
extcheck                       manual   /usr/lib/jvm/java-6-sun/bin/extcheck
firefox-javaplugin.so          manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so
HtmlConverter                  manual   /usr/lib/jvm/java-6-sun/bin/HtmlConverter
iceape-javaplugin.so           manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so
iceweasel-javaplugin.so        manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so
idlj                           manual   /usr/lib/jvm/java-6-sun/bin/idlj
jar                            manual   /usr/lib/jvm/java-6-sun/bin/jar
jarsigner                      manual   /usr/lib/jvm/java-6-sun/bin/jarsigner
java                           manual   /usr/lib/jvm/java-6-sun/jre/bin/java
javac                          manual   /usr/lib/jvm/java-6-sun/bin/javac
javadoc                        manual   /usr/lib/jvm/java-6-sun/bin/javadoc
javah                          manual   /usr/lib/jvm/java-6-sun/bin/javah
javap                          manual   /usr/lib/jvm/java-6-sun/bin/javap
java_vm                        manual   /usr/lib/jvm/java-6-sun/jre/bin/java_vm
javaws                         manual   /usr/lib/jvm/java-6-sun/jre/bin/javaws
jconsole                       manual   /usr/lib/jvm/java-6-sun/bin/jconsole
jcontrol                       manual   /usr/lib/jvm/java-6-sun/jre/bin/jcontrol
jdb                            manual   /usr/lib/jvm/java-6-sun/bin/jdb
jexec                          manual   /usr/lib/jvm/java-6-sun/jre/lib/jexec
jhat                           manual   /usr/lib/jvm/java-6-sun/bin/jhat
jinfo                          manual   /usr/lib/jvm/java-6-sun/bin/jinfo
jmap                           manual   /usr/lib/jvm/java-6-sun/bin/jmap
jps                            manual   /usr/lib/jvm/java-6-sun/bin/jps
jrunscript                     manual   /usr/lib/jvm/java-6-sun/bin/jrunscript
jsadebugd                      manual   /usr/lib/jvm/java-6-sun/bin/jsadebugd
jstack                         manual   /usr/lib/jvm/java-6-sun/bin/jstack
jstat                          manual   /usr/lib/jvm/java-6-sun/bin/jstat
jstatd                         manual   /usr/lib/jvm/java-6-sun/bin/jstatd
keytool                        manual   /usr/lib/jvm/java-6-sun/jre/bin/keytool
midbrowser-javaplugin.so       manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so
mozilla-javaplugin.so          manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so
native2ascii                   manual   /usr/lib/jvm/java-6-sun/bin/native2ascii
orbd                           manual   /usr/lib/jvm/java-6-sun/jre/bin/orbd
pack200                        manual   /usr/lib/jvm/java-6-sun/jre/bin/pack200
pluginappletviewer             auto     /usr/lib/jvm/java-6-openjdk/jre/bin/pluginappletviewer
policytool                     manual   /usr/lib/jvm/java-6-sun/jre/bin/policytool
rmic                           manual   /usr/lib/jvm/java-6-sun/bin/rmic
rmid                           manual   /usr/lib/jvm/java-6-sun/jre/bin/rmid
rmiregistry                    manual   /usr/lib/jvm/java-6-sun/jre/bin/rmiregistry
schemagen                      manual   /usr/lib/jvm/java-6-sun/bin/schemagen
serialver                      manual   /usr/lib/jvm/java-6-sun/bin/serialver
servertool                     manual   /usr/lib/jvm/java-6-sun/jre/bin/servertool
tnameserv                      manual   /usr/lib/jvm/java-6-sun/jre/bin/tnameserv
unpack200                      manual   /usr/lib/jvm/java-6-sun/jre/bin/unpack200
wsgen                          manual   /usr/lib/jvm/java-6-sun/bin/wsgen
wsimport                       manual   /usr/lib/jvm/java-6-sun/bin/wsimport
xjc                            manual   /usr/lib/jvm/java-6-sun/bin/xjc
xulrunner-1.9-javaplugin.so    manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so
xulrunner-javaplugin.so        manual   /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so

For Iceweasel,you can check that your Java plug-in is configured by typing about:plugins in the address bar.

After installing RHEL6.3 on a server, the next step is to register your server as a new asset in your local inventory (in Satellite for instance) or at https://access.redhat.com

Registering and giving the right subscriptions to your server can be done with subscription-manager command line utility. If you want to do the both steps in one time, just type :

root@localhost:~#subscription-manager register –autosubscribe

If you want to know the registration and subscription state of your server :

root@localhost:~# subscription-manager list

You may have the following output :

+——————————————-+
Installed Product Status
+——————————————-+
Product Name:             Red Hat Enterprise Linux Server
Product ID:               69
Version:                  6.3
Arch:                     x86_64
Status:                   Not Subscribed           
Starts:
Expires:  

In the web console, you may have the following message looking at your server’s page :

Status  : “System is not properly subscribed”

For the moment, the only workaround found to change this state and make your server properly subscribed is to look at the pool id of one of your subscriptions for an already declared server. (Both servers must be similar in terms of subscriptions).

root@localhost:~#subscription-manager list –available |grep -A3 -w ‘Red Hat Enterprise Linux Server’
Product Name:             Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up
                        to 1 guest) with Smart Management
Product Id:               RH0184831                
Pool Id:                  8a85f984356102f801356202921d190b

Product Name:             Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up
                        to 1 guest) with Smart Management
Product Id:               RH0184831RN              
Pool Id:                  8a85f984356102f80135620294061945

Product Name:             Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up
                        to 1 guest) with Smart Management
Product Id:               RH0184831RN              
Pool Id:                  8a85f984356102f801356202a51b1952

And now, for the server in error, just manually add a subscription to it :

root@localhost:~#subscription-manager subscribe –pool=your_chosen_pool_id

To check after this fresh modification :

root@localhost:~#subscription-manager list
+——————————————-+
Installed Product Status
+——————————————-+
Product Name:             Red Hat Enterprise Linux Server
Product ID:               69
Version:                  6.3
Arch:                     x86_64                   
Status:                   Subscribed               
Starts:                   12/15/11
Expires:                  07/27/13 

 

 

 

If you have to join a Linux server to a Windows domain managed by Active Directory and add this server into a defined OU, here is what you have to type : (Supposing your Samba version is later than 3.0.23)

root@your_server:#  net ads join -U admin_account@YOUR_COMPANY.ORG createcomputer=”/Computers/Servers/Your_office”

following this  : “OU=Your_office,OU=Servers,OU=Computers,DC=YOUR_COMPANY,DC=ORG”

where admin_account is the login name of a Windows administrator part of the “YOUR_COMPANY.ORG” domain with enough privileges. Pay attention to createcomputer option and its syntax.

Network configuration under RHEL 6 has slightly changed. No configuration found if you perform an minimum installation.Networking is managed with NetworkManager by default. On a server, using GUI tools is best to avoid when possible.

To make your networking work out of the box, some changes are needed in a few files.
To make the network interface to configure available with the right information, add any changes in /etc/sysconfig/networking-scripts/ifcfg-eth0. This file should contain at least the following lines :

DEVICE=eth0
HWADDR=MAC_ADDRESS
IPADDR=IP address server
NETMASK= its netmask
BROADCAST= its broadcast
BOOTPROTO=static
ONBOOT=yes
NM_CONTROLLED=no

NM_CONTROLLED set to no just tells the system not to use NetworkManager as default networking management tool.

Next step, add the following information in /etc/sysconfig/network :

NETWORKING=yes
GATEWAY= default gateway for the server
HOSTNAME=FQDN of the server

Do not forget to populate /etc/hosts file with localhost, your server’s IP address, its FQDN and aliases

Add the IP addresses of your DNS servers in /etc/resolv.conf :

cat /etc/resolv.conf

search your_domain
nameserver DNS_server1_IP_Address
nameserver DNS_server2_IP_Address

After any changes on the networking configuration, restart the related service :

root@localhost:~#service restart network

To check that the requested network interfaces are up and well configured, check their status :

root@localhost: ~#service status network

If you need to add more parameters to the configuration files above, have a look at this document available on your server :

cat /usr/share/doc/initscripts-9.03.31/sysconfig.txt

Follow

Get every new post delivered to your Inbox.