Donnerstag, 5. November 2009

Veränderungen an .bashrc einlesen

Aus der MAN Page von bash:

source filename arguments
Read and execute commands from filename in the current shell environment
and return the exit status of the last command executed from filename. If
filename does not contain a slash, file names in PATH are used to find the
directory containing filename. The file searched for in PATH need not be
executable. When bash is not in posix mode, the current directory is
searched if no file is found in PATH. If the sourcepath option to the shopt
builtin command is turned off, the PATH is not searched. If any arguments
are supplied, they become the positional parameters when filename is
executed. Otherwise the positional parameters are unchanged. The return
status is the status of the last command exited within the script (0 if no
commands are executed), and false if filename is not found or cannot be
read.

Einlesen der veränderten .bashrc

source .bashrc

Dienstag, 27. Oktober 2009

Donnerstag, 8. Oktober 2009

Drupal retten

Tja - wer zuviele Themes und zu viele Optionen auf einmal ausprobiert
(oder zu schnell hintereinander) landet im dümmsten Fall auf einer
leeren Seite. Wie man in diesem Fall doch wieder sein Drupal zurück
bekommt, steht hier:

http://www.drupalcenter.de/handbuch/11551

Die Anleitung funktioniert nämlich nicht nur für abgeschossene Module,
sondern auch für Themes.

Montag, 5. Oktober 2009

Chemierechner

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and
945GT Express Memory Controller Hub (rev 03)
Subsystem: Dell Device 01c2
Flags: bus master, fast devsel, latency 0
Capabilities: [e0] Vendor Specific Information <?>
Kernel driver in use: agpgart-intel
Kernel modules: intel-agp

00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS,
943/940GML Express Integrated Graphics Controller (rev 03)
Subsystem: Dell Device 01c2
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at dff00000 (32-bit, non-prefetchable) [size=512K]
I/O ports at eff8 [size=8]
Memory at c0000000 (32-bit, prefetchable) [size=256M]
Memory at dfec0000 (32-bit, non-prefetchable) [size=256K]
Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Queue=0/0
Enable-
Capabilities: [d0] Power Management version 2
Kernel modules: intelfb

00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME,
943/940GML Express Integrated Graphics Controller (rev 03)
Subsystem: Dell Device 01c2
Flags: bus master, fast devsel, latency 0
Memory at dff80000 (32-bit, non-prefetchable) [size=512K]
Capabilities: [d0] Power Management version 2

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High
Definition Audio Controller (rev 01)
Subsystem: Dell Device 01c2
Flags: bus master, fast devsel, latency 0, IRQ 21
Memory at dfebc000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0
Enable-
Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
Capabilities: [100] Virtual Channel <?>
Capabilities: [130] Root Complex Link <?>
Kernel driver in use: HDA Intel
Kernel modules: snd-hda-intel

00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port
1 (rev 01)
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=0b, subordinate=0b, sec-latency=0
Capabilities: [40] Express Root Port (Slot+), MSI 00
Capabilities: [80] Message Signalled Interrupts: Mask- 64bit- Queue=0/0
Enable+
Capabilities: [90] Subsystem: Gammagraphx, Inc. (or missing ID) Device
0000
Capabilities: [a0] Power Management version 2
Capabilities: [100] Virtual Channel <?>
Capabilities: [180] Root Complex Link <?>
Kernel driver in use: pcieport-driver
Kernel modules: shpchp

00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port
2 (rev 01)
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=0c, subordinate=0c, sec-latency=0
Memory behind bridge: dfd00000-dfdfffff
Capabilities: [40] Express Root Port (Slot+), MSI 00
Capabilities: [80] Message Signalled Interrupts: Mask- 64bit- Queue=0/0
Enable+
Capabilities: [90] Subsystem: Dell Device 01c2
Capabilities: [a0] Power Management version 2
Capabilities: [100] Virtual Channel <?>
Capabilities: [180] Root Complex Link <?>
Kernel driver in use: pcieport-driver
Kernel modules: shpchp

00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port
3 (rev 01)
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=09, subordinate=09, sec-latency=0
Memory behind bridge: dfc00000-dfcfffff
Capabilities: [40] Express Root Port (Slot+), MSI 00
Capabilities: [80] Message Signalled Interrupts: Mask- 64bit- Queue=0/0
Enable+
Capabilities: [90] Subsystem: Dell Device 01c2
Capabilities: [a0] Power Management version 2
Capabilities: [100] Virtual Channel <?>
Capabilities: [180] Root Complex Link <?>
Kernel driver in use: pcieport-driver
Kernel modules: shpchp

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI
Controller #1 (rev 01)
Subsystem: Dell Device 01c2
Flags: bus master, medium devsel, latency 0, IRQ 20
I/O ports at bf80 [size=32]
Kernel driver in use: uhci_hcd

00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI
Controller #2 (rev 01)
Subsystem: Dell Device 01c2
Flags: bus master, medium devsel, latency 0, IRQ 21
I/O ports at bf60 [size=32]
Kernel driver in use: uhci_hcd

00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI
Controller #3 (rev 01)
Subsystem: Dell Device 01c2
Flags: bus master, medium devsel, latency 0, IRQ 22
I/O ports at bf40 [size=32]
Kernel driver in use: uhci_hcd

