The Years of Nostalgia

He-Man and The Masters of The Universe

I’m 31 years old. If you’re somehow like me, in your 30′s, there’s a big chance that we share some common memories of our childhood. The toys, the cartoons, the TV shows, the video games, stuff that most of us, as kids enjoyed and remember fondly to this day. Looking at today’s entertainment market it’s cool to see, that the ones that were kids on the 80′s and 90′s are now pulling the strings and resurrecting the stuff that made our dreams back then. Check this:

  • The Transformers – Huge cartoon on the 80′s as well as a huge line of toys. Now there’re two big motion pictures on the brand with a third one on the way, a cartoon series as well as two toy lines that were created for both movies and cartoon series.
  • V and Battlestar Galactica – Two of the most rememberable sci-fi TV shows from the 80′s are back with brand new shows (I know Galactica is over but it’s a good example).
  • He-Man and The Masters of The Universe – If you’re a kid back then you probably had a MOTU figure. It was that big! A new cartoon was made in 2003 along with a new toy line but it wasn’t so successful as the original. Now Mattel is creating a new line of figures just for collectors inspired in the classic line. Oh, and there’s a new movie being made!
  • Teenage Mutant Ninja Turtles – Another cartoon and toy line that were everywhere. The brand completes it’s 25th Anniversary this year and to celebrate they’re made a new animated movie named Turtles Forever, as well as a re-issue of the original action figures. A new cartoon was made in 2003 and a CGI movie in 2007 along with a toy line for both.
  • Fame – One of the biggest TV series back then was graced with a motion picture this year.
  • Video Games – Well, I’m not even starting a list here. Remakes from classic games are born every day. Retrogaming is really catching up among developers and it brings the opportunity to new players to play old games.

So, are we running out of ideas or are we just resurrecting our passions from the past? Are we that nostalgic or are we just trying to make old successful formulas work again?

My take is that it’s a little bit of both. What’s your’s?

Integrating Squid with Active Directory

Recently I needed to integrate a Squid Proxy server in an Active Directory environment. The main objective was to grant / deny access to the Internet by user / group validation, using single sign on.

The solution might not be the most elegant, but it’s a working one. You’ll need to install the Kerberos, Samba, Squid and NTP packages.

In this solution will be allowing all users in the InternetOn AD group to have access automatically. Any users outside this group will be denied access. Computers outside the AD trying to use the proxy will be prompt for username and password. This is a simple way of keeping access restricted to certain groups without an unnecessary amount of fuss, whether you’re managing the office computers at http://www.partycasino.com/ or building a school network.

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 = YOURDOMAIN
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
forwardable = yes
[realms]
YOURDOMAIN = {
kdc = yourpdc
admin_server = yourpdc
default_domain = YOURDOMAIN
kpasswd_server = yourpdc
}
[domain_realm]
.yourdomain = yourdomain
[kdc]
profile = /var/kerberos/krb5kdc/kdc.conf
[appdefaults]
pam = {
debug = false
ticket_lifetime = 36000
renew_lifetime = 36000
forwardable = true
krb4_convert = false
}

#####################################################

smb.conf

[global]
workgroup = YOURDOMAIN
server string = SQUIDPROXY (or any other name you want)
security = ADS
auth methods = winbind
encrypt passwords = yes
idmap uid = 70001-90000
winbind enum users = yes
winbind gid = 70001-90000
winbind enum groups = yes
client use spnego = yes
winbind separator = \\
load printers = yes
cups options = raw
log file = /var/log/samba/%m.log
max log size = 50
password server = yourpdcIP
realm = YOURDOMAIN
dns proxy = no
[homes]
comment = Home Directories
browseable = no
writable = yes

[printers]
comment = All Printers
path = /usr/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes

#####################################################

squid.conf

http_port 8080
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
hosts_file /etc/hosts
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
access_log /var/log/squid/access.log squid
emulate_httpd_log on
auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp
auth_param ntlm children 5
auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
external_acl_type ADS %LOGIN /usr/lib/squid/wbinfo_group.pl
acl interneton external ADS InternetOn

acl blocksites url_regex "/etc/squid/squid-block.acl"
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # waisacl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
acl AuthorizedUsers proxy_auth REQUIRED
http_access deny blocksites
http_access allow interneton
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
coredump_dir /var/spool/squid

#####################################################

Start samba, winbind and squid by this order.

Synchronize your squid server with the AD

ntpdate yourprimarydomaincontroller

Initialise Kerberos

kinit administrator@YOURDOMAIN

Test Kerberos connection

klist

Join Squid Server to AD

net ads join -S yourpdc -U administrator

Validate Trust

wbinfo -t

Validate if the wbinfo_group.pl script is working

echo "youralloweduser InternetOn" | /usr/lib/squid/wbinfo_group.pl -d
(it returns OK or ERR if the user is in the InternetOn group or not)

You might have some problems with the winbindd_privileged directory. If that’s the case:

