Kategorien
CL-35B2 Linux

Linux Buildsystem auf der NAS erstellen (fedora Core12)

Auf meiner NAS CL-35B2 benötige ich ein Buildsystem um einige Dienste zu aktualisieren. (und vermutete Sicherheitslücken zu schließen)

Um ein Build System zu installieren reicht der Speicherplatz der NAS, der NAND ist nur 200MB groß, nicht aus. Ich habe einen 4GB USB Stick angeschlossen, der als /dev/sdc auftaucht.

Nach dem Partitionieren via cfdisk bleiben 3GB für meine chroot-Umgebung und 1GB für den Swap.

Die Pakete sind der URL http://ftp.linux.org.uk/pub/linux/arm/fedora/pub/fedora/linux/releases/12/Everything/arm/os/Packages/ entnommen, ich habe einen vollständigen Mirror unter http://fc12.arm.loteks.de/ angelegt.

mkfs.ext4 /dev/sdc1
mount /dev/sdc1 /mnt/

1.) Initialisiere die RPM Datenbank

mkdir -p /mnt/chroot/var/lib/rpm
cd /mnt
wget http://fc12.arm.loteks.de/fedora-release-12-1.fa2.noarch.rpm
rpm --rebuilddb --root=/mnt/chroot
wget http://fc12.arm.loteks.de/A4D647E9.txt
wget http://fc12.arm.loteks.de/DE7F38BD.txt
rpm --root=/mnt/chroot --import A4D647E9.txt
rpm --root=/mnt/chroot --import DE7F38BD.txt
rpm --root=/mnt/chroot -i fedora-release-12-1.fa2.noarch.rpm
rpm --root=/mnt/chroot --import /mnt/chroot/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-12-primary

2.) Das Basesystem

wget http://fc12.arm.loteks.de/basesystem-10.0-3.noarch.rpm
wget http://fc12.arm.loteks.de/setup-2.8.9-1.fc12.noarch.rpm
wget http://fc12.arm.loteks.de/filesystem-2.4.30-2.fc12.armv5tel.rpm
rpm --root=/mnt/chroot -i basesystem-10.0-3.noarch.rpm setup-2.8.9-1.fc12.noarch.rpm filesystem-2.4.30-2.fc12.armv5tel.rpm

3.) Die Bash installieren

wget http://fc12.arm.loteks.de/bash-4.0.33-1.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/glibc-common-2.11-2.fa3.armv5tel.rpm
wget http://fc12.arm.loteks.de/glibc-2.11-2.fa3.armv5tel.rpm
wget http://fc12.arm.loteks.de/libgcc-4.4.2-5.fc12.fa4.armv5tel.rpm
wget http://fc12.arm.loteks.de/nss-softokn-freebl-3.12.4-10.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/ncurses-libs-5.7-3.20090207.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/ncurses-base-5.7-3.20090207.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/tzdata-2009o-2.fc12.noarch.rpm
rpm --root=/mnt/chroot -i bash-4.0.33-1.fc12.armv5tel.rpm glibc-common-2.11-2.fa3.armv5tel.rpm glibc-2.11-2.fa3.armv5tel.rpm libgcc-4.4.2-5.fc12.fa4.armv5tel.rpm nss-softokn-freebl-3.12.4-10.fc12.armv5tel.rpm ncurses-libs-5.7-3.20090207.fc12.armv5tel.rpm ncurses-base-5.7-3.20090207.fc12.armv5tel.rpm tzdata-2009o-2.fc12.noarch.rpm

Da es noch keine lokale gibt erscheint jetzt die Fehlermeldung:

/usr/sbin/build-locale-archive: cannot map archive header: Invalid argument
warning: %post(glibc-common-2.11-2.fa3.armv5tel) scriptlet failed, exit status 1

3.) Coreutils

wget http://fc12.arm.loteks.de/coreutils-7.6-5.fc12.fa1.armv5tel.rpm
wget http://fc12.arm.loteks.de/coreutils-libs-7.6-5.fc12.fa1.armv5tel.rpm
wget http://fc12.arm.loteks.de/info-4.13a-7.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/grep-2.5.3-6.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libacl-2.2.47-5.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libattr-2.4.43-4.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libcap-2.16-5.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/pam-1.1.0-7.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libselinux-2.0.87-1.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/ncurses-5.7-3.20090207.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/ncurses-base-5.7-3.20090207.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/util-linux-ng-2.16-10.2.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/zlib-1.2.3-23.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/audit-libs-2.0.1-1.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libsepol-2.0.38-1.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/cracklib-2.8.13-6.armv5tel.rpm
wget http://fc12.arm.loteks.de/cracklib-dicts-2.8.13-6.armv5tel.rpm
wget http://fc12.arm.loteks.de/gzip-1.3.12-11.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/pcre-7.8-3.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/less-436-2.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/db4-4.7.25-13.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/db4-utils-4.7.25-13.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libblkid-2.16-10.2.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/popt-1.13-6.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libuuid-2.16-10.2.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libstdc++-4.4.2-5.fc12.fa4.armv5tel.rpm

rpm --root=/mnt/chroot -i coreutils-7.6-5.fc12.fa1.armv5tel.rpm coreutils-libs-7.6-5.fc12.fa1.armv5tel.rpm info-4.13a-7.fc12.armv5tel.rpm grep-2.5.3-6.fc12.armv5tel.rpm libacl-2.2.47-5.fc12.armv5tel.rpm libattr-2.4.43-4.fc12.armv5tel.rpm libcap-2.16-5.fc12.armv5tel.rpm pam-1.1.0-7.fc12.armv5tel.rpm libselinux-2.0.87-1.fc12.armv5tel.rpm ncurses-5.7-3.20090207.fc12.armv5tel.rpm util-linux-ng-2.16-10.2.fc12.armv5tel.rpm zlib-1.2.3-23.fc12.armv5tel.rpm audit-libs-2.0.1-1.fc12.armv5tel.rpm libsepol-2.0.38-1.fc12.armv5tel.rpm cracklib-2.8.13-6.armv5tel.rpm cracklib-dicts-2.8.13-6.armv5tel.rpm gzip-1.3.12-11.fc12.armv5tel.rpm pcre-7.8-3.fc12.armv5tel.rpm less-436-2.fc12.armv5tel.rpm db4-4.7.25-13.fc12.armv5tel.rpm db4-utils-4.7.25-13.fc12.armv5tel.rpm libblkid-2.16-10.2.fc12.armv5tel.rpm popt-1.13-6.fc12.armv5tel.rpm libuuid-2.16-10.2.fc12.armv5tel.rpm libstdc++-4.4.2-5.fc12.fa4.armv5tel.rpm

4.) Findutils, flex, e2fsprogs, diffutils

wget http://fc12.arm.loteks.de/findutils-4.4.2-4.fc12.armv5tel.rpm
rpm --root=/mnt/chroot -i findutils-4.4.2-4.fc12.armv5tel.rpm

wget http://fc12.arm.loteks.de/flex-2.5.35-7.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/m4-1.4.13-4.fc12.armv5tel.rpm
rpm --root=/mnt/chroot -i flex-2.5.35-7.fc12.armv5tel.rpm m4-1.4.13-4.fc12.armv5tel.rpm

wget http://fc12.arm.loteks.de/e2fsprogs-1.41.9-5.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/e2fsprogs-libs-1.41.9-5.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/e2tools-0.0.16-14.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libcom_err-1.41.9-5.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libss-1.41.9-5.fc12.armv5tel.rpm
rpm --root=/mnt/chroot -i e2tools-0.0.16-14.fc12.armv5tel.rpm e2fsprogs-libs-1.41.9-5.fc12.armv5tel.rpm e2fsprogs-1.41.9-5.fc12.armv5tel.rpm libcom_err-1.41.9-5.fc12.armv5tel.rpm libss-1.41.9-5.fc12.armv5tel.rpm

wget http://fc12.arm.loteks.de/diffutils-2.8.1-25.fc12.armv5tel.rpm
rpm --root=/mnt/chroot -i diffutils-2.8.1-25.fc12.armv5tel.rpm

5.) libtool, autoconf, automake, gcc, sed, binutils, Perl

wget http://fc12.arm.loteks.de/libtool-2.2.6-15.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/autoconf-2.63-3.fc12.noarch.rpm
wget http://fc12.arm.loteks.de/automake-1.11-3.fc12.noarch.rpm
wget http://fc12.arm.loteks.de/gcc-4.4.2-5.fc12.fa4.armv5tel.rpm
wget http://fc12.arm.loteks.de/sed-4.2.1-4.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/cpp-4.4.2-5.fc12.fa4.armv5tel.rpm
wget http://fc12.arm.loteks.de/binutils-2.19.51.0.14-34.fc12.fa1.armv5tel.rpm
wget http://fc12.arm.loteks.de/glibc-devel-2.11-2.fa3.armv5tel.rpm
wget http://fc12.arm.loteks.de/glibc-headers-2.11-2.fa3.armv5tel.rpm
wget http://fc12.arm.loteks.de/libgomp-4.4.2-5.fc12.fa4.armv5tel.rpm
wget http://fc12.arm.loteks.de/gmp-4.3.1-5.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/mpfr-2.4.1-3.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/perl-Module-Pluggable-3.90-82.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/perl-Pod-Simple-3.07-82.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/perl-Pod-Escapes-1.04-82.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/perl-5.10.0-82.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/perl-libs-5.10.0-82.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/perl-version-0.74-82.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/gdbm-1.8.0-33.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/kernel-headers-2.6.31.5-122.fc12.armv5tel.rpm
rpm --root=/mnt/chroot -i kernel-headers-2.6.31.5-122.fc12.armv5tel.rpm perl-5.10.0-82.fc12.armv5tel.rpm perl-libs-5.10.0-82.fc12.armv5tel.rpm perl-version-0.74-82.fc12.armv5tel.rpm gdbm-1.8.0-33.fc12.armv5tel.rpm libtool-2.2.6-15.fc12.armv5tel.rpm autoconf-2.63-3.fc12.noarch.rpm automake-1.11-3.fc12.noarch.rpm gcc-4.4.2-5.fc12.fa4.armv5tel.rpm sed-4.2.1-4.fc12.armv5tel.rpm cpp-4.4.2-5.fc12.fa4.armv5tel.rpm binutils-2.19.51.0.14-34.fc12.fa1.armv5tel.rpm glibc-devel-2.11-2.fa3.armv5tel.rpm glibc-headers-2.11-2.fa3.armv5tel.rpm libgomp-4.4.2-5.fc12.fa4.armv5tel.rpm gmp-4.3.1-5.fc12.armv5tel.rpm mpfr-2.4.1-3.fc12.armv5tel.rpm perl-5.10.0-82.fc12.armv5tel.rpm perl-libs-5.10.0-82.fc12.armv5tel.rpm perl-version-0.74-82.fc12.armv5tel.rpm kernel-headers-2.6.31.5-122.fc12.armv5tel.rpm gdbm-1.8.0-33.fc12.armv5tel.rpm perl-Module-Pluggable-3.90-82.fc12.armv5tel.rpm perl-Pod-Simple-3.07-82.fc12.armv5tel.rpm perl-Pod-Escapes-1.04-82.fc12.armv5tel.rpm

6.) rpm, bzip2, curl, elfutils