00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI
Controller #4 (rev 01)
Subsystem: Dell Device 01c2
Flags: bus master, medium devsel, latency 0, IRQ 23
I/O ports at bf20 [size=32]
Kernel driver in use: uhci_hcd

00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI
Controller (rev 01) (prog-if 20)
Subsystem: Dell Device 01c2
Flags: bus master, medium devsel, latency 0, IRQ 20
Memory at ffa80000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Debug port: BAR=1 offset=00a0
Kernel driver in use: ehci_hcd

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
(prog-if 01)
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=03, subordinate=07, sec-latency=32
I/O behind bridge: 00002000-00002fff
Memory behind bridge: 8c000000-91ffffff
Prefetchable memory behind bridge: 0000000088000000-000000008bffffff
Capabilities: [50] Subsystem: Dell Device 01c2

00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface
Bridge (rev 01)
Subsystem: Dell Device 01c2
Flags: bus master, medium devsel, latency 0
Capabilities: [e0] Vendor Specific Information <?>
Kernel modules: iTCO_wdt, intel-rng

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA
IDE Controller (rev 01) (prog-if 80 [Master])
Subsystem: Dell Device 01c2
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 17
I/O ports at 01f0 [size=8]
I/O ports at 03f4 [size=1]
I/O ports at 0170 [size=8]
I/O ports at 0374 [size=1]
I/O ports at bfa0 [size=16]
Capabilities: [70] Power Management version 2
Kernel driver in use: ata_piix

00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev
01)
Subsystem: Dell Device 01c2
Flags: medium devsel, IRQ 11
I/O ports at 10c0 [size=32]
Kernel modules: i2c-i801

03:01.0 CardBus bridge: O2 Micro, Inc. OZ601/6912/711E0
CardBus/SmartCardBus Controller (rev 40)
Subsystem: Dell Device 01c2
Flags: bus master, stepping, slow devsel, latency 168, IRQ 18
Memory at 90000000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=03, secondary=04, subordinate=07, sec-latency=176
Memory window 0: 88000000-8bfff000 (prefetchable)
Memory window 1: 8c000000-8ffff000
I/O window 0: 00002000-000020ff
I/O window 1: 00002400-000024ff
16-bit legacy interface ports at 0001
Kernel driver in use: yenta_cardbus
Kernel modules: yenta_socket

09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5752 Gigabit
Ethernet PCI Express (rev 02)
Subsystem: Dell Device 01c2
Flags: bus master, fast devsel, latency 0, IRQ 2299
Memory at dfcf0000 (64-bit, non-prefetchable) [size=64K]
Expansion ROM at <ignored> [disabled]
Capabilities: [48] Power Management version 2
Capabilities: [50] Vital Product Data <?>
Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+ Queue=0/3
Enable+
Capabilities: [d0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [13c] Virtual Channel <?>
Kernel driver in use: tg3
Kernel modules: tg3

0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan]
Network Connection (rev 02)
Subsystem: Intel Corporation Device 1021
Flags: bus master, fast devsel, latency 0, IRQ 2300
Memory at dfdff000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [c8] Power Management version 2
Capabilities: [d0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0
Enable+
Capabilities: [e0] Express Legacy Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [140] Device Serial Number cd-aa-aa-ff-ff-02-13-00
Kernel driver in use: iwl3945
Kernel modules: iwl3945

Passwortschutz

.htaccess anlegen

AuthType Basic
AuthName "Protected Area"
AuthUserFile /pfad/zu/einer/datei/ausserhalb/dokumentroot/datei.name
require valid-user

Besser: Eintrag in die conf des Apachen (Performance):

<Directory /pfad/zum/zu/schuetzenden/ordner>
Options Indexes FollowSymLinks
DirectoryIndex index.php
AuthType Basic
AuthName "Protected Area"
AuthUserFile /pfad/zu/einer/datei/ausserhalb/dokumentroot/datei.name
require valid-user

[...]

sudo htpasswd -c /pfad/zu/einer/datei/ausserhalb/dokumentroot/datei.name
benutzername

Samstag, 3. Oktober 2009

System härten

Link:
http://johker.ibutho.de/2009/03/18/der-neue-server-teil-2-system-harten/

nmapping home

Starting Nmap 4.53 ( http://insecure.org ) at 2009-10-03 20:23 CEST
SCRIPT ENGINE: rpcinfo.nse is not a file.
SCRIPT ENGINE: Aborting script scan.
Interesting ports on p3XX0355A.dip.t-dialin.net (62.224.53.XX):
Not shown: 1712 filtered ports
PORT STATE SERVICE VERSION
80/tcp open http Apache httpd 2.2.8 ((Ubuntu) PHP/5.2.4-2ubuntu5.7
with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g)
443/tcp open ssl/http Apache httpd 2.2.8 ((Ubuntu) PHP/5.2.4-2ubuntu5.7
with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g)
Warning: OSScan results may be unreliable because we could not find at
least 1 open and 1 closed port
Device type: firewall
Running: IPCop Linux 2.4.X
OS details: IPCop firewall 1.4.10 - 1.4.15 (Linux 2.4.31 - 2.4.34)

TRACEROUTE (using port 80/tcp)
HOP RTT ADDRESS
1 0.07 p3XX0355A.dip.t-dialin.net (62.224.53.XX)

OS and Service detection performed. Please report any incorrect results
at http://insecure.org/nmap/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 21.593 seconds