Category Archives: Linux

Canon LBP6650 under Ubuntu 11.04

Canon provide Debian Packages to install the driver under ubuntu for download. Offical supported is only the previous version 10.04 of ubuntu. Extracting the zip file you will find under

<language>/32-bit_Driver/Debian

the deb packages. First thing to install is cndrvcups-common_2.20-l_i386.deb with dpkg -i <deb file>. The problem is that ubuntu 11.04 doesn’t contain the required gs-esp package.

Workaround is to download and install it with

dpgk -i gs-esp_9.01~dfsg~svn12047-0ubuntu1_all.deb

After that you can install the common canon driver and afterwards the ufr driver:

dpgk -i cndrvcups-common_2.20-1_i386.deb dpgk -i cndrvcups-ufr2-uk_2.20-1_i386.deb

Now you can open the driver setup application and click on the add button. Choose network printer, enter the ip of your canon printer and click on examine. Select from the list below Canon and click on next. Select “LBP6650” and click on next. Confirm dialog with use button. Test your configuration with printing a test page.

Printing via SMB from Ubuntu 10.04 to Windows 7

I have successfully installed Ubuntu 10.04 Beta 1 on my Samsung NC10 with dual boot side by side to windows XP Home. The installation process is very smart and allow you to import settings like desktop background from the installed windows xp home. Printer configuration was a bit complicated. The first thing is to change the workgroup definition in

/etc/samba/smb.conf

workgroup = XYZ

Change XYZ to your windows 7 workgroup name. Next step is to uninstall the “Windows Live Sign-In Assistant” under windows 7 which is the main cause why the windows shares like the printers are not available from ubuntu. After that go to menu item System => administration => Printer. Click on add button and select from the list under network printer the last entry “windows printer via SAMBA”. When you now click on browse will be your workgroup and below your windows 7 pc with the printer shares be available.

Tomcat 6 Problems on Ubuntu 9.10

The default behavior of the tomcat6 server installed from the ubuntu repository is to forbid any read operation of System.getProperty(). I used tomcat6 as deployment target for the hudson builds on the same machine. AspectJ is used in a sample Spring 3 REST application. Tomcat6 logs (catalina-…log) shows the following exception

Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.aspectj.tracing.debug read)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
        at java.security.AccessController.checkPermission(AccessController.java:546)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
        at java.lang.System.getProperty(System.java:686)
        at org.aspectj.weaver.tools.TraceFactory.getBoolean(TraceFactory.java:34)
        at org.aspectj.weaver.tools.TraceFactory.(TraceFactory.java:21)
        ... 68 more