wget http://fc12.arm.loteks.de/rpm-4.7.1-6.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/rpm-libs-4.7.1-6.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/curl-7.19.6-10.fc12.fa1.armv5tel.rpm
wget http://fc12.arm.loteks.de/libacl-2.2.47-5.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/bzip2-libs-1.0.5-6.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/bzip2-devel-1.0.5-6.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libcap-2.16-5.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libtdb-1.1.5-2.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/elfutils-0.143-1.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/elfutils-libelf-0.143-1.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/lua-5.1.4-4.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/file-libs-5.03-9.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/nss-3.12.4-14.fc12.fa1.armv5tel.rpm
wget http://fc12.arm.loteks.de/lzma-libs-4.32.7-3.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libselinux-2.0.87-1.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/lzma-4.32.7-3.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/lzma-libs-4.32.7-3.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libcurl-7.19.6-10.fc12.fa1.armv5tel.rpm
wget http://fc12.arm.loteks.de/nspr-4.8.2-1.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/nss-softokn-3.12.4-10.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/nss-util-3.12.4-8.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/elfutils-libs-0.143-1.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libsqlite3x-20071018-8.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/xz-libs-4.999.9-0.1.beta.20091007git.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/krb5-libs-1.7-8.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libidn-1.9-5.armv5tel.rpm
wget http://fc12.arm.loteks.de/openldap-2.4.18-5.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libssh2-1.2-2.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/readline-6.0-3.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/sqlite-3.6.17-1.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/keyutils-libs-1.2-6.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/openssl-1.0.0-0.10.beta3.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/cyrus-sasl-lib-2.1.23-2.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/ca-certificates-2009-2.fc12.noarch.rpm
rpm --root=/mnt/chroot -i rpm-4.7.1-6.fc12.armv5tel.rpm rpm-libs-4.7.1-6.fc12.armv5tel.rpm curl-7.19.6-10.fc12.fa1.armv5tel.rpm bzip2-libs-1.0.5-6.fc12.armv5tel.rpm bzip2-devel-1.0.5-6.fc12.armv5tel.rpm libtdb-1.1.5-2.fc12.armv5tel.rpm elfutils-0.143-1.fc12.armv5tel.rpm elfutils-libelf-0.143-1.fc12.armv5tel.rpm lua-5.1.4-4.fc12.armv5tel.rpm file-libs-5.03-9.fc12.armv5tel.rpm nss-3.12.4-14.fc12.fa1.armv5tel.rpm lzma-libs-4.32.7-3.fc12.armv5tel.rpm lzma-libs-4.32.7-3.fc12.armv5tel.rpm lzma-4.32.7-3.fc12.armv5tel.rpm libcurl-7.19.6-10.fc12.fa1.armv5tel.rpm nspr-4.8.2-1.fc12.armv5tel.rpm nss-3.12.4-14.fc12.fa1.armv5tel.rpm nss-softokn-3.12.4-10.fc12.armv5tel.rpm nss-util-3.12.4-8.fc12.armv5tel.rpm elfutils-libs-0.143-1.fc12.armv5tel.rpm libsqlite3x-20071018-8.fc12.armv5tel.rpm xz-libs-4.999.9-0.1.beta.20091007git.fc12.armv5tel.rpm krb5-libs-1.7-8.fc12.armv5tel.rpm libidn-1.9-5.armv5tel.rpm openldap-2.4.18-5.fc12.armv5tel.rpm libssh2-1.2-2.fc12.armv5tel.rpm readline-6.0-3.fc12.armv5tel.rpm sqlite-3.6.17-1.fc12.armv5tel.rpm keyutils-libs-1.2-6.fc12.armv5tel.rpm openssl-1.0.0-0.10.beta3.fc12.armv5tel.rpm cyrus-sasl-lib-2.1.23-2.fc12.armv5tel.rpm ca-certificates-2009-2.fc12.noarch.rpm

7.) Development Pakete & awk

wget http://fc12.arm.loteks.de/gawk-3.1.7-1.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/keyutils-libs-devel-1.2-6.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/krb5-devel-1.7-8.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libcom_err-devel-1.41.9-5.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libselinux-devel-2.0.87-1.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/libsepol-devel-2.0.38-1.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/openssl-devel-1.0.0-0.10.beta3.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/pkgconfig-0.23-9.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/zlib-devel-1.2.3-23.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/wget-1.11.4-5.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/make-3.81-18.fc12.armv5tel.rpm
wget http://fc12.arm.loteks.de/pam-devel-1.1.0-7.fc12.armv5tel.rpm
rpm --root=/mnt/chroot -i wget-1.11.4-5.fc12.armv5tel.rpm make-3.81-18.fc12.armv5tel.rpm pam-devel-1.1.0-7.fc12.armv5tel.rpm gawk-3.1.7-1.fc12.armv5tel.rpm keyutils-libs-devel-1.2-6.fc12.armv5tel.rpm krb5-devel-1.7-8.fc12.armv5tel.rpm libcom_err-devel-1.41.9-5.fc12.armv5tel.rpm libselinux-devel-2.0.87-1.fc12.armv5tel.rpm libsepol-devel-2.0.38-1.fc12.armv5tel.rpm openssl-devel-1.0.0-0.10.beta3.fc12.armv5tel.rpm pkgconfig-0.23-9.fc12.armv5tel.rpm zlib-devel-1.2.3-23.fc12.armv5tel.rpm

