Howto, Integration of other Linux-machines into Skolelinux network.
Last year in July, I write a *very* quick guide to integrating a
"foreign" Linux distribution into the Skolelinux/Debian ldap/autofs
setup, here:
http://lists.debian.org/debian-edu/2004/07/msg00165.html
Lately people have told me that they haven't had any success following
the instructions in that mail.
So, I though I'd try following those instructions myself, and see how
well that goes, success, and here is how.
Last time I used a Knoppix installed to hardrive as "foreign" Linux
distribution, this time I'll use Ubuntu 5.10, I will not comment on
Ubuntu itself.
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:
( \ means one long line)
apt-get install autofs-ldap ldap-utils libldap2 \
libnss-ldap libpam-ldap nscd
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 whatere 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:
/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
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.
If the process of mounting takes very loooong, several minutes, and you
simultaneously see this messages in syslog on the Ubuntu machine:
nfs warning: mount version older than kernel
server localhost not responding, timed out
nsm_mon_unmon: rpc failed, status=-5
lockd: cannot monitor 10.0.2.2
lockd: failed to monitor 10.0.2.2
Then you might want to add the option nolock to ldap on your server,
this does that on the Skolelinux/debian-edu server: ( \ means one long
line)
ldapsearch -LLLx objectClass=automount automountInformation \
| sed -e "s:intr tjener:intr,nolock tjener:g" | ldapmodify -xWZD \
cn=admin,ou=People,dc=skole,dc=Skolelinux,dc=no
After this you must restart ldap
/etc/init.d/slapd restart
You should now be able to login, with you username/password and homedir
from Skolelinux/debian-edu.
Please drop me an email if this works, and if this doesn't work.
There might be a more layout friendly verson of this mail included in
the upcoming Sarge version of newdriftbook;
http://www.skolelinux.no/~klaus/newnotater/index.html
http://www.skolelinux.no/~klaus/newnotater_Sarge/index.html
Klaus
Reply to: