From 471e2bd23eb412bca387ab719e1dac0e7b326192 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 22 Oct 2012 09:33:51 +0200 Subject: Add SSH key login support to IK terminals. Re-arrange config templates. --- internet-kiosk-management/sbin/ik_update | 10 +++-- internet-kiosk-management/share/etc/ik_init | 33 ++++++++++++++ internet-kiosk-management/share/etc/ik_start | 51 +++++++++++++++++++++ internet-kiosk-management/share/etc/ik_xmodmap | 52 ++++++++++++++++++++++ .../share/etc/ssh-root/authorized_keys | 0 .../share/etc/ssh-user/authorized_keys | 0 internet-kiosk-management/share/ik_init | 24 ---------- internet-kiosk-management/share/ik_start | 51 --------------------- internet-kiosk-management/share/ik_xmodmap | 52 ---------------------- 9 files changed, 143 insertions(+), 130 deletions(-) create mode 100755 internet-kiosk-management/share/etc/ik_init create mode 100755 internet-kiosk-management/share/etc/ik_start create mode 100644 internet-kiosk-management/share/etc/ik_xmodmap create mode 100644 internet-kiosk-management/share/etc/ssh-root/authorized_keys create mode 100644 internet-kiosk-management/share/etc/ssh-user/authorized_keys delete mode 100755 internet-kiosk-management/share/ik_init delete mode 100755 internet-kiosk-management/share/ik_start delete mode 100644 internet-kiosk-management/share/ik_xmodmap (limited to 'internet-kiosk-management') diff --git a/internet-kiosk-management/sbin/ik_update b/internet-kiosk-management/sbin/ik_update index f6aa9a5..e54412c 100755 --- a/internet-kiosk-management/sbin/ik_update +++ b/internet-kiosk-management/sbin/ik_update @@ -67,9 +67,13 @@ if test -f $IK_CONFIG/ik_start; then chmod a+rx "$IK_CHROOT/etc/internet-kiosk/ik_start" fi -if test -f $IK_CONFIG/ik_sessions; then - cp -v "$IK_CONFIG/ik_sessions" "$IK_CHROOT/etc/internet-kiosk/ik_sessions" - chmod a+rx "$IK_CHROOT/etc/internet-kiosk/ik_sessions" +if test -f $IK_CONFIG/ssh-user/authorized_keys; then + cp -v "$IK_CONFIG/ssh-user/authorized_keys" "$IK_CHROOT/etc/internet-kiosk/ssh-user/authorized_keys" + chmod -Rf go-rwx "$IK_CHROOT/etc/internet-kiosk/ssh-user" +fi +if test -f $IK_CONFIG/ssh-root/authorized_keys; then + cp -v "$IK_CONFIG/ssh-root/authorized_keys" "$IK_CHROOT/etc/internet-kiosk/ssh-root/authorized_keys" + chmod -Rf go-rwx "$IK_CHROOT/etc/internet-kiosk/ssh-root" fi echo diff --git a/internet-kiosk-management/share/etc/ik_init b/internet-kiosk-management/share/etc/ik_init new file mode 100755 index 0000000..559bbcf --- /dev/null +++ b/internet-kiosk-management/share/etc/ik_init @@ -0,0 +1,33 @@ +#!/bin/bash + +# Copyright (C) 2012 by Debian Edu project, http://wiki.debian.org/DebianEdu +# Mike Gabriel + +# Internet Kiosk is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# Internet Kiosk is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +# prepare account ,,internet-kiosk'' +mkdir -p /home/internet-kiosk +mkdir -p /home/internet-kiosk/.mozilla +mkdir -p /home/internet-kiosk/.ssh +test -f /etc/internet-kiosk/ssh-user/authorized_keys && cp /etc/internet-kiosk/ssh-user/authorized_keys /home/internet-kiosk/.ssh +chown internet-kiosk:internet-kiosk /home/internet-kiosk -Rf +chmod go-rwx /home/internet-kiosk -Rf + +# prepare account ,,root'' +mkdir -p /root/.ssh +test -f /etc/internet-kiosk/ssh-root/authorized_keys && cp /etc/internet-kiosk/ssh-root/authorized_keys /root/.ssh +chown root:root /root -Rf +chmod go-rwx /root -Rf diff --git a/internet-kiosk-management/share/etc/ik_start b/internet-kiosk-management/share/etc/ik_start new file mode 100755 index 0000000..31918a6 --- /dev/null +++ b/internet-kiosk-management/share/etc/ik_start @@ -0,0 +1,51 @@ +#!/bin/bash + +# Copyright (C) 2012 by Debian Edu project, http://wiki.debian.org/DebianEdu +# Mike Gabriel + +# Internet Kiosk is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# Internet Kiosk is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +# there can be master terminals and slave terminals +MASTER_TERMINALS="vertretungsplan-04" + +# these terminals can have different startup URLs +START_URL_MASTERS="http://wiki.debian.org" +START_URL_SLAVES="http://www.ecosia.org" + +# enforce fixed resolution for displays +#MASTER_RESOLUTION="1024x768" +#SLAVE_RESOLUTION="1024x768" +MASTER_RESOLUTION= +SLAVE_RESOLUTION= + +HOST_NAME=$(hostname) +START_URL="$START_URL_SLAVES" +RESOLUTION="$SLAVE_RESOLUTION" +for master_terminal in $MASTER_TERMINALS; do + if [ "$HOST_NAME" == "$master_terminal" ]; then + START_URL="$START_URL_MASTERS" + #RESOLUTION="1024x768" + RESOLUTION="$MASTER_RESOLUTION" + break + fi +done + +if [ -n $RESOLUTION ]; then + xrandr -d :0 --output default --mode $RESOLUTION +fi + +#xset s +/usr/bin/iceweasel "$START_URL" & diff --git a/internet-kiosk-management/share/etc/ik_xmodmap b/internet-kiosk-management/share/etc/ik_xmodmap new file mode 100644 index 0000000..83f1d69 --- /dev/null +++ b/internet-kiosk-management/share/etc/ik_xmodmap @@ -0,0 +1,52 @@ +keycode 0x09 = 0x0000 +keycode 0x43 = 0x0000 +keycode 0x44 = 0x0000 +keycode 0x45 = 0x0000 +keycode 0x46 = 0x0000 +keycode 0x47 = 0x0000 +keycode 0x48 = 0x0000 +keycode 0x49 = 0x0000 +keycode 0x4A = 0x0000 +keycode 0x4B = 0x0000 +keycode 0x4C = 0x0000 +keycode 0x5F = 0x0000 +keycode 0x60 = 0x0000 +keycode 0x6F = 0x0000 +keycode 0x4E = 0x0000 +keycode 0x6E = 0x0000 +keycode 0x31 = 0x0000 +keycode 0x6A = 0x0000 +keycode 0x61 = 0x0000 +keycode 0x63 = 0x0000 +keycode 0x4D = 0x0000 +keycode 0x70 = 0x0000 +keycode 0x3F = 0x0000 +keycode 0x52 = 0x0000 +keycode 0x17 = 0x0000 +keycode 0x22 = 0x0000 +keycode 0x23 = 0x0000 +keycode 0x6B = 0x0000 +keycode 0x67 = 0x0000 +keycode 0x69 = 0x0000 +keycode 0x4F = 0x0000 +keycode 0x50 = 0x0000 +keycode 0x51 = 0x0000 +keycode 0x56 = 0x0000 +keycode 0x42 = 0x0000 +keycode 0x53 = 0x0000 +keycode 0x54 = 0x0000 +keycode 0x55 = 0x0000 +keycode 0x57 = 0x0000 +keycode 0x58 = 0x0000 +keycode 0x59 = 0x0000 +keycode 0x6C = 0x0000 +keycode 0x25 = 0x0000 +keycode 0x40 = 0x0000 +keycode 0x40 = 0x0000 +keycode 0x71 = 0x0000 +keycode 0x6D = 0x0000 +keycode 0x5A = 0x0000 +keycode 0x5B = 0x0000 +keycode 0x73 = 0x0000 +keycode 0x74 = 0x0000 +keycode 0x75 = 0x0000 diff --git a/internet-kiosk-management/share/etc/ssh-root/authorized_keys b/internet-kiosk-management/share/etc/ssh-root/authorized_keys new file mode 100644 index 0000000..e69de29 diff --git a/internet-kiosk-management/share/etc/ssh-user/authorized_keys b/internet-kiosk-management/share/etc/ssh-user/authorized_keys new file mode 100644 index 0000000..e69de29 diff --git a/internet-kiosk-management/share/ik_init b/internet-kiosk-management/share/ik_init deleted file mode 100755 index 6740b88..0000000 --- a/internet-kiosk-management/share/ik_init +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2012 by Debian Edu project, http://wiki.debian.org/DebianEdu -# Mike Gabriel - -# Internet Kiosk is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Internet Kiosk is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -mkdir -p /home/internet-kiosk -mkdir -p /home/internet-kiosk/.mozilla -chown internet-kiosk:internet-kiosk /home/internet-kiosk -Rf -chmod go-rwx /home/internet-kiosk -Rf diff --git a/internet-kiosk-management/share/ik_start b/internet-kiosk-management/share/ik_start deleted file mode 100755 index 31918a6..0000000 --- a/internet-kiosk-management/share/ik_start +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2012 by Debian Edu project, http://wiki.debian.org/DebianEdu -# Mike Gabriel - -# Internet Kiosk is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Internet Kiosk is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the -# Free Software Foundation, Inc., -# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -# there can be master terminals and slave terminals -MASTER_TERMINALS="vertretungsplan-04" - -# these terminals can have different startup URLs -START_URL_MASTERS="http://wiki.debian.org" -START_URL_SLAVES="http://www.ecosia.org" - -# enforce fixed resolution for displays -#MASTER_RESOLUTION="1024x768" -#SLAVE_RESOLUTION="1024x768" -MASTER_RESOLUTION= -SLAVE_RESOLUTION= - -HOST_NAME=$(hostname) -START_URL="$START_URL_SLAVES" -RESOLUTION="$SLAVE_RESOLUTION" -for master_terminal in $MASTER_TERMINALS; do - if [ "$HOST_NAME" == "$master_terminal" ]; then - START_URL="$START_URL_MASTERS" - #RESOLUTION="1024x768" - RESOLUTION="$MASTER_RESOLUTION" - break - fi -done - -if [ -n $RESOLUTION ]; then - xrandr -d :0 --output default --mode $RESOLUTION -fi - -#xset s -/usr/bin/iceweasel "$START_URL" & diff --git a/internet-kiosk-management/share/ik_xmodmap b/internet-kiosk-management/share/ik_xmodmap deleted file mode 100644 index 83f1d69..0000000 --- a/internet-kiosk-management/share/ik_xmodmap +++ /dev/null @@ -1,52 +0,0 @@ -keycode 0x09 = 0x0000 -keycode 0x43 = 0x0000 -keycode 0x44 = 0x0000 -keycode 0x45 = 0x0000 -keycode 0x46 = 0x0000 -keycode 0x47 = 0x0000 -keycode 0x48 = 0x0000 -keycode 0x49 = 0x0000 -keycode 0x4A = 0x0000 -keycode 0x4B = 0x0000 -keycode 0x4C = 0x0000 -keycode 0x5F = 0x0000 -keycode 0x60 = 0x0000 -keycode 0x6F = 0x0000 -keycode 0x4E = 0x0000 -keycode 0x6E = 0x0000 -keycode 0x31 = 0x0000 -keycode 0x6A = 0x0000 -keycode 0x61 = 0x0000 -keycode 0x63 = 0x0000 -keycode 0x4D = 0x0000 -keycode 0x70 = 0x0000 -keycode 0x3F = 0x0000 -keycode 0x52 = 0x0000 -keycode 0x17 = 0x0000 -keycode 0x22 = 0x0000 -keycode 0x23 = 0x0000 -keycode 0x6B = 0x0000 -keycode 0x67 = 0x0000 -keycode 0x69 = 0x0000 -keycode 0x4F = 0x0000 -keycode 0x50 = 0x0000 -keycode 0x51 = 0x0000 -keycode 0x56 = 0x0000 -keycode 0x42 = 0x0000 -keycode 0x53 = 0x0000 -keycode 0x54 = 0x0000 -keycode 0x55 = 0x0000 -keycode 0x57 = 0x0000 -keycode 0x58 = 0x0000 -keycode 0x59 = 0x0000 -keycode 0x6C = 0x0000 -keycode 0x25 = 0x0000 -keycode 0x40 = 0x0000 -keycode 0x40 = 0x0000 -keycode 0x71 = 0x0000 -keycode 0x6D = 0x0000 -keycode 0x5A = 0x0000 -keycode 0x5B = 0x0000 -keycode 0x73 = 0x0000 -keycode 0x74 = 0x0000 -keycode 0x75 = 0x0000 -- cgit v1.2.3