Installierte RPM Pakete anzeigen Lassen:

rpm -qa

Zu welchem RPM Paket gehört die Datei?

rpm -qf /lib/libm.so.6

Kategorien
CL-35B2 Linux

CL-35B2 hacken, Dienste aufräumen sowie SMB und NFS anbieten

Es gibt zwei Wege einen root-Zugang zur CL-35B2 zu erlangen, einen für alte Versionen des Systems und einen für aktuelle Versionen.:

Der klassische Web:
Das root-Passwort ist “toor“!

Der neue Weg wenn der klassische Weg nicht möglich ist:
Lege eine Systemsicherung in der Weboberfläche an. Bearbeite die in der Sicherung enthaltene Datei /etc/shadow in dem Du die Zeile welche mit “admin:” beginnt in die erste Zeile kopierst, nach dem Du die erste Zeile, welche mit “root:” beginnt gelöscht hast.
Ändere das “admin:” in der neuen ersten Zeile in “root:” Im Anschluss füge die Zip-Datei der Sicherung wieder zusammen und Spiele das Backup auf die CL-35B2 zurück.

Anschließend ist der root-Login via Telnet möglich.

# cat /proc/mtd
dev: size erasesize name
mtd0: 10000000 00020000 "NAND 256MiB 3,3V 8-bit"
mtd1: 026c0000 00020000 "Boot partition"
mtd2: 0d940000 00020000 "Data Partition"

Das erste das ich auf der NAS aktiviere ist der SSH-Dienst, da ich das unverschlüsselte Telnet nicht mag!

chkconfig --level 345 sshd on

Als nächstes ist mir aufgefallen, das jemand in /root/.ssh/authorized_keys einen Key hinterlegt hat. Das mag ich nicht, ich lösche zuerst diese Datei.
Da es kein passwd auf der Box gibt kommt das ändern des Passwortes erst später…

# deaktivieren was nicht laufen soll

chkconfig --level 123456 cups off
chkconfig --level 123456 vsftpd off
chkconfig --level 123456 lighttpd off
chkconfig --level 123456 atalkd off
chkconfig --level 345 smbd off
chkconfig --level 345 smb off
chkconfig --level 345 nmb off

# software deinstallieren die wir nicht wollen
# was soll ein Sockproxy auf einer NAS? und ich mag keinen gstreamer auf der NAS
# auserdem lösche ich die NAS Software von fantec

rpm -e nas-sockproxy

rpm -e nas-20120118-1.noarch

# ACHTUNG !!! Jetzt ist die Netzwerk konfiguration umbenannt worden, korrigieren wir das SOFORT!

mv /etc/sysconfig/network-scripts/ifcfg-eth0.rpmsave /etc/sysconfig/network-scripts/ifcfg-eth0
mv /etc/sysconfig/network.rpmsave /etc/sysconfig/network

Im Anschluss werden die nicht vorhandenen Dienste von der NAS entfernt.:

rpm -e nas-tr-20110609-1.armv5tel
rpm -e mt-daapd
rpm -e gstreamer-0.10.25-1.fc12.armv5tel gstreamer-python-0.10.16-1.fc12.armv5tel gstreamer-plugins-good-0.10.16-7.fc12.armv5tel gstreamer-ffmpeg-0.10.10-1.fc12.armv5tel gstreamer-tools-0.10.25-1.fc12.armv5tel gstreamer-plugins-base-0.10.25-5.fc12.armv5tel
rpm -e netatalk
rm -r /etc/netatalk

