Kategoriarkiv: Knowledge Base

Change timezone on Debian boxes

Current default timezone: ‘Europe/Copenhagen’ Local time is now: Mon Jun 25 13:51:47 CEST 2007. Universal Time is now: Mon Jun 25 11:51:47 UTC 2007. Run ‘dpkg-reconfigure tzdata’ if you wish to change it.

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Recover MySQL root password

/etc/init.d/mysql stop /usr/bin/mysqld_safe –skip-grant-tables –skip-networking & mysql -u root use mysql; UPDATE user SET Password=PASSWORD(“your password here”) WHERE User=”root”; exit # kill all the mysql processes /etc/init.d/mysql stop # Start MySQL again /etc/init.d/mysql start

Udgivet i Knowledge Base, Old Base, SQL | Skriv en kommentar

Tool for recovering broken harddisk…and stuff like that

http://www.cgsecurity.org/wiki/TestDisk

Udgivet i Knowledge Base, Old Base | Skriv en kommentar

Dualscreen med x200 paa debian med aabne drivere

Section “Files” FontPath “/usr/share/fonts/X11/misc” FontPath “/usr/X11R6/lib/X11/fonts/misc” FontPath “/usr/share/fonts/X11/cyrillic” FontPath “/usr/X11R6/lib/X11/fonts/cyrillic” FontPath “/usr/share/fonts/X11/100dpi/:unscaled” FontPath “/usr/X11R6/lib/X11/fonts/100dpi/:unscaled” FontPath “/usr/share/fonts/X11/75dpi/:unscaled” FontPath “/usr/X11R6/lib/X11/fonts/75dpi/:unscaled” FontPath “/usr/share/fonts/X11/Type1” FontPath “/usr/X11R6/lib/X11/fonts/Type1” FontPath “/usr/share/fonts/X11/100dpi” FontPath “/usr/X11R6/lib/X11/fonts/100dpi” FontPath “/usr/share/fonts/X11/75dpi” FontPath “/usr/X11R6/lib/X11/fonts/75dpi” # path to defoma fonts FontPath “/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType” EndSection Section “Module” … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Parse dhcpd.leases and return all active leases

#!/usr/bin/php <? $fh=fopen(“/chroot/dhcp/var/lib/dhcp/dhcpd.leases”,”r”); while ($dat=fgets($fh)) { if (preg_match(“/lease/”,$dat)) { $active=false; $ip = preg_split(“/ /”,$dat);$ip=$ip[1]; $dat=fgets($fh); while (!preg_match(“/hardware ethernet/”,$dat)) { if (preg_match(“/binding state active/”,$dat)) { $active=true; } $dat=fgets($fh); } $mac = preg_split(“/ |;/”,$dat); $mac=$mac[4]; if ($active) { print $ip.” – “.$mac.”\n”; … Læs resten

Udgivet i Apache, Knowledge Base, Old Base, PHP | Skriv en kommentar

Opsætning af pmacct på debian

pmacct og mysql installeres via apt. i mysql oprettes databasen pmacct og brugeren pmacct@localhost med koden pmacct: create database pmacct; grant all privileges on pmacct.* to pmacct@localhost identified by ‘pmacct’; følgende config bruges: (/etc/pmacct/pmacctd.conf) ! pmacctd configuration ! ! ! … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

SSH Pre-login banner

/etc/issue.ssh should contain the banner: web01:~# cat /etc/issue.ssh This is a Level2 system web01:~# and add: Banner /etc/issue.ssh to /etc/ssh/sshd_config then sighup

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Novell NetWare 6.5 administration

To switch console, use ctrl+esc. To set up TCP/IP load the following module from the System Console: inetcfg To set up a printer, load the following modules: broker ndpsm (These should start automatically) hpgate ndpsgw To reboot, type ‘reset server’ … Læs resten

Udgivet i Knowledge Base, Networking, Old Base | Skriv en kommentar

Klientel anvendelse af CVS (pserver)

— Remote anvendelse: Log ind på CVS Serveren og log herefter ind på remote maskinen med flg. kommando: # ssh web01.mcs.bz -R 2401:127.0.0.1:2401 Herefter kan CVS Serveren tilgåes fra web01 ved at connecte til localhost port 2401, trafik mellem CVS … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

D-Link DFE-570TX

This is a 4 Port NIC Card from D-Link, the systems sees it as a DEC-21152(But on the board/chip itself it says Intel 21152) this is in fact a PCI Bridge which bridges to 4 PCI Nic’s which again Linux … Læs resten

Udgivet i Knowledge Base, Networking, Old Base | Skriv en kommentar