cd /var/cache/samba
chgrp squid winbindd_privileged
chmod 750 winbindd_privileged

The problem with this setup is that when you change the InternetOn members, Samba / Winbind aren’t aware of the change until the cache clears, so I made a small script you can run in cron or manually.

clearcache.sh

#!/bin/bash
/etc/init.d/smb stop
/etc/init.d/winbind stop
rm -f /var/cache/samba/*.tdb
/etc/init.d/smb start
/etc/init.d/winbind start
/etc/init.d/squid reload

Test this at your own risk. :)

LAN IPs on Mail.app Email Headers

Dear Apple,

please explain why is my computer (added to not be mistaken with the router’s IP) LAN IP address showing on the email headers of the mails I send with Mail.app.

Thanks!

Bellow, in red, my computer’s private LAN IP Address. In green my Router’s Public/WAN IP address which is “normal” to be included on most email headers.

Return-Path: <rsaramago@gmail.com>
Received: from ?XX.XX.XX.XX? (pa6-XX-XX-XXX-XXX.netvisao.pt [XX.XX.XXX.XXX])
 by mx.google.com with ESMTPS id 7sm502355eyb.8.2009.11.13.01.07.07
 (version=TLSv1/SSLv3 cipher=RC4-MD5);
 Fri, 13 Nov 2009 01:07:08 -0800 (PST)
Subject: Teste
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: multipart/alternative; boundary=Apple-Mail-1-623152288
From: Ricardo Saramago <rsaramago@gmail.com>
To: Testy McTest <test@test.pt>
X-Mailer: Apple Mail (2.1077)

Update: I’ve clarified some descriptions above after some user comments, I realized that It wasn’t clear what IPs I was referring to.

It seems that this is common on most email clients, except for Outlook. This “issue” triggered my attention when I was looking into the mail headers from a mail I sent from Mail.app in response to a mail from Outlook and they were indeed different in this aspect.

The client’s computer Local IP address and the Router’s / Firewall / Modem / whatever public IP address are added by the SMTP Server to the Envelop’s “Received” line, which it probably gets from the EHLO.

Still, this isn’t secure as it allows malicious attackers to map a victims network very easy.

The Art of Community – Now Free

Jono Bacon has released his book “The Art of Community” under a Attribution-Noncommercial-Share Alike Creative Commons license, which means you can download and read it legally.

If you like it, follow the author’s advice:

  • Firstly, buying a copy sends a tremendous message to O’Reilly that they should continue to publish books (a) about community and (b) under a Creative Commons license.
  • Secondly, it will encourage O’Reilly to invest in a second edition of the book down the line, which will in turn mean that communities around the world will have a refreshed and updated edition that is available to them.
  • Thirdly, aside from the voting-with-your-feet side of things, it is just a really nice book to own in print. It is really well made, looks stunning and feels great to curl up with in a coffee shop or on the couch.

Via Pedro Custódio

The Blade Runner Fan

Blade Runner Still

I don’t recall exactly when I saw Blade Runner for the first time. I remeber seeing it when I was very young, on national television, with my mother, who by the way, introduced and exposed me to Sci-Fi at an early age.

Years passed until I watched Blade Runner again, I was 19 and this time it was the Director’s Cut on DVD, one of the first I bought. Watching this movie at this age is something of a life changing event, you have a different sensibility, understanding and maturity which is indeed needed to appreciate a movie like Blade Runner. I have friends that until this day don’t understand the greatness of Ridley’s masterpiece.

I became a fan, of the movie, of the wonderful Vangelis soundtrack (which btw I’m listening right as I write this), of all that derranged world / universe and necessary darkness needed to make it work. I read Philip k. Dick’s book that was the source for the adaptation “Do Androids Dream of Electric Sheep?” and even got the excellent Blade Runner game from Westwood.

Blade Runner is a 27 year old movie, but it still manages to be up to date, which is incredible. In todays movie industry, movies are made like fast food, ready to be consumed and disposed of. But BR is more than a sci-fi flick, for me, Ridley’s Blade Runner (along with Gibson’s Neuromancer) defined the concept of Cyberpunk in perfection and set grounds for a whole generation of sci-fi works.

The latest iteration of Blade Runner is the Final Cut, which it’s the only of the 7 BR versions that Ridley Scott had complete artistic control. This is also known as the “25th Year Anniversary Edition” since it was released to celebrate BR’s anniversary. This is probably the most common edition to be found on stores, and it’s one of the best to watch. The image and sound has been remastered and there’s a Full HD version on Bluray. Still, if you really want a crash course on Blade Runner, get the 5 Disc Collector’s edition with the Final Cut, the 1982 Theatrical Version, the 1982 International Version and the 1992 Director’s Cut. This pack also includes the excellent documentary Dangerous Days which tells the compelling and controversy story of the movie’s production. Amazon.com has it for $21.99 and it’s region free, meaning you can watch it everywhere, and while you’re at it, get the 25 Year Anniversary Soundtrack, you won’t be disappointed.

I’ve seen things you people wouldn’t believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser gate. All those moments will be lost in time, like tears in rain. Time to die.

Asus EEE PC 1008 HA SeaShell

Asus EEE PC 1008HA

Until a few weeks ago, the netbook market / scene was a bit of a unknown thing to me. I lacked the information mainly because I was never attracted to small notebooks and netbooks felt into that “class”.

What made me change my mind? Well, my wife often mentioned she would like to have a smaller notebook than her 15.4″ Dell to take to school. That and a trip we made this vacation :) I needed to take a computer and my 17″ Macbook Pro was out of the question since I would need it to check maps, info and e-mail on the go. So, a few days before this trip we went to take a look on the local Vobis / Worten and evaluated the offer.

The Asus EEE PC 1008HA was indeed the most balanced of them all, taking in perspective what we both needed: a light netbook. I was still split between the Asus and an Aspire One, but the Asus had Wifi N and a bigger hard drive, not to mention the screen quality that is amazing.

But enought chit chat, here’s my take and notes on the Asus 1008HA:

Pros

  • Very light, only weights 1.1 Kg
  • Stylish design, similar to a MacBook Air
  • 160Gb HD
  • WiFi Draft N and Bluetooth v2.1
  • Functional Keyboard
  • Multitouch Touchpad
  • 6 hours unplugged computing with Super Hybrid Engine (Asus’s energy managment app)

Cons

  • Plastic sheel feels cheap and fragile in some areas
  • Windows XP bundle
  • Non Removable Battery
  • No easy access to RAM and HD
  • 1.1 Mpixel Webcam has a crappy framerate

The Netbook behaved very well on the go, the battery time is amazing and it seems to last forever, and it’s a good thing because there’s no way to use a second battery. Due to the Seashell design, Asus limited all the expansion on the machine. The battery is not user removable neither is the RAM or HD. To replace these three components you need to disassemble the machine.

One of my frustrations was that there was no bundle with Linux, Asus seems to be kissing Microsoft’s ass again with Netbooks, so the first thing I did after getting home from the trip was to try to find a decent operating system for the Netbook. The candidates were:

  1. Windows 7
  2. Fedora 11
  3. Jolicloud
  4. Ubuntu Netbook Remix

Windows 7 installed very well, the only problem I had was with the ACPI and graphics card. Flashing the 1008HA with the latest bios solved the latest problem, and the other one was solved with a hacked ACPI driver I found on the web. There are still no Asus drivers for Windows 7 but the ones the system installs work rather well. The problem with 7 is that with a default configuration it ran slower than XP, consuming a hefty 450Mb of RAM without no other application loaded. Oh and it was slow as hell to boot. So, on to the next.

Fedora 11 looked beautiful for the first 5 minutes. It all seemed to work out of the box, even wireless and it booted rather fast from the CD I was using. One of the first problems I noticed was that the it wasn’t optimized for netbooks, Gnome dialog boxes were huge and often the OK / Cancel buttons were offscreen. When I tried to install it to the hard drive it failed afer creating the partitions and exited the installation program, leaving me with a damaged installation. I might try it another time but for now… next!

I was very eager to try Jolicloud but the alpha is still invitation only, and since no one on the Interwebs was kind enought to send me an invite, I only managed to try the OS without the cloud part… It seemed like a heavily modified Ubuntu Netbook Remix. It worked very well out of the box and the eye candy is very cool. Sadly for me the most interesting part of this system is the cloud… so, on to the next one.

Enter Ubuntu Netbook Remix, a netbook oriented Ubuntu, which seems to be the most common base of a boatload of netbook linux distros. I installed UNR 9.04 and guess what? Wireless and Ethernet didn’t work. It was Google time and I finally found this guy’s post on the 1008HA and exactly the same problem I had. Three commands and a reboot and Networking is back, my luck is that I also had an USB Ethernet adpter that UNR immediately recognized. After taking it for a quick spin, it seems I found a suitable OS for this netbook.

Of couse I’m not stoping here, as I’m writing this I’m installing UNR 9.10 Alpha to check if there are some significant improvements over 9.04. After that I’ll probably try another 2 or 3 distros, but I think it will be hard to surpass UNR 9.04. Unfortunately not everything works with UNR as well as it works with Windows XP, since there are no Asus drivers for Linux either. So don’t count with some keyboard combos and the Super Hybrid Engine on Linux, at least for now.

Ending this loooong post: The more I play with this netbook the more I wish that Apple would release a netbook or a smaller version of the Air (still I wouldn’t mind having an Air). I think that once you go Mac it’s hard to look back.

Notes

To get wireless working on UNR 9.04:

sudo apt-get update

Reboot

then:

sudo apt-get upgrade

Reboot

sudo apt-get install linux-backports-modules-jaunty

Reboot only needed after modules installation. (Thanks Tiago!)