Montag, 30. November 2009
Freitag, 27. November 2009
Mittwoch, 25. November 2009
Dienstag, 24. November 2009
Montag, 23. November 2009
grep 'a b' 44 ..
user@system3:/tmp$grep 'a
> b' 44
aa bb
aabb
user@system3:/tmp$grep 'ab' 44
aabb
user@system3:/tmp$grep 'a b' 44
aa bb
user@system3:/tmp$sudo -i^C
user@system3:/tmp$cat 44
aa bb
aabb
> b' 44
aa bb
aabb
user@system3:/tmp$grep 'ab' 44
aabb
user@system3:/tmp$grep 'a b' 44
aa bb
user@system3:/tmp$sudo -i^C
user@system3:/tmp$cat 44
aa bb
aabb
Freitag, 20. November 2009
Things to take with when going out:
Contact Phone numbers, address and map, keys or whatever is required to get in
Warm jacket
Rescuecd, rescueusb
Laptop with tftpd, dhcpd
3g modem
Cable cat5 cross
cable com-to-usb
Screwdriver
RSA keys
presents
more business cards than usual
phone friends to tell you will be around
Warm jacket
Rescuecd, rescueusb
Laptop with tftpd, dhcpd
3g modem
Cable cat5 cross
cable com-to-usb
Screwdriver
RSA keys
presents
more business cards than usual
phone friends to tell you will be around
Mittwoch, 18. November 2009
Dienstag, 17. November 2009
Montag, 16. November 2009
Donnerstag, 12. November 2009
Mittwoch, 11. November 2009
Dienstag, 10. November 2009
selinux: setsebool -P allow_httpd_anon_write=1 ..
SHARING FILES
If you want to share files with multiple domains (Apache, FTP, rsync,
Samba), you can set a file context of public_content_t and public_con-
tent_rw_t. These context allow any of the above domains to read the
content. If you want a particular domain to write to the public_con-
tent_rw_t domain, you must set the appropriate boolean.
allow_DOMAIN_anon_write. So for httpd you would execute:
setsebool -P allow_httpd_anon_write=1
If you want to share files with multiple domains (Apache, FTP, rsync,
Samba), you can set a file context of public_content_t and public_con-
tent_rw_t. These context allow any of the above domains to read the
content. If you want a particular domain to write to the public_con-
tent_rw_t domain, you must set the appropriate boolean.
allow_DOMAIN_anon_write. So for httpd you would execute:
setsebool -P allow_httpd_anon_write=1
Montag, 9. November 2009
Freitag, 6. November 2009
Mittwoch, 4. November 2009
awk 'END {print NR }' /etc/group ---shows the number of the last line in the file
# awk 'END {print NR }' /etc/group
80
# wc /etc/group
80 80 1150 /etc/group
80
# wc /etc/group
80 80 1150 /etc/group
nt: ipconfig /displaydns |more ; ipconfig /flushdns
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services|Dnscache\Parameters
DWORD:MaxCacheEntryTtlLimit
Value:14400 ---this is in seconds. 14400 is 4 hours.
DWORD:MaxCacheEntryTtlLimit
Value:14400 ---this is in seconds. 14400 is 4 hours.
hostapd.conf ..
/etc/hostapd.conf:
interface=ath0
bridge=br0
driver=madwifi //generic linux driver is wext
debug=0
ssid=my-net
macaddr_acl=0
auth_algs=3
wpa=1
wpa_psk_file==eth/hostapd_wpa_psk
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
/etc/hostapd_wpa_psk:
00:00:00:00:00:00 password_for_any_client //all zeros direct to accept all MAC addresses.
11:22:33:44:55:66 waylongpassword
10:20:30:40:50:60 another_password_for_another_client
/etc/wpa_supplicant.conf:
network={
ssid="my-net"
psk="waylongpassword" //it takes time to compute it each time. To save that time use wpa_password to encrypt passphrase, and then copy result into place
pairwise=CCMP //much stronger than RC4 that is default WEP
group=CCMP
ky_mgmt=WPA-PSK
wpa_supplicant -iath0 -c/etc/wpa_supplicant.conf -Dmadwifi -w
to make it permanent on debian and call wpa_supplicant automatically:
/etc/network/interfaces:
auto ath0
iface ath0 inet dhcp
pre-up wpa_supplacant -iath0 -Dmadwifi -Bw -c/etc/wpa_supplicant/wpa_supplicant.conf
post-down killall -q wpa_supplicant
interface=ath0
bridge=br0
driver=madwifi //generic linux driver is wext
debug=0
ssid=my-net
macaddr_acl=0
auth_algs=3
wpa=1
wpa_psk_file==eth/hostapd_wpa_psk
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
/etc/hostapd_wpa_psk:
00:00:00:00:00:00 password_for_any_client //all zeros direct to accept all MAC addresses.
11:22:33:44:55:66 waylongpassword
10:20:30:40:50:60 another_password_for_another_client
/etc/wpa_supplicant.conf:
network={
ssid="my-net"
psk="waylongpassword" //it takes time to compute it each time. To save that time use wpa_password to encrypt passphrase, and then copy result into place
pairwise=CCMP //much stronger than RC4 that is default WEP
group=CCMP
ky_mgmt=WPA-PSK
wpa_supplicant -iath0 -c/etc/wpa_supplicant.conf -Dmadwifi -w
to make it permanent on debian and call wpa_supplicant automatically:
/etc/network/interfaces:
auto ath0
iface ath0 inet dhcp
pre-up wpa_supplacant -iath0 -Dmadwifi -Bw -c/etc/wpa_supplicant/wpa_supplicant.conf
post-down killall -q wpa_supplicant
ifcfg-eth: ..
DEVICE=eth
ONBOOT=yes
BOOTPROTO=dhcp
HWADDR=11.22.33.44.55.66
DHCP_HOSTNAME=sergey
TYPE=wireless
PEERDNS=yes
MODE=managed
RATE=auto
ONBOOT=yes
BOOTPROTO=dhcp
HWADDR=11.22.33.44.55.66
DHCP_HOSTNAME=sergey
TYPE=wireless
PEERDNS=yes
MODE=managed
RATE=auto
Dienstag, 3. November 2009
wireless bridge configuration: /etc/network/interfaces ..
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
address 192.168.1.0
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
bridge_ports ath0 eth0
post-down wlanconfig ath0 destroy
pre-up wlanconfig ath9 create wlandev wifi0 wlanmode ap
pre-up iwconfig ath0 essid "alrac-net" channel 01 rate auto
pre-up ifconfig ath0 up
pre-up sleep 3
iface lo inet loopback
auto br0
iface br0 inet static
address 192.168.1.0
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
bridge_ports ath0 eth0
post-down wlanconfig ath0 destroy
pre-up wlanconfig ath9 create wlandev wifi0 wlanmode ap
pre-up iwconfig ath0 essid "alrac-net" channel 01 rate auto
pre-up ifconfig ath0 up
pre-up sleep 3
Montag, 2. November 2009
mysql postinstall: set password for root@localhost=password('secret'); delete form mysql.user where user=''; delete from mysql.db where user=''..
Grant select on *.*to sergey@localhost identified by'secret';
OR
grant all on db1.*to serega@localhost identified by 'great_secret';
OR
grant all on db1.*to serega@localhost identified by 'great_secret';
slapd.conf: loglevel 296 --- -1 all loging information, 0 - no logging i, 1-trace function calls; 2 -packet handling debugging i; 4- heavy trace deb..
8 - connection management
32 -search filter processing
64 - configuration file processing
128 - access control list processing
256 - statistics for connection, operations, and results
512 - statistics for results returned to clients
1024 - communication with shell backends
2048 - print entry debug information
All i is loggedusing the LOG_LEVEL4 syslog facility.
Add the following to /etc/rsyslog.conf and killall -HUP syslogd
local4.debug /var/log/slapd.log
32 -search filter processing
64 - configuration file processing
128 - access control list processing
256 - statistics for connection, operations, and results
512 - statistics for results returned to clients
1024 - communication with shell backends
2048 - print entry debug information
All i is loggedusing the LOG_LEVEL4 syslog facility.
Add the following to /etc/rsyslog.conf and killall -HUP syslogd
local4.debug /var/log/slapd.log
mutt: set folder="imaps://username@example.com" set spoolfile="imaps://username@example.com/INBOX" If you don’t feel like typing in your password every time you can also put it there: set imap_pass="mypassword" Also, my favorite line which disables that annoying Mutt prompt that asks if you want to move the read mail messages: set mbox="!"
ssh: Host is anything and hostname is the real name
Host Short_Name
HostName some_host.com
User domain\username
Protocol 2
UseRsh no
IdentityFile ~/.ssh/KEY
HostName some_host.com
User domain\username
Protocol 2
UseRsh no
IdentityFile ~/.ssh/KEY
Abonnieren
Posts (Atom)
