Some file system rules for Linux
- /usr should hold only shareable, read-only data (should be able to be mounted R/O)
- /var/run and /tmp should be cleared when the system boots
- /root permissions should be 0700
- /tmp permissions should be 1777
- /sbin permissions should be 0700
- /lib must reside in the same partition as /
The syslog system is configured trough the file /etc/syslog.conf.
This file is made of lines, each with two fields: selector and action, separated by TABs (according to the manual, spaces can be used, but rumour has it the syslogd daemon is broken in this).
The selector field is made of two dot separated parts: facility and priority.
The facility defines the class of the message, and can be...
- auth
- authpriv
- cron
- daemon
- kern
- lpr
- mark (internal use only)
- news
- security (same as auth, deprecated)
- syslog
- user
- uucp
- local0 trough local7
- * (wildcard)
The priority defines the severity of the message, and can be...
- debug
- info
- notice
- warning
- warn (deprecated)
- err
- error (deprecated)
- crit
- alert
- emerg
- panic (deprecated)
- * (wildcard)
- none (no priority for the given facility)
Multiple comma separated facilities can be used in the same selector.
Notes:
- Empty lines are ignored
- Continuation lines are supported, a \ at the end of the line is ignored and makes the following line continue the present
- The lines are processed trough the shell, so wild-cards, back-ticks, etc, can be used
- The pre and post commands aren't executed when the module is loaded or unloaded by kerneld
Command Meaning Examples #....
Comment, ignored keep
Don't drop system path list depfile=DEPFILE_PATH
Path to the system module dependency file, used by modprobe to load modules depending from others. Usually created by depmod depfile=/lib/modules/`uname -r`/modules.dep
path=SOME_PATH
Defines a path where modules are to be searched path=/lib/modules
path[tag]=SOME_PATH
Defines a path where modules are to be searched, under conditions associated with the tag path[fs]=/lib/modules/`uname -r`
options module symbol=value ...
Define options for the given module modprobe de620 bnc=1
alias fake_name real_name
Creates an alias for a module name alias iso9660 isofs
# now you can modprobe iso9660alias module off
Prevents loading of a given module alias net-pf-4 off
# prevents loading of IPXpre-install module command ...
Command is executed before the module is installed install module command ...
Command is executed when the module is installed post-install module command ...
Command is executed after the module is installed pre-remove module command ...
Command is executed before the module is removed remove module command ...
Command is executed when the module is removed post-remove module command ...
Command is executed after the module is removed
Kernel configuration for CD-Writers
Notes:
- Y means the feature must be compiled in the kernel
- M means the feature must be compiled as a module
- Y/M means the feature can be compiled in the kernel or as a module
Section Description Module For SCSI writer For IDE writer For parallel port writer BLOCK Enhanced IDE/MFM/RLL... Y IDE/ATAPI CDROM ide-cd M SCSI hostadaptor emulation ide-scsi M Loopback device loop M M M PARIDE Parallel port IDE device paride Y/M Parallel port ATAPI CD-ROMs M Parallel port generic ATAPI M (select a low-level driver) Y SCSI SCSI support scsi_mod Y/M Y/M SCSI CD-ROM support sr_mod Y/M Y/M Enable vendor-specific Y Y
SCSI generic support sg Y/M Y/M (select a low-level driver) Y FS ISO 9660 CDROM filesystem iso9660 Y Y Y Microsoft Joliet cdrom... joliet M/Y M/Y M/Y
Available signals Signal Value
(- is signal absent)Action Conformance Comment SIGHUP 1 A POSIX.1 Hangup detected on controlling terminal or death of controlling process SIGINT 2 A POSIX.1 Interrupt from keyboard SIGQUIT 3 A POSIX.1 Quit from keyboard SIGILL 4 A POSIX.1 Illegal Instruction SIGABRT 6 C POSIX.1 Abort signal from abort(3) SIGFPE 8 C POSIX.1 Floating point exception SIGKILL 9 AEF POSIX.1 Kill signal SIGSEGV 11 C POSIX.1 Invalid memory reference SIGPIPE 13 A POSIX.1 Broken pipe: write to pipe with no readers SIGALRM 14 A POSIX.1 Timer signal from alarm(2) SIGTERM 15 A POSIX.1 Termination signal SIGUSR1 10 A POSIX.1 User-defined signal 1 SIGUSR2 12 A POSIX.1 User-defined signal 2 SIGCHLD 17 B POSIX.1 Child stopped or terminated SIGCONT 18 POSIX.1 Continue if stopped SIGSTOP 19 DEF POSIX.1 Stop process SIGTSTP 20 D POSIX.1 Stop typed at tty SIGTTIN 21 D POSIX.1 tty input for background process SIGTTOU 22 D POSIX.1 tty output for background process SIGTRAP 5 CG Trace/breakpoint trap SIGIOT 6 CG IOT trap. A synonym for SIGABRT SIGEMT - G SIGBUS 7 AG Bus error SIGSYS - G Bad argument to routine (SVID) SIGSTKFLT 16 AG Stack fault on coprocessor SIGURG 23 BG Urgent condition on socket (4.2 BSD) SIGIO 29 AG I/O now possible (4.2 BSD) SIGPOLL 29 AG A synonym for SIGIO (System V) SIGCLD - G A synonym for SIGCHLD SIGXCPU 24 AG CPU time limit exceeded (4.2 BSD) SIGXFSZ 25 AG File size limit exceeded (4.2 BSD) SIGVTALRM 26 AG Virtual alarm clock (4.2 BSD) SIGPROF 27 AG Profile alarm clock SIGPWR 30 AG Power failure (System V) SIGINFO - G A synonym for SIGPWR SIGLOST - AG File lock lost SIGWINCH 28 BG Window resize signal (4.3 BSD, Sun) SIGUNUSED 31 AG Unused signal Key to action column A Default action is to terminate the process B Default action is to ignore the signal C Default action is to dump core D Default action is to stop the process E Signal cannot be caught F Signal cannot be ignored G Not a POSIX.1 conformant signal
How to disable ping'ing of a host (Kernel 2.1.xx or newer)
- To ignore pings
- echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
- To acknowledge pings
- echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all
How to set 32 bit mode for (E)IDE drives
- To set 32 bit mode
- hdparm -c3 /dev/hdX
- To set 16 bit mode
- hdparm -c0 /dev/hdX
- To test
- hdparm -t /dev/hdX
crontab format (for Dillon's daemon)
crontab file format minutes hour day_of_month month day_of_week command minutes A value; a range (0-59), optionally followed by a slash and a skip factor ; * ; or comma separated values or ranges
- *
- every minute
- 10
- at 10 minutes in the hour
- */15
- every 15 minutes
- 0,20,40
- at 0, 20 and 40 minutes in the hour
- 0-10/2
- every 2 minutes during the first 10 minutes in the hour
hour A value; a range (0-23), optionally followed by a slash and a skip factor ; * ; or comma separated values or ranges similar to minutes, above day_of_month A value; a range (0-31), optionally followed by a slash and a skip factor ; * ; or comma separated values or ranges. When used with day_of_week, the matches are ORed similar to minutes, above month A month name (jan,feb,mar,etc);a range (jan-dec); or comma separated values or ranges
- apr
- During April
- jul-sep
- From July to September
- mar,oct
- In March and October
day_of_week A day name (mon,tue,wed,etc);a range (sun-sat); or comma separated values or ranges similar to months above command Executed with /bin/sh -c; frequently starts with exec, therefore causing the command to replace the shell
Last update: Wed, 2 Nov 2005 10:16:21 GMT | top |