rpm -e minidlna
rm /etc/minidlna*

rpm -e vsftpd
rm /etc/vsftpd/vsftpd.conf.rpmsave

rpm -e cups-1.4.1-13.fc12.armv5tel

Jetzt fehlen der NAS alle Dienste die ich persönlich nicht auf meiner NAS sehen möchte.
Jetzt installiere ich mit die grundlegenden Linux Werkzeige lsof, wget, passwd und bzip2

rpm -i bzip2-1.0.5-6.fc12.armv5tel.rpm
rpm -i tar-1.22-8.fc12.armv5tel.rpm
rpm -i rsync-3.0.6-3.fc12.armv5tel.rpm
rpm -i libuser-0.56.12-1.fc12.armv5tel.rpm # abhängigkeit vin passwd
rpm -i passwd-0.77-1.fc12.armv5tel.rpm
rpm -i wget-1.11.4-5.fc12.armv5tel.rpm

Um auf der NAS Cronjobs ausführen zu können benötige ich eine reihe von zusäztlichen Paketen.:

rpm -i crontabs-1.10-31.fc12.noarch.rpm cronie-1.4.3-2.fc12.armv5tel.rpm sendmail-8.14.3-8.fc12.armv5tel.rpm cronie-anacron-1.4.3-2.fc12.armv5tel.rpm procmail-3.22-25.fc12.armv5tel.rpm cyrus-sasl-2.1.23-2.fc12.armv5tel.rpm hesiod-3.1.0-16.armv5tel.rpm

Jetzt da ich Cronjobs anlegen kann lasse ich mir bei dieser Gelegenheit anzeigen ob jemand aktuell auf dieser CL-35B2 eingeloggt ist. (Ich habe ja ein paar LED’s an der NAS)

ln -s /sys/devices/platform/leds-gpio/leds/firmware/brightness /root/led-hd1
ln -s /sys/devices/platform/leds-gpio/leds/system/brightness /root/led-system
ln -s /sys/devices/platform/leds-gpio/leds/usbcopy/brightness /root/led-usbcopy

… und ein kurzes Shellscript namens countuser.sh das die Anzahl der aktuell eingeloggten benutzer Zählt und die LED setzt.:

#!/bin/sh

COUNT=$(who|wc -l);
if [ $COUNT = "0" ]; then
/bin/echo 0 > /root/led-system
else
/bin/echo 1 > /root/led-system
fi

exit 0

Das Script ausführbar machen:

chmod +x ~/countuser.sh

…und ein cronjob für das countuser.sh-Script anlegen.:

crontab -e

SHELL=/bin/bash
PATH=/sbin:/bin/:/usr/sbin/:/usr/bin

* * * * * /root/countuser.sh

# dann die NAS-Box rebooten:

reboot

# nur wenn die BOX via SSH zu erreichen ist und ich mich einloggen kann schale ich via:

chkconfig --level 123456 telnet off

# Telnet deinstalliere ich via

 rpm -e telnet-server-0.17-45.fc12.armv5tel

# zu guter letzt kopiere ich mir noch die bash startdateien in den /root Ordner:
.bash_logout  .bash_profile  .bashrc

ddclient (DynDNS) installieren:

wget http://cdn.dyndns.com/ddclient.tar.gz
tar -xzvf ddclient.tar.gz
cd ddclient-3.7.3/
mkdir /etc/ddclient
mkdir /var/cache/ddclient
cp ddclient /usr/local/sbin
cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf
cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient
chkconfig --add ddclient
cd ..
rm -rf ddclient-3.7.3/
rpm -iv --nodeps cron*

Die Pakete stammen alle aus dem Veralteten Repository auf:

http://ftp.linux.org.uk/pub/linux/arm/fedora/pub/fedora/linux/releases/12/Everything/arm/os/Packages/

Ergänzung:

Die alten root Passwörter für die CL-25B2, “root” und “toor” scheinen in der Aktuellen Firmware nicht mehr verwendet zu werden.