wiki:PaedmlAnpassungen
close Warning: Can't synchronize with repository "keplertools" (/srv/svn/keplertools does not appear to be a Subversion repository.). Look in the Trac log for more information.

Version 12 (modified by bau, 13 years ago) ( diff )

--

Hier werden die Anpassungen an der Standard-Paedml festgehalten. Bei Updates kann es vorkommen, dass die Änderungen überschrieben werden, diese müssen dann von Hand nachgebessert werden oder aber sie liegen im svn und können automatisch eingefügt werden.

Firewall-Einstellungen in /etc/init.d/linuxmuster-base

in der Funktion start_firewall nach :

      # accept ipcop
      iptables -A IN-$IFACE -s $ipcopip/32 -j ACCEPT

einfügen:

      # accept ipcop
      iptables -A IN-$IFACE -s $ipcopip/32 -j ACCEPT

      # accept proxy
      iptables -A IN-$IFACE -s 10.32.1.251/32 -j ACCEPT

      # accept ProxMoxPaedml
      iptables -A IN-$IFACE -s 10.32.1.2/32 -j ACCEPT

      # accept LTSP-SERVER-KVM (proxmoxltsp1-proxmoxltsp7)
      iptables -A IN-$IFACE -s 10.32.2.101/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.102/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.103/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.104/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.105/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.106/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.107/32 -j ACCEPT

      # accept LTSP-SERVER (ltsp1-ltsp7)
      iptables -A IN-$IFACE -s 10.32.2.1/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.2/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.3/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.4/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.5/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.6/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.7/32 -j ACCEPT

      # accept Boot-Sticks (1-4)
      iptables -A IN-$IFACE -s 10.32.2.201/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.202/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.203/32 -j ACCEPT
      iptables -A IN-$IFACE -s 10.32.2.204/32 -j ACCEPT

Workstationimport in /usr/share/linuxmuster/scripts/wimport.sh

