Donnerstag, 28. Februar 2013
I haven't been writing anything here for three years now. It's a long time.
Having reviewed some of the posts from 2008 and 2009 I find that's useful rereading what I have myself written before. Some of the knowledge didn't make into a long-term memory :-)
Anyway, for today I discovered a new option for yum repository configuration files.
includepkgs This is a list of packages you want to use from a repository. If this option lists only one package then that is all yum will ever see from the repository.
This is useful if you want to add external repository because of only one package.
exclude
excludes packages listed.
e.g. exclude=eclipse* kernel
This option is useful if you have a conflict among different packages in your repositories.
Note that if you have multiple exclude configuration lines, only the last one will be valid.
Same is true for any other configuration lines in yum.conf.
This is a limitation of yum, though not a huge one. Postfix, nagios can have multiple lines and they are all valid. Say, in nagios you can have as many configuration directories as you want. And all are valid:
cfg_dir=/etc/nagios/cfgs
cfg_dir=/usr/local/nagios/etc-common
Anyway, for today I discovered a new option for yum repository configuration files.
includepkgs This is a list of packages you want to use from a repository. If this option lists only one package then that is all yum will ever see from the repository.
This is useful if you want to add external repository because of only one package.
exclude
excludes packages listed.
e.g. exclude=eclipse* kernel
This option is useful if you have a conflict among different packages in your repositories.
Note that if you have multiple exclude configuration lines, only the last one will be valid.
Same is true for any other configuration lines in yum.conf.
This is a limitation of yum, though not a huge one. Postfix, nagios can have multiple lines and they are all valid. Say, in nagios you can have as many configuration directories as you want. And all are valid:
cfg_dir=/etc/nagios/cfgs
cfg_dir=/usr/local/nagios/etc-common
Montag, 20. September 2010
Mittwoch, 23. Juni 2010
Donnerstag, 3. Juni 2010
Montag, 22. Februar 2010
Freitag, 19. Februar 2010
Donnerstag, 18. Februar 2010
Dienstag, 16. Februar 2010
Montag, 15. Februar 2010
Donnerstag, 11. Februar 2010
Mittwoch, 10. Februar 2010
Dienstag, 9. Februar 2010
Montag, 8. Februar 2010
Freitag, 5. Februar 2010
Donnerstag, 4. Februar 2010
Dienstag, 2. Februar 2010
Donnerstag, 28. Januar 2010
Mittwoch, 20. Januar 2010
Donnerstag, 14. Januar 2010
Dienstag, 12. Januar 2010
Montag, 11. Januar 2010
Samstag, 12. Dezember 2009
Donnerstag, 10. Dezember 2009
Mittwoch, 9. Dezember 2009
IPADDR_START ..
/etc/sysconfig/network-scripts/ifcfg-eth0-range0
IPADDR_START=192.168.0.100
IPADDR_END=192.168.0.200
CLONENUM_START=1 ---it can be any number. The devices will be numbered starting from it, e.g. if CLONENUM_START=5, then the first will be eth0:5.
IPADDR_START=192.168.0.100
IPADDR_END=192.168.0.200
CLONENUM_START=1 ---it can be any number. The devices will be numbered starting from it, e.g. if CLONENUM_START=5, then the first will be eth0:5.
Dienstag, 8. Dezember 2009
Montag, 7. Dezember 2009
Samstag, 5. Dezember 2009
Freitag, 4. Dezember 2009
ex: ,+5# ---shows line numbers of 5 lines starting from the current one, ,+ 5# --with a space between + and the number, shows file numbers of current AND 5 following lines, i.e. 6 lines in total; +5# ---without comma in front, is not a range and will operate on exatly one line, the fifth from the current one
Donnerstag, 3. Dezember 2009
Mittwoch, 2. Dezember 2009
httpd.conf: AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/x-javascript ---enables compression ..
http://www.gidnetwork.com/tools/gzip-test.php
Dienstag, 1. Dezember 2009
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
Freitag, 30. Oktober 2009
Donnerstag, 29. Oktober 2009
Mittwoch, 28. Oktober 2009
Dienstag, 27. Oktober 2009
Montag, 26. Oktober 2009
Donnerstag, 22. Oktober 2009
Montag, 19. Oktober 2009
Mittwoch, 30. September 2009
Dienstag, 29. September 2009
Montag, 21. September 2009
Freitag, 18. September 2009
Donnerstag, 17. September 2009
rsync -vaze ssh --delete /www/ $dest_ip:/www --progress --bwlimit=1 ||echo "rsync failed"| mail admin@me.com ---note slash at the end of /www/ ..
It makes it be ragarded as the target rather than subdir /www/www
bwlimit default is in KB/sec
bwlimit default is in KB/sec
Mittwoch, 9. September 2009
Donnerstag, 3. September 2009
Mittwoch, 2. September 2009
hardware flow control uses dedicated signal wires such as RTS/CTS or DTR/DSR while software flow control signals by sending DC1 or DC3 control bytes..
in the normal data wires. For hardware flow control, the cable must be correctly wired.
mkisofs -r -b boot.img -c /boot/boot.catalog -o /tmp/cd.image; cdrecord -scanbus; cdrecord -v de=1,0,0 -data /tmp/cd.image ---the boot.catalog file ..
need not already exist. It is generated by mkisofs. The command linke optien just tells mkisofs where in the image to store the generated file.
Montag, 31. August 2009
Montag, 24. August 2009
Freitag, 21. August 2009
Donnerstag, 20. August 2009
Montag, 17. August 2009
Freitag, 14. August 2009
Mittwoch, 17. Juni 2009
bootparam(7): (root,nfsroot,ro,rw,debug,init) -> particular device?? -> environment variable ?? -> argument to process 1
The Argument List
The kernel command line is parsed into a list of strings (boot arguments) separated by spaces. Most of the boot args take the form of:
name[=value_1][,value_2]...[,value_10]
where 'name' is a unique keyword that is used to identify what part of the kernel the associated values (if any) are to be given to. Note the limit of 10 is
real, as the present code only handles 10 comma separated parameters per keyword. (However, you can re-use the same keyword with up to an additional 10
parameters in unusually complicated situations, assuming the setup function supports it.)
Most of the sorting goes on in linux/init/main.c. First, the kernel checks to see if the argument is any of the special arguments 'root=', 'nfsroot=',
'nfsaddrs=', 'ro', 'rw', 'debug' or 'init'. The meaning of these special arguments is described below.
Then it walks a list of setup functions (contained in the bootsetups array) to see if the specified argument string (such as 'foo') has been associated with
a setup function ('foo_setup()') for a particular device or part of the kernel. If you passed the kernel the line foo=3,4,5,6 then the kernel would search
the bootsetups array to see if 'foo' was registered. If it was, then it would call the setup function associated with 'foo' (foo_setup()) and hand it the
arguments 3, 4, 5 and 6 as given on the kernel command line.
Anything of the form 'foo=bar' that is not accepted as a setup function as described above is then interpreted as an environment variable to be set. A (use‐
less?) example would be to use 'TERM=vt100' as a boot argument.
Any remaining arguments that were not picked up by the kernel and were not interpreted as environment variables are then passed onto process one, which is
usually the init program. The most common argument that is passed to the init process is the word 'single' which instructs init to boot the computer in sin‐
gle user mode, and not launch all the usual daemons. Check the manual page for the version of init installed on your system to see what arguments it
accepts.
The kernel command line is parsed into a list of strings (boot arguments) separated by spaces. Most of the boot args take the form of:
name[=value_1][,value_2]...[,value_10]
where 'name' is a unique keyword that is used to identify what part of the kernel the associated values (if any) are to be given to. Note the limit of 10 is
real, as the present code only handles 10 comma separated parameters per keyword. (However, you can re-use the same keyword with up to an additional 10
parameters in unusually complicated situations, assuming the setup function supports it.)
Most of the sorting goes on in linux/init/main.c. First, the kernel checks to see if the argument is any of the special arguments 'root=', 'nfsroot=',
'nfsaddrs=', 'ro', 'rw', 'debug' or 'init'. The meaning of these special arguments is described below.
Then it walks a list of setup functions (contained in the bootsetups array) to see if the specified argument string (such as 'foo') has been associated with
a setup function ('foo_setup()') for a particular device or part of the kernel. If you passed the kernel the line foo=3,4,5,6 then the kernel would search
the bootsetups array to see if 'foo' was registered. If it was, then it would call the setup function associated with 'foo' (foo_setup()) and hand it the
arguments 3, 4, 5 and 6 as given on the kernel command line.
Anything of the form 'foo=bar' that is not accepted as a setup function as described above is then interpreted as an environment variable to be set. A (use‐
less?) example would be to use 'TERM=vt100' as a boot argument.
Any remaining arguments that were not picked up by the kernel and were not interpreted as environment variables are then passed onto process one, which is
usually the init program. The most common argument that is passed to the init process is the word 'single' which instructs init to boot the computer in sin‐
gle user mode, and not launch all the usual daemons. Check the manual page for the version of init installed on your system to see what arguments it
accepts.
Freitag, 5. Juni 2009
Montag, 1. Juni 2009
Sonntag, 31. Mai 2009
Mittwoch, 27. Mai 2009
GNU screen: C-A G ----disables audible bell.
I did not understand that visual bell is a 'feature'. I thought it was a bug. It was the only reason why I did not make a full use of GNU Screen. Now I know.
In xterm the default should be no visual bell. However, you can use `xterm +vb` to explicitely disable it.
In my case visual bell was enabled in /etc/screenrc.
What is interesting, is that any user changes behaviour of all users, of the whole system.
In xterm the default should be no visual bell. However, you can use `xterm +vb` to explicitely disable it.
In my case visual bell was enabled in /etc/screenrc.
What is interesting, is that any user changes behaviour of all users, of the whole system.
Montag, 25. Mai 2009
An analogy of MS/Apple/Linux users came to my mind. Its like wearing clothes. Windows is a warehouse, noname. Mac is a brand like Stones, D&G, Kevin K
lein. Linux is a radioshack. It is a source code. It is materilal from which you can build your own style. Every linux user is different.
Yet another analogy. Cooking food. Mac is a restaurant, Win is junk food (McDonalds), Linux is cook at home (including 'heat this in microwave oven for 3 min and eat').
The word 'linux' can be substituted by {Open,Free,Net,DragonFly}BSD or any other open source project.
Yet another analogy. Cooking food. Mac is a restaurant, Win is junk food (McDonalds), Linux is cook at home (including 'heat this in microwave oven for 3 min and eat').
The word 'linux' can be substituted by {Open,Free,Net,DragonFly}BSD or any other open source project.
Sonntag, 17. Mai 2009
Mittwoch, 6. Mai 2009
Donnerstag, 30. April 2009
"Phreaking wasn't about getting free calls, it was about _how_ to get them, _how_ to make them. It was about the process of _access_. Legend had it ..
that the first phreaks were blind kids who wistled free calls, tuning in to the sounds of the first vast machines and places they could never see. The phreak was to discover and master invisible electronic worlds.
Phreaks routinely complained about evil, monopolistir Ma Bell, but to understand the machine, the network, the telephone system - these were the true goals of the phreaks, a journey that would eventually lead to a better understanding of the world. The first computer hackers brought light to a closed world. Early computers were giant, cumbersome machines tended by priesthood of technicians who processed punch cards, maintained massive air-cooling systems, and replaced the occasional melted vacuum tube.
The first hackers challenged the authority of priesthood and began nudging the computers to life, teaching them to play chess, Ping-Pong, even musir. The cleverly removed superfluous commands so computers would need fewer cards. Hackers at MIT toured telephone central offices and pumped switchmen and engineers for the secrets that would enable them to ride the telephone network for free. They studied lock picking to coax open university doors to examine the computers up close (p11-12)
Phreaks routinely complained about evil, monopolistir Ma Bell, but to understand the machine, the network, the telephone system - these were the true goals of the phreaks, a journey that would eventually lead to a better understanding of the world. The first computer hackers brought light to a closed world. Early computers were giant, cumbersome machines tended by priesthood of technicians who processed punch cards, maintained massive air-cooling systems, and replaced the occasional melted vacuum tube.
The first hackers challenged the authority of priesthood and began nudging the computers to life, teaching them to play chess, Ping-Pong, even musir. The cleverly removed superfluous commands so computers would need fewer cards. Hackers at MIT toured telephone central offices and pumped switchmen and engineers for the secrets that would enable them to ride the telephone network for free. They studied lock picking to coax open university doors to examine the computers up close (p11-12)
Freitag, 24. April 2009
secure mount points: nodev, nesuid,ro,noexec. Noexec is of little use, because it can be easily bypassed by using /lib/ld-linux.so to execute binaries
chroot will not run on such system, because /dev/null and /dev/log
Dienstag, 21. April 2009
I am sitting in front of apollo and launch programs on zeus without SSH: xhost +zeus; export DISPLAY=apollo:0.0.; after you are done type xhost -zeus.
SSH can forward X connections and there's no need for the above steps
GDM: to enable network connections change DisallowTCP=true to DisallowTCP=false
KDM or XDM: both on settings in the Xservers file. Look for a line that begins with :0. This line contains a command that KDM or XDM uses to launch the X server. If this line contains the string -nolisten tcp, remove that string from the line.
X launched from text-mode login: if you log in using text mode and type startx to launch X, you may need to modify the startx script itself, which is usually stored in /usr/bin. Search this script for a string -nolisten tcp. Chances are this string will appear in a variable assignment (such as defaultserverargs) or possibly in a direct call to the X server program. Get rid of the string.
SSH: /etc/ssh_config set ForwardX11 to yes, /etc/sshd_config set X11Forwarding to yes.
GDM: to enable network connections change DisallowTCP=true to DisallowTCP=false
KDM or XDM: both on settings in the Xservers file. Look for a line that begins with :0. This line contains a command that KDM or XDM uses to launch the X server. If this line contains the string -nolisten tcp, remove that string from the line.
X launched from text-mode login: if you log in using text mode and type startx to launch X, you may need to modify the startx script itself, which is usually stored in /usr/bin. Search this script for a string -nolisten tcp. Chances are this string will appear in a variable assignment (such as defaultserverargs) or possibly in a direct call to the X server program. Get rid of the string.
SSH: /etc/ssh_config set ForwardX11 to yes, /etc/sshd_config set X11Forwarding to yes.
Sonntag, 19. April 2009
.Xresources is cousulted when the window manager starts up, whereas .Xdefaults can be used at any time. The format is 'ProgramName*ResourceName:Value'
XTerm*Background: linen
XTerm*Foreground: black
XTerm*Font: 9x15
XTerm*saveLines: 1000
XTerm*geometry: +50+100
XTerm*Foreground: black
XTerm*Font: 9x15
XTerm*saveLines: 1000
XTerm*geometry: +50+100
Samstag, 18. April 2009
SCSI (X3.131-1986), now usually called SCSI-1. This standard has now been withdrawn. Up to 8 devices on a cable, passive termination, 8bits/ch 5MB/sec
The SCSI standard was designed for disks, but is very flexible and was used for other devices, notably scanners and slower devices such as Zip.
FCconnection used a 50 connector cable, originally with Centronics connector, but later with a 50-pin D-shell connector, similal to a DB-25 RS-232 serial connector.
FCconnection used a 50 connector cable, originally with Centronics connector, but later with a 50-pin D-shell connector, similal to a DB-25 RS-232 serial connector.
Standard parallel port assignments: LPT1 378-37F 7; LPT2 278-27F 5; LP* 3BC-3BE _.
Many systems do not use interrupts for printers, so the IRQ may or may not actually be used.
It is not also uncommon to share IRQs for printing and also share IRQ 7 with a sound card (Sound Blaster compatible)
ECP stands for Enhanced capabilites port and is designed for use with printers.
EPP stands for Enhanced Parallel port and is designed for devices such as CD-ROMs and tape drives which require large amounts of information to flow in either direction.
It is not also uncommon to share IRQs for printing and also share IRQ 7 with a sound card (Sound Blaster compatible)
ECP stands for Enhanced capabilites port and is designed for use with printers.
EPP stands for Enhanced Parallel port and is designed for devices such as CD-ROMs and tape drives which require large amounts of information to flow in either direction.
Freitag, 17. April 2009
Dienstag, 14. April 2009
"Block mode" in terminalsthe characters you type are temporarily retained in the terminal memory (and may possibly be edited by a built-in editor at
"Block mode" in terminalsthe characters you type are temporarily retained in the terminal memory (and may possibly be edited by a built-in editor at the terminal). Then when the send key is pressed, a block of characters (sometimes just a line of characters) is send to the computer all at once. Block mode is not supported in Linux.
SCTP (Stream Control Transmission Protocol) has higher reliability than TCP, and at the same time lower overhead from protocol headers.
RFC 3268 - An Introduction to the Stream Control Transmission Protocol
RFC 2960 - Stream Control Transmission Protocol
RFC 2960 - Stream Control Transmission Protocol
find /etc -name '*e*' -size +1k -size -1m
The wildcard must be enclosed in the quotes in order to protect it from expansion by the shell.
The extent size is the same for all volumes in the volume group. The volume group maps the logical extents to physical extents.
LVM: Within a physical volume extents are refered to as physical extents, within a logical volume - as logical extents. The extent size is the same for all volumes in the volume group. The volume group maps the logical extents to physical extents.
Montag, 13. April 2009
x:5:once:/bin/su user0 -c "/bin/bash --login -c startx >/dev/null 2>&1"
Starting X as preferred user without logging in
A way of circumventing display managers and boot straight into preferred window manager or desktop environment is the following.
In /etc/inittab change:
id:3:initdefault:
[...]
x:5:respawn:/usr/bin/xdm -nodaemon
to
id:5:initdefault:
[...]
x:5:once:/bin/su PREFERED_USER -l -c "/bin/bash --login -c startx >/dev/null 2>&1"
A way of circumventing display managers and boot straight into preferred window manager or desktop environment is the following.
In /etc/inittab change:
id:3:initdefault:
[...]
x:5:respawn:/usr/bin/xdm -nodaemon
to
id:5:initdefault:
[...]
x:5:once:/bin/su PREFERED_USER -l -c "/bin/bash --login -c startx >/dev/null 2>&1"
Donnerstag, 9. April 2009
whatismyip: curl -s myip.dk |grep ‘”Box”‘ | egrep -o ‘[0-9.]+’
Finding out your PC’s IP in Linux is a simple matter of typing ifconfig in a Terminal shell. But what if you’re behind a router? Thanks to a simple shell script, you can display your IP in the command line by simply invoking the whatismyip command.
#!/bin/bash
curl -s myip.dk |grep ‘”Box”‘ | egrep -o ‘[0-9.]+’
sudo chmod +x /usr/bin/whatismyip
#!/bin/bash
curl -s myip.dk |grep ‘”Box”‘ | egrep -o ‘[0-9.]+’
sudo chmod +x /usr/bin/whatismyip
rankmirrors - choose the best mirror
Archlinux:
cd /etc/pacman.d/; cp mirrorlist mirrorlist_backup; rankmirrors -n 6 mirrorlist_backup>mirrorlist
Or simply manually put the best servers on top of mirrorlist.
cd /etc/pacman.d/; cp mirrorlist mirrorlist_backup; rankmirrors -n 6 mirrorlist_backup>mirrorlist
Or simply manually put the best servers on top of mirrorlist.
choosing secure password
The goal is to create easy to remember, convertible and secure passwords, so that you can be sure, that only YOU control what goes into and comes out of your different accounts.
This is an approach, you should try: Build passwords using two parts:
* the strong static part with at least 8 characters and
* the changeable part to remember the purpose of the usage
Let’s start with the Static Part:
You can make a password much more secure by mixing different types of characters. Use some uppercase letters along with lowercase letters, numbers and even special characters such as '!' or ';'. Very important is that you have to find a good way to remember it. A good way to do this is to choose the first letters of a sentence that you will remember.
e.g.
Every morning at 7; I kiss my Honey! Ema7;IkmH!
Brayn Adams - Back in the summer of '69 BA-Bitso69
The Changeable Part:
Try to find short terms for the different uses.
e.g.
Hotmail Account hot1 or hot2
Ebay Account ebay or ey
Bank Account
city or cy
My Blog
blog or bg
That’s it! “Glue” both parts together and you have nice passwords for different purposes that you can easily remember.
My bank account: cyEma7;IkmH!
My mail password: hot1Ema7;IkmH!
This is an approach, you should try: Build passwords using two parts:
* the strong static part with at least 8 characters and
* the changeable part to remember the purpose of the usage
Let’s start with the Static Part:
You can make a password much more secure by mixing different types of characters. Use some uppercase letters along with lowercase letters, numbers and even special characters such as '!' or ';'. Very important is that you have to find a good way to remember it. A good way to do this is to choose the first letters of a sentence that you will remember.
e.g.
Every morning at 7; I kiss my Honey! Ema7;IkmH!
Brayn Adams - Back in the summer of '69 BA-Bitso69
The Changeable Part:
Try to find short terms for the different uses.
e.g.
Hotmail Account hot1 or hot2
Ebay Account ebay or ey
Bank Account
city or cy
My Blog
blog or bg
That’s it! “Glue” both parts together and you have nice passwords for different purposes that you can easily remember.
My bank account: cyEma7;IkmH!
My mail password: hot1Ema7;IkmH!
~/.Xresources: *dpi:75 XTerm*background: black XTerm*foreground: green
*dpi:75
XTerm*background: black
XTerm*foreground: green
XTerm*visualBell: false
XTerm*background: black
XTerm*foreground: green
XTerm*visualBell: false
Mittwoch, 8. April 2009
vim windows: z{height} - change height of the window CTRL-W _ - maximize window CTRL-W CTRL-W - change window
z{height} - change height of the window
CTRL-W _ - maximize window
CTRL-W CTRL-W - change window
CTRL-W _ - maximize window
CTRL-W CTRL-W - change window
vim: zt, z., zb, z{height}
zt - show current line in the center of the screen
z. - ~ in the center
zb - ~ in the bottom
z. - ~ in the center
zb - ~ in the bottom
setting dvorak
loadkeys dvorak/dvorak
To make this change permanent, set
KEYMAP=dvorak/dvorak
in /etc/rc.conf.
To convert to dvorak in X, type
setxkbmap dvorak
To make this change permanent, set
Option "XkbLayout" "dvorak"
in the keyboard "InputDevice" section of /etc/X11/XF86Config or /etc/X11/xorg.conf.
If you are using the input hotplugging (evdev) you'll need to make the following changes:
cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/
Edit the resulting file and update the input.xkb.variant entry to look like:
dvorak
Lastly you'll need to set the keyboard model to evdev
setxkbmap -model evdev
To make this change permanent, set
KEYMAP=dvorak/dvorak
in /etc/rc.conf.
To convert to dvorak in X, type
setxkbmap dvorak
To make this change permanent, set
Option "XkbLayout" "dvorak"
in the keyboard "InputDevice" section of /etc/X11/XF86Config or /etc/X11/xorg.conf.
If you are using the input hotplugging (evdev) you'll need to make the following changes:
cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/
Edit the resulting file and update the input.xkb.variant entry to look like:
Lastly you'll need to set the keyboard model to evdev
setxkbmap -model evdev
/usr/bin/setleds -D +num (sets numlock on)
in rc.local:
for vc in /dev/vc/{1..3}; do /usr/bin/setleds -D +num < "$vc"; done
for vc in /dev/vc/{1..3}; do /usr/bin/setleds -D +num < "$vc"; done
recovering lost partition table with gpart
Today when I switched on my Acer Aspire One (which has Archlinux installed) I was particularly pleased to discover that the SD had no valid partition table.
I was pleased because it was an gift for me to learn something new.
Recovery proved to be extremely simple:
gpart -W /dev/mmcblk0 /dev/mmcblk0
I was pleased because it was an gift for me to learn something new.
Recovery proved to be extremely simple:
gpart -W /dev/mmcblk0 /dev/mmcblk0
Montag, 6. April 2009
в Linux любой зомби, потерявший родителя, автоматически усыновляется PID=1 (init) и потом через него может быть убит.
MooSE(Work): трогательные строки из документации по внутреннему устройству Linux:
MooSE(Work): "в Linux любой зомби, потерявший родителя, автоматически усыновляется PID=1 (init) и потом через него может быть убит."
MooSE(Work): верх гуманизма: благотворитель init усыновляет осиротевших зомби...
MooSE(Work): "в Linux любой зомби, потерявший родителя, автоматически усыновляется PID=1 (init) и потом через него может быть убит."
MooSE(Work): верх гуманизма: благотворитель init усыновляет осиротевших зомби...
Sonntag, 5. April 2009
I printed coreutils manual -221pages, and found out that most programs that accept long options recognize unambiguous abbreviations of these options.
for example:
rmdir --ignore-fail-on-none-empty
can be entered simply as rmdir --i
But this is only because there was no other option starting with 'i'. Let us look what would happen if there was. e.g. there are --verbose and --version options. If I enter
rmdir --v
I get
rmdir: option '--v' is ambiguous.
rmdir --ignore-fail-on-none-empty
can be entered simply as rmdir --i
But this is only because there was no other option starting with 'i'. Let us look what would happen if there was. e.g. there are --verbose and --version options. If I enter
rmdir --v
I get
rmdir: option '--v' is ambiguous.
timeout(1)
Sometimes we need to test configuration of some process. And sometimes once we start the process we loose control over the system.
That is the case of Xorg. How can we test configuration?
The problem that I faced was that the keyboard in X did not work.
Solution is simple: timeout seconds command
In the case of xinit (to kill it it after 10sec)it would be:
timeout 10 xinit
Suffixes for time can be used: m, h, d.
That is the case of Xorg. How can we test configuration?
The problem that I faced was that the keyboard in X did not work.
Solution is simple: timeout seconds command
In the case of xinit (to kill it it after 10sec)it would be:
timeout 10 xinit
Suffixes for time can be used: m, h, d.
Mittwoch, 1. April 2009
Если символ входит в таблицу ANSI, то можно его ввести так:
а) Проверьте — горит ли Num Lock (если нет — включите).
б) Нажмите и удерживайте клавишу Alt.
в) На правой цифровой («телефонной») клавиатуре наберите ANSI-код символа (если он начинается с нуля, то его тоже нужно вводить).
г) Отпустите Alt — это приведёт к вставке нужного символа в текущее текстовое поле.
Вот некоторые из полезных кодов (не забывайте — Alt+Код):
* 0150 – (тире)
* 0151 — (длинное тире)
* 0133 … (многоточие)
* 0171 «
* 0187 »
* 0170 Є
* 0160 (неразрывный пробел)
* 0149 •
* 0176 ° (знак градуса)
* 0169 ©
* 0174 ®
* 0177 ±
* 0167 §
* 0134 †
* 0135 ‡
* 0136 €
* 0137 ‹
* 0155 ›
* 0153 ™ (торговая марка)
а) Проверьте — горит ли Num Lock (если нет — включите).
б) Нажмите и удерживайте клавишу Alt.
в) На правой цифровой («телефонной») клавиатуре наберите ANSI-код символа (если он начинается с нуля, то его тоже нужно вводить).
г) Отпустите Alt — это приведёт к вставке нужного символа в текущее текстовое поле.
Вот некоторые из полезных кодов (не забывайте — Alt+Код):
* 0150 – (тире)
* 0151 — (длинное тире)
* 0133 … (многоточие)
* 0171 «
* 0187 »
* 0170 Є
* 0160 (неразрывный пробел)
* 0149 •
* 0176 ° (знак градуса)
* 0169 ©
* 0174 ®
* 0177 ±
* 0167 §
* 0134 †
* 0135 ‡
* 0136 €
* 0137 ‹
* 0155 ›
* 0153 ™ (торговая марка)
Dienstag, 10. März 2009
27:00 I hate to rehash the whole microkernel thing but how do you feel about it now? Do you think it could ever go in that way?
Ah, microkernels. I used to be a lot more more polite about microkernels now that I used to be in these days. I used to think that microkernels had kind of inherent beauty. I think that's what confused a lot of people. A lot of people thought that microkernels were cute and beautiful. And my current thinking on microkernels is that Linux is actually a microkernel. It does everything that should sanely be done in kernel space, and everything that shouldn't seem to be done in kernel space it does in user level service. Well, that's one level of microkernel. The problem of going much further than that is that yes, you simplify the pieces, but what you don't do is that you do not simplify the system. Quite the reverse. What happens in the microkernel is because you simplify the pieces you now have a lot of interaction between pieces. And there fundamentally have to be asynchronous interaction between pieces if you want to get any good performance at all. Which means that you have asynchronous communication between hundreds of different pieces and you've just made your life living hell. Which is fundamental problem of microkernels that the reason for their existence systems, namely simplicity, isn't actually true. And then you also find that when you add a lot of communication you slow down the problem space... to counteract that you actually make the pieces complicated again in order to get back the performance you lost. Now this is why I think for example that all the traditional microkernels like this are stupid.
This doesn't necessarily mean that distributed systems are stupid. There's two things here and sometimes people seem to be equating microkernels with distributed systems. It's perfectly sane to have a real kernel on lots of machines and then take communication where you have to take communication between the machines. And there you can't avoid it. Well, you can avoid it by having SMP and NUMA. And actually you should take SMP and NUMA as far as you can, but at some point you just can't go any further. And whet you have you take communication, then you do it until you reach some point. But you communicate as soon as possible until that point. That's my strong opinion and I think that computer science as it came to operating system did most of what should've been done in the sixties. And everything else was mental masturbation
42:40 Fragmentation drives development. Because those different people with different agendas.
46:20 It doesn't actually matter what you do. If you are doing it with a good group of people it's gonna be good.
47:00 How do you decide what to include in the kernel? - who's a good maintainer. That's probably the most common reason.
48:50 I am completely disorganized. I'm actually the least organized person I know. Despite that there has to be this invisible guiding hand. ...
55:00 What editor and mail program do you use? The editor is microemacs, the best editor ever made. And vi and GNU Emacs suck, suck. Now I've alienated everybody in the audience. For e-mail I actuall use pine.
56:00 I hate maintaining the stable kernel.
Freitag, 20. Februar 2009
Sonntag, 23. November 2008
постоянное совершенствование
IA> Если админ не знает, что нужно улучшыть -- то это плохой админ.
AN> То есть хэппи энд не предвидится? Всю жизнь до глубокой пенсии улучшай да улучшай и не минутки пива отвыпить?
VW> Это как игра в тетрис. Выиграть нельзя, можно только продержаться подольше.
VW> Потому что тетрис - это замечательная модель борьбы с хаосом, каковым системное администрирование и является.
AN> То есть хэппи энд не предвидится? Всю жизнь до глубокой пенсии улучшай да улучшай и не минутки пива отвыпить?
VW> Это как игра в тетрис. Выиграть нельзя, можно только продержаться подольше.
VW> Потому что тетрис - это замечательная модель борьбы с хаосом, каковым системное администрирование и является.
Donnerstag, 6. November 2008
требования ОС к железу
Для работы Windows 3.х достаточно процессора с тактовой частотой менее 10 мегагерц, 640 килобайт оперативной памяти и семь мегабайт на жестком диске. Также для Windows 3.х необходима видеокарта, поддерживающая стандарты CGA, EGA и VGA.
Donnerstag, 23. Oktober 2008
Mittwoch, 22. Oktober 2008
ease of use
If every programmer had to be concerned with how disk drives work, and with all the dozens of things that can go wrong when reaing a disk block, it is unlikely that many programs could be written at all.
Andrew S.Tanenbaum
Andrew S.Tanenbaum
Montag, 6. Oktober 2008
when is the next Friday Ocober 25?
y=2005; while [ $y -le 2020 ];do cal -m october $y;y=$(($y+1));done|grep '21 22 23 24 25 26 27' -B5
Sonntag, 14. September 2008
Freitag, 5. September 2008
Mittwoch, 27. August 2008
emacs
.."always keep on principle in mind: Emacs does many things well, but it isn't important for that reason. Emacs is important because of the integration of different things you need to do.
(Learning GNU Emacs, Third edition by Debra Cameron, James Elliott, Marc Loy, Eric Raymond, and Bill Rosenblatt @2005 O'Reilly Media, Inc.)
Mittwoch, 28. Mai 2008
solaris printing
lpadmin -o protocol={bsd|tcp} -o dest=printer:queue-or-port -m netstandard{_foomatic}
Abonnieren
Posts (Atom)
