Appendix A. Integration of Other Linux Distributions into Skolelinux/Debian-edu with ldap and autofs

These are some short notes, I'll use Ubuntu 5.10 and plain Debian Sarge as examples.

The server is based on Skolelinux/debian-edu pr05, which is Sarge based. First on the Ubuntu machine, you must enable the universe package repository, by adding/uncommenting these lines to your /etc/apt/sources.list


deb http://no.archive.ubuntu.com/ubuntu breezy universe
deb http://security.ubuntu.com/ubuntu breezy-security universe
Then do your apt-get update You need some packages installed on Ubuntu for all this to work:

apt-get install autofs-ldap ldap-utils libldap2 libnss-ldap libpam-ldap nscd nfs-common

Also install ssh, as that is very handy to have installed, and Ubuntu doesn't install it as default:

apt-get install ssh

Just press [Enter] and accept whatever default you are presented with regarding ldap and so on, we will take care of the configuration files later. From a Skolelinux/Debian-edu (in this case based on pr05) workstation take the following files/directories:

There might be files included here, that is not necessary for making ldap/autofs work, someone should comment on that, please. For those without a Skolelinux/debian-edu workstation, I've uploaded these files to
http://www.skolelinux.no/~klaus/skolelinux.ldap.autofs.tgz You should also take a backup copy of these files on your Ubuntu machine, before installing these files from Skolelinux/Debian-edu: this is a handy way of doing that:( \ means one long line)

tar zcvf Ubuntu.ldap.autofs.backup.tgz \
/etc/pam.d       	\
/etc/nsswitch.conf  	\
/etc/libnss-ldap.conf 	\ 
/etc/nscd.conf 		\
/etc/default/autofs  	\
/etc/init.d/autofs 	\
/etc/ldap 		\
/etc/pam_ldap.conf 	\
/etc/auto.master
It's almost the same way for copying these files from the Skolelinux/Debian-edu machine:( \ means one long line)

tar zcvf skolelinux.ldap.autofs.tgz \
/etc/pam.d 		\
/etc/nsswitch.conf  	\
/etc/libnss-ldap.conf 	\	 
/etc/nscd.conf 		\
/etc/default/autofs  	\
/etc/init.d/autofs 	\
/etc/ldap 		\
/etc/pam_ldap.conf 	\
/etc/auto.master
Transfer this archive Skolelinux.ldap.autofs.tgz over to the Ubuntu machine somehow, maybe with scp

scp skolelinux.ldap.autofs.tgz username@ubuntumachine:~/

Become root, then unpack the archive skolelinux.ldap.autofs.tgz

tar zvxf skolelinux.ldap.autofs.tgz -C /

Create the automount point on Ubuntu

mkdir /skole

Unless you add your Ubuntu machine to the Skolelinux/debian edu netgroups, it's won't be able to mount your home-dirs, have a look at http://www.skolelinux.no/~klaus/newnotater/x2097.html When this is all done, reboot the Ubuntu machine. When it starts again, you should be able to verify that ldap is working in Ubuntu by running:

getent passwd

and seeing all your Skolelinux/debian-edu ldap-users Running

su - username

should let you become that user, and that users home-dir should now automatically be mounted from Skolelinux/debian-edu. You should now be able to login, with you username/password and homedir from Skolelinux/debian-edu.