Archive for December, 2013

Log files are full of “pam_loginuid(crond:session)”

The /var/log/secure file is full of the following lines:

Dec 16 06:12:01 dev crond[10012]: pam_loginuid(crond:session): set_loginuid failed opening loginuid
Dec 16 07:00:01 dev crond[10891]: pam_loginuid(crond:session): set_loginuid failed opening loginuid
Dec 16 07:12:01 dev crond[11133]: pam_loginuid(crond:session): set_loginuid failed opening loginuid
Dec 16 08:00:01 dev crond[12014]: pam_loginuid(crond:session): set_loginuid failed opening loginuid
Dec 16 08:12:01 dev crond[12227]: pam_loginuid(crond:session): set_loginuid failed opening loginuid
Dec 16 09:00:01 dev crond[13136]: pam_loginuid(crond:session): set_loginuid failed opening loginuid
Dec 16 09:12:01 dev crond[13349]: pam_loginuid(crond:session): set_loginuid failed opening loginuid
Dec 16 10:00:01 dev crond[14240]: pam_loginuid(crond:session): set_loginuid failed opening loginuid

We can stop this from happening by editing the following file:

# vi /etc/pam.d/crond

And commenting out the following line:

#
# The PAM configuration file for the cron daemon
#
auth       sufficient pam_env.so
auth       required   pam_rootok.so
auth       include    system-auth
account    required   pam_access.so
account    include    system-auth
#session    required   pam_loginuid.so
session    include    system-auth

Constructing a custom Google Map

For the EWEA 2014 venue map, we implemented a custom Google Map.
The settings we made were to the map position. marker position, marker type and info box:

<html>
<head>
<style type="text/css">
html, body {margin: 0; padding: 0; height: 100%;}
#infoContents         {color: #000; font-family: "Franklin Gothic Medium", sans-serif; font-size: 13px; min-width: 150px; min-height: 100px; padding: 0 20px 0 20px;}
#infoContents h4      {padding: 0; margin: 1em 0 0.5em 0; color: #005596;}
#infoContents p       {margin: 0; padding: 0;}
#infoContents small   {margin: 10px 0 0 0; display: block;}
#infoContents small a {font-size: 10px; font-family: "Franklin Gothic Medium", sans-serif; color: #005596;}
</style>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var map;
var spot = new google.maps.LatLng(41.354867,2.138019);
var mapCenter = new google.maps.LatLng(41.355600,2.138019);
var mapOptions = { center: mapCenter, zoom: 17, mapTypeId: google.maps.MapTypeId.SATELLITE };

function initialize() {
    map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
    var iconShadow = new google.maps.MarkerImage(
        "http://www.google.com/mapfiles/ms/micons/msmarker.shadow.png",
        new google.maps.Size(59,32),
        new google.maps.Point(0,0),
        new google.maps.Point(15,32));

    var marker = new google.maps.Marker({
        map: map,
        position: spot,
        icon: "http://www.google.com/mapfiles/markerA.png",
        shadow: iconShadow
    });

    var infowindow = new google.maps.InfoWindow({
        content: '<div id="infoContents"><h4>NORTH ENTRANCE</h4><p>Fira de Barcelona Gran Via<br />Carrer del Foc 31<br />08038 Barcelona, Spain<br /><small><a href="http://goo.gl/maps/GIytH" target="_blank">Go to street view</a></small></p></div>'
    });

    infowindow.open(map, marker);
}

google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map_canvas" style="width: 740px; height: 400px;"></div>
</body>
</html>

This gives a result like this:
GoogleMap