Jun 27
2013
/interface wireless registration-table print oid
Pozycja strength=.1.3.6.1.4.1.14988.1.1.1.2.1.3.0.12.66.102.90.117.18 daje nam poszukiwany OID – czyli dostęp do wartości siły sygnału odbieranego na danym (numer 0) interfejsie radiowym. Zapamiętujemy ten ciąg znaków.
Polecenie:
snmpget -v 1 -Cf -c password 192.168.100.110 .1.3.6.1.4.1.14988.1.1.1.2.1.3.0.12.66.102.90.117.18
zwróci nam siłę sygnału.
Apr 12
2013
Polecenie:
sfc /scannow
Skanuje chronione pliki systemowe i zastępuje niepoprawne wersje plików poprawnymi wersjami firmy MIcrosoft.
Mar 14
2013
Dodaj kod do
/usr/share/fail2ban/server/datedetector.py
# AAMMJJ HH:MM:SS
template = DateStrptime()
template.setName("YearMonthDay Hour:Minute:Second")
template.setRegex("\d{2}\d{2}\d{2} \d{2}:\d{2}:\d{2}")
template.setPattern("%y%m%d %H:%M:%S")
self.__templates.append(template)
# cat /etc/fail2ban/filter.d/mysqld.conf
Fail2Ban configuration file
#
# Author: Darel
#
[Definition]
failregex = Access denied for user ‘.*’@’‘
Dec 10
2012
perl -MCPAN -e shell
install CPANPLUS
exit
perl -MCPANPLUS -e shell
help
[General]
h | ? # display help
q # exit
v # version information
[Search]
a AUTHOR … # search by author(s)
m MODULE … # search by module(s)
f MODULE … # list all releases of a module
o [ MODULE … ] # list installed module(s) that aren’t up to date
w # display the result of your last search again
[Operations]
i MODULE | NUMBER … # install module(s), by name or by search number
i URI | … # install module(s), by URI (ie http://foo.com/X.tgz)
t MODULE | NUMBER … # test module(s), by name or by search number
u MODULE | NUMBER … # uninstall module(s), by name or by search number
d MODULE | NUMBER … # download module(s)
l MODULE | NUMBER … # display detailed information about module(s)
r MODULE | NUMBER … # display README files of module(s)
c MODULE | NUMBER … # check for module report(s) from cpan-testers
z MODULE | NUMBER … # extract module(s) and open command prompt in it
[Local Administration]
b # write a bundle file for your configuration
s program [OPT VALUE] # set program locations for this session
s conf [OPT VALUE] # set config options for this session
s mirrors # show currently selected mirrors
Dec 5
2012
DELIMITER |
CREATE TRIGGER `klienci_before_insert` BEFORE INSERT ON `klienci`
FOR EACH ROW
set NEW.sha1 = sha1(NEW.klient_id+NEW.time_add);
|
DELIMITER ;
Jun 21
2012
CLRA:
1) factory reset: EPG + REC + STRZAŁKA W GÓRE
2) hard reset: EPG + RES + STRZAŁKA W DÓŁ
BSLA/BZZB:
1) factory reset: EPG + REC+ STRZAŁKA W GÓRE
2) hard reset: EPG + RES + STRZAŁKA W PRAWO
May 25
2012
mdadm -v –create /dev/md1 –level=raid10 –raid-devices=4 /dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2
pvcreate /dev/md1
vgcreate vg-server1 /dev/md1
lvcreate -L4g -nlv-home vg-server1
lvcreate -L2g -nlv-var vg-server1
lvcreate -L1g -nlv-tmp vg-server1
The -L option specifies the size of the volume
lvcreate -l 100%FREE -nlv-home vg (creates all of the unallocated space in the volume group)
reducing volume to 100GB (not for XFS filesystem!)
- umount /dev/vg-server1/lv-zapas
- e2fsck -f /dev/vg-server1/lv-zapas
- resize2fs -p /dev/vg-server1/lv-zapas 100G
- lvreduce -L 100G /dev/vg-server1/lv-zapas
- e2fsck -f /dev/vg-server1/lv-zapas
- resize2fs -p /dev/vg-server1/lv-zapas
- e2fsck -f /dev/vg-server1/lv-zapas
- mount /dev/vg-server1/lv-zapas
extending volume up to 100GB (not for XFS filesystem !)
- umount /dev/vg-server1/lv-home
- lvextend -L 100G /dev/vg-server1/lv-home or ( lvextend -l +100%FREE /dev/vg-server1/lv-home)
- e2fsck -f /dev/vg-server1/lv-home
- resize2fs -p /dev/vg-server1/lv-home
- e2fsck -f /dev/vg-server1/lv-home
- mount /dev/vg-server1/lv-home
extending volume + 1GB
lvextend -L+1G /dev/vg-server1/lv-var
May 25
2012
Boot from any Live CD
mkdir /myraid
mount /dev/md0 /myraid
mount /dev/sda1 /myraid/boot
mount –bind /dev /myraid/dev
mount -t devpts devpts /myraid/dev/pts
mount -t proc proc /myraid/proc
mount -t sysfs sysfs /myraid/sys
chroot /myraid
lilo
exit