Die Workstations werden beim ersten Booten mit PXE vom paedml in die Datei /etc/linuxmuster/workstations aufgenommen (zum booten per PXE siehe ​http://paedml.kg-fds.de/trac/wiki/AdminPxe):

Raum;Rechner;Gruppe;MAC;IP;netmask;NB;NB;NB;NB;[0|22|R]

Bei Imaging bedeutet:

  • 0: Workstationaccount anlegen aber nicht per Linbo berücksichtigen (Eintrag in /etc/dhcp3/dhcpd.conf.linuxmuster ohne Option pxelinux.configfile)
  • 22: Workstationaccount anlegen und per Linbo berücksichtigen (Eintrag in /etc/dhcp3/dhcpd.conf.linuxmuster mit Option pxelinux.configfile)
  • R: (Rembo) Workstationaccount anlegen und per Rembo verarbeiten (wird vom ltsp-dnsmasq-Script verarbeitet, DHCP dann vom rembo-Server direkt)

Optionen 0 und 22 sind Standard-paedml, Option R ist eingefügt und muss in /usr/share/linuxmuster/scripts/wimport.sh beim Workstationimport verarbeitet werden, nach

# check dhcp stuff
#[ -z "$DHCPDCONF" ] && exitmsg "Variable DHCPDCONF is not set!"
#if [ -e "$DHCPDCONF" ]; then
#       backup_file $DHCPDCONF 2>> $TMPLOG 1>> $TMPLOG || exitmsg "Unable to backup $DHCPDCONF!"
#       rm -rf $DHCPDCONF 2>> $TMPLOG 1>> $TMPLOG || exitmsg "Unable to delete $DHCPDCONF!"
#fi
#touch $DHCPDCONF 2>> $TMPLOG 1>> $TMPLOG || exitmsg "Unable to create $DHCPDCONF!"

einfügen (kann entfallen, sobald die Rechner-Wakeups direkt aus der workstationdatei lesen):

# Adaption fuer Rembointegration
REMBO_DHCPCONF="/etc/dhcp3/rembohosts.conf"
LEHRER_DHCPCONF="/etc/dhcp3/lehrerhosts.conf"

# Adaption DHCP-CONF f�r Rembo
[ -z "$REMBO_DHCPCONF" ] && exitmsg "Variable REMBO_DHCPCONF is not set!"
if [ -e "$REMBO_DHCPCONF" ]; then
        backup_file $REMBO_DHCPCONF 2>> $TMPLOG 1>> $TMPLOG || exitmsg "Unable to backup $REMBO_DHCPCONF!"
        rm -rf $REMBO_DHCPCONF 2>> $TMPLOG 1>> $TMPLOG || exitmsg "Unable to delete $REMBO_DHCPCONF!"
fi
touch $REMBO_DHCPCONF 2>> $TMPLOG 1>> $TMPLOG || exitmsg "Unable to create $REMBO_DHCPCONF!"

# Adaption DHCP-CONF fuer Lehrernetz
[ -z "$LEHRER_DHCPCONF" ] && exitmsg "Variable LEHRER_DHCPCONF is not set!"
if [ -e "$LEHRER_DHCPCONF" ]; then
        backup_file $LEHRER_DHCPCONF 2>> $TMPLOG 1>> $TMPLOG || exitmsg "Unable to backup $LEHRER_DHCPCONF!"
        rm -rf $LEHRER_DHCPCONF 2>> $TMPLOG 1>> $TMPLOG || exitmsg "Unable to delete $LEHRER_DHCPCONF!"
fi
touch $LEHRER_DHCPCONF 2>> $TMPLOG 1>> $TMPLOG || exitmsg "Unable to create $LEHRER_DHCPCONF!"

anstelle des folgenden Textes :

		# write dhcpd.conf entry
		echo -n "  * DHCP: Writing entry for $hostname ... "
    		    echo "host $hostname {" >> $DHCPDCONF
		    echo "  hardware ethernet $mac;" >> $DHCPDCONF
		    echo "  fixed-address $ip;" >> $DHCPDCONF
		    echo "  option host-name \"$hostname\";" >> $DHCPDCONF
		    if [[ "$pxe" != "0" && "$imaging" = "linbo" ]]; then
			# assign group specific pxelinux config
			echo "  option pxelinux.configfile \"pxelinux.cfg/$hostgroup\";" >> $DHCPDCONF
		    fi
		    echo "}" >> $DHCPDCONF
		fi
		echo "Ok!"
		echo


diesen einfügen

                # Adaption für Rembo- und LTSP-Integration (Baumgärtner)
		# write dhcpd.conf entry
		echo -n "  * DHCP: Writing entry for $hostname ... "
		if [[ "$pxe" == "R" ]]; then
		    echo -n "(Rembo-Adaption) ... "
    		    echo "host $hostname {" >> $REMBO_DHCPCONF
		    echo "  hardware ethernet $mac;" >> $REMBO_DHCPCONF
		    echo "  fixed-address $ip;" >> $REMBO_DHCPCONF
		    echo "  option host-name \"$hostname\";" >> $REMBO_DHCPCONF
		    echo "}" >> $REMBO_DHCPCONF
                elif [[ "$pxe" == "L" ]]; then
		    echo -n "(LTSP-Adaption) tue derzeit nichts... "
		elif [[ "$ip" =~ "10.16.209.*" ]]; then
		    echo -n "(Lehrernetz) ... "
    		    echo "host $hostname {" >> $LEHRER_DHCPCONF
		    echo "  hardware ethernet $mac;" >> $LEHRER_DHCPCONF
		    echo "  fixed-address $ip;" >> $LEHRER_DHCPCONF
		    echo "  option host-name \"$hostname\";" >> $LEHRER_DHCPCONF
		    echo "}" >> $LEHRER_DHCPCONF
		else
    		    echo "host $hostname {" >> $DHCPDCONF
		    echo "  hardware ethernet $mac;" >> $DHCPDCONF
		    echo "  fixed-address $ip;" >> $DHCPDCONF
		    echo "  option host-name \"$hostname\";" >> $DHCPDCONF
		    if [[ "$pxe" != "0" && "$imaging" = "linbo" ]]; then
			# assign group specific pxelinux config
			echo "  option pxelinux.configfile \"pxelinux.cfg/$hostgroup\";" >> $DHCPDCONF
		    fi
		    echo "}" >> $DHCPDCONF
		fi
		echo "Ok!"
		echo

DHCPD-Einstellungen in /etc/dhcp3/dhcpd.conf

Nach einem Update wird eventuell die Datei /etc/dhcp3/dhcpd.conf überschrieben, folgendes ist zu ändern:

#
# Sample configuration file for ISC dhcpd for Debian
#
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
#

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
server-identifier paedml;
ddns-update-style interim;
ddns-domainname "kg-fds.de";
ddns-updates on;
ddns-ttl 7200;
deny client-updates;
ddns-rev-domainname "in-addr.arpa.";
update-static-leases true;

# option definitions common to all supported networks...
server-name "paedml.kg-fds.de";
option domain-name "kg-fds.de";
option domain-name-servers 10.32.1.1;
option netbios-name-servers 10.32.1.1;
option ntp-servers 10.32.1.1;
option routers 10.32.1.254;
option font-servers 10.32.1.1;
option subnet-mask 255.240.0.0;
option broadcast-address 10.47.255.255;
use-host-decl-names on; #rembo

default-lease-time 86400;
max-lease-time 86400;

include "/etc/bind/rndc.key";

zone kg-fds.de {
	primary 10.32.1.1;
	key rndc-key;
}

zone 10.in-addr.arpa {
	primary 10.32.1.1;
	key rndc-key;
}

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

allow booting;
allow bootp;

# pxelinux options for LINBO
#option vendor-encapsulated-options 09:0f:80:00:0c:4e:65:74:77:6f:72:6b:20:62:6f:6f:74:0a:07:00:50:72:6f:6d:70:74:06:01:02:08:03:80:00:00:47:04:80:00:00:00:ff;
#option space pxelinux;
#option pxelinux.magic      code 208 = string;
#option pxelinux.configfile code 209 = string;  
#option pxelinux.pathprefix code 210 = text;  
#option pxelinux.reboottime code 211 = unsigned integer 32;			
#site-option-space "pxelinux";
#option pxelinux.magic f1:00:74:7e;
#if exists dhcp-parameter-request-list {
#    # Always send the PXELINUX options (specified in hexadecimal)
#    option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3);
#}
#option configfile code 150 = string;
#filename "pxelinux.0";

#next-server 10.32.1.1;

# subnet for workstation import
#subnet 10.32.0.0 netmask 255.240.0.0 {
#	range 10.32.1.100 10.32.1.200;
#        option router 10.32.1.251;
#	option ;
#	max-lease-time 3600;
#	default-lease-time 3600;
#	option host-name "pxeclient";
#}

# dynamic part of dhcpd.conf is included
#include "/etc/dhcp3/dhcpd.conf.linuxmuster";


# Kepler-specific part of dhcpd.conf is included
include "/etc/dhcp3/dhcpd.conf.kepler";

Der ganze obere LINBO-Bereich muss auskommentiert werden, ebenso der Import der dhcpd.conf.linuxmuster (diese wird in der dhcps.conf.kepler geladen) eigentlich wird nur noch die Kepler-angepasste Config geladen. (source:keplertools/etc/trunk/dhcp3/dhcpd.conf.kepler)

Besitzer des __tauschen-Verzeichnisses in /usr/share/sophomorix/devel/repairhome.student

Abweichend von der normalen Linuxmusterlösung verwenden wir für unsere LtspServer NFS um die Homeverzeichnisse zu mounten. Eine Sicherheitsvorkehrung in NFS verhindert, dass Schüler dem Link ~/__tauschen/tausch-Schule folgen.

Näheres dazu in ticket:347.

Das Problem lässt sich dadurch beheben, dass der Ordner ~/__tauschen nicht administrator, sondern root gehört. Dazu ist eine Änderung in der Datei /usr/share/sophomorix/devel/repairhome.student nötig. Die betreffende Änderung kann in changeset:326/keplertools nachgelesen werden:

  • sophomorix/trunk/devel/repairhome.student

    a b  
    2727$handoutcopy_dir/$handoutcopy_string$mygroups::administrator::$teachers::3757
    2828$handoutcopy_dir/$handoutcopy_string$current_room::administrator::$teachers::3757
    2929
    3030# __dachboden
    3131$user_attic::administrator::$teachers::3757
    3232
    3333# __einsammeln (collect)
    3434$collect_dir::administrator::$teachers::3757::
    3535
    3636# __tauschen::immutable::
    37 $share_dir::administrator::$teachers::3757/3750
     37###
     38### changed by kup 2011-11-23:
     39### $share_dir directory must be owned by root instead of administrator.
     40### We use NFS for exporting the share directories to LTSP Servers.
     41### NFS will not allow students to use the link tauschen-Schule, because
     42### its owner is different from the owner of $share_dir.
     43### See trac ticket #347.
     44###
     45# $share_dir::administrator::$teachers::3757/3750
     46$share_dir::root::$teachers::3757/3750
    3847
    3948# __vorlagen ::immutable::
    4049$task_dir::administrator::$teachers::3755

Creative-Commons-Lizenz

Die Inhalte dieser Wiki-Seite erscheinen, (wo anwendbar und nicht anderweitig angegeben), unter einer Creative-Commons-Lizenz CC BY NC SA 3.0 Germany. Urheber: J. Baumgärtner, R. Kupper, Kepler-Gymnasium Freudenstadt.

Note: See TracWiki for help on using the wiki.