Updating aspectj in the maven pom to the latest version 1.6.8 doesn’t solve
the problem. The same war file works under windows with tomcat 6.0.24 without any problems. An Forum entry shows the right hint. Inside the init script
/etc/init.d/tomcat6 is default TOMCAT_SECURITY set to true, which forces the /etc/tomcat6/policy.d/* policies to be used in every web
application inside tomcat.

# Use the Java security manager? (yes/no)
TOMCAT6_SECURITY=yes

So the solution can be quick (set the TOMCAT_SECURITY property inside the init script to no) or a bit more complicated (set a new policy for your web application as new file inside the policy.d folder). The problem with the more complicated one is that you need to know every security relevant operation to write the policy file).

Chrome OS 0.4.237 beta under vmware server 2.x

A beta version of Chrome OS is available as VMX/VMDK image for vmware or virtualbox and live cd. Chrome OS is a OpenSuSe based operating system around the Google Chrome browser.

Steps to test VM image of chrome os beta

  1. Download VMDK image
  2. Extract tar.gz File to standard folder of vmware
  3. Start vmware server
  4. Choose from “Virtual machine” menu “add Virtual machine to inventory”
  5. Choose VMX file inside extracted image of chrome os
  6. Upgrade Virtual machine to newest “hardware” by choosing link on right side from the vm summary page
  7. Remove Network Connection from VM and Add new one with “Add Hardware” and type “Network Adapter” with “Nat” mode
  8. Boot VM and cornfirm warning about IDE geometry and scsi controller
  9. Click on “Make Goggle chrome default browser” and confirm dialog
  10. Click on computer button (down left side) and click under status on network connection
  11. Enter root password: root
  12. confirm warning about network manager with ok
  13. Choose under “Global Options” network setup method “traditional method with ifup”
  14. Go to “Overview” tab and click on “edit” button below
  15. click on “next” button
  16. go back to “global options” and change back to “user controlled with networkmanager”
  17. Reboot machine by clicking on computer and shutdown with type reboot
  18. After reboot you can surf with google chrome without any problem

chrome_os

Howto setup a OpenLDAP Server for Ubuntu 8.10

Most enterprises use LDAP as interface to their company structure database. In the Microsoft world is Active Directory the implementation for LDAP. Under Linux is OpenLDAP the common choice for admins. Such LDAP directories are tree based. OpenLDAP is the reference implementation for LDAP v3.

The JNDI API inside the Java SDK is usable as implementation to access such LDAP directories. With Spring LDAP is more sophisticated API available.

My first code sample works in the company against their OpenLDAP server. For security reasons is the access not possible from outside. So my JUNIT Tests was code red after running in my homeoffice. Maven standard is to run all test prior to build a package like a J2EE war or ear file. So i decided to setup a OpenLDAP server inside my ubuntu 8.10 server vmware server vm.

First step is to retrieve and install the openldap package as root:

  • sudo su –
  • apt-get install slapd ldap-utils nmap php5-ldap db4.2-util

You have to set a password during installation for the OpenLDAP server. Keep that in mind!
Now run the configuration assistant:

  • dpkg-reconfigure slapd

Wizard steps:

  1. omit openldap server configuration? – no
  2. dns domain name? vm.example.org
  3. organization name? myCompany
  4. database backend to use? hdb
  5. do you want the database to be removed when slapd is purged? yes
  6. may be the question: move old database? yes
  7. administrator password? the same one as entered during installation
  8. confirm password? see last step
  9. allow LDAPv2 protocol? no

Now edit the /etc/ldap/ldap.conf file for the client side configuration:

ldap_version 3
URI ldap://localhost:389
SIZELIMIT 0
TIMELIMIT 0
DEREF never
BASE dc=vm,dc=example, dc=org

With the command “ldapsearch -x” you should see the following output:

# extended LDIF
#
# LDAPv3
# base  (default) with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# vm.example.org
dn: dc=vm,dc=example,dc=org
objectClass: top
objectClass: dcObject
objectClass: organization
o: myCompany
dc: vm

# admin, vm.example.org
dn: cn=admin,dc=vm,dc=example,dc=org
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator

# search result
search: 2
result: 0 Success

# numResponses: 3
# numEntries: 2

For easier admininstration exist a php admin ui called phpldapadmin and can be installed with:

  • apt-get install phpldapadmin
  • ln -s /usr/share/phpldapadmin/ /var/www/phpldapadmin

Open now the config file /etc/phpldapadmin/config.php with joe (a editor) and change the line with the ldap node info to:


/* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin
   auto-detect it for you. */
$ldapservers->SetValue($i,'server','base',array('dc=vm,dc=example,dc=org'));
...
$ldapservers->SetValue($i,'login','dn','cn=admin,dc=vm,dc=example,dc=org');

Check your PHP5 memory settings in /etc/php5/apache2/php.ini:

memory_limit = 64M      ; Maximum amount of memory a script may consume (16MB)

Restart the apache to use this changed configuration

  • /etc/init.d/apache2 restart

and go to:

http://your.vm.ip/phpldapadmin

Click on the login link on the left side and enter as “login dn”:

  • cn=admin,dc=vm,dc=example,dc=org

and your password in mind. First step is now to enter a “organisational unit”:

  • click on the left side on the link beside the world icon “dc=vm…”
  • click on “create a child entry here”
  • choose “organisational unit” as template
  • enter “people” and click on “create object”
  • click on this new orginsational unit people in the tree
  • click on “create a child entry here”
  • choose “Address Book Entry (mozillaOrgPerson)” as template
  • enter “John” as “first name”
  • enter “Doe” as “last name”
  • go to common name (cn) and enter “John Doe”
  • click on “create object”

Now check with “ldapsearch -x” if everything is ok:

# extended LDIF
#
# LDAPv3
# base  (default) with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# vm.example.org
dn: dc=vm,dc=example,dc=org
objectClass: top
objectClass: dcObject
objectClass: organization
o: myCompany
dc: vm

# admin, vm.example.org
dn: cn=admin,dc=vm,dc=example,dc=org
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator

# people, vm.example.org
dn: ou=people,dc=vm,dc=example,dc=org
objectClass: organizationalUnit
objectClass: top
ou: people

# John Doe, people, vm.example.org
dn: cn=John Doe,ou=people,dc=vm,dc=example,dc=org
objectClass: inetOrgPerson
objectClass: top
givenName: John
sn: Doe
cn: John Doe

# search result
search: 2
result: 0 Success

# numResponses: 5
# numEntries: 4

Your LDAP server is now running and you can easily configure it inside your favorite browser

LDAP Tree