Операционная система Linux

wvdialrc Scanning your serial ports


[root@localhost root]# wvdialconf Usage: wvdialconf (create/update a wvdial.conf file automatically) [root@localhost root]# wvdialconf . wvdialrc Scanning your serial ports for a modem. Port Scan<*1>: Scanning ttyS4 first, /dev/modem is a link to it. . . . ttyS4<*1>: Modem Identifier: ATI -- Xircom CardBus 10/100+Modem 56 (Revision 2.40) . . . ttyS4<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK ircomm0<*1>: ATQ0 V1 E1 -- failed at 9600 and 19200 baud. . . . ircomm9<*1>: ATQ0 V1 E1 -- failed at 9600 and 19200 baud. Port Scan<*1>: LT0 . . . ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up. . . . ttyS1<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up. Port Scan<*1>: S2 S3 S5 S6 S7 S8 S10 . . . Port Scan<*1>: USB11 USB12 USB13 USB14 USB15 Found a modem on /dev/ttyS4, using link /dev/modem in config. Modem configuration written to .wvdialrc. ttyS4: Speed 115200; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
Пример 12.1. Кудесник wvdialconf
Закрыть окно

methody@localhost:~ $ cat .vimrc so $VIMRUNTIME/vimrc_example.vim " Some mappings map :wall!^M map! ^O:wall!^M " Tune up set shiftwidth=2 tabstop=8 history=200 viminfo=' 50 set showmode showmatch showcmd ruler modeline set autoindent ignorecase smartcase set nohlsearch noincsearch set dir=/var/tmp set wildmode=list:longest,full set wildmenu " Colouring syntax on colorscheme desert
Пример 12.2. Настройки редактора vim
Закрыть окно

methody@localhost:~ $ cat .i18n LANG=ru_RU.KOI8-R LANGUAGE=ru_RU.KOI8-R SYSFONTACM=koi8-r SYSFONT=UniCyr_8x16 DICTIONARY=russian MPAGE="-CKOI8-R" export DICTIONARY MPAGE
Пример 12.3. Файл настройки языковых особенностей
Закрыть окно



root@localhost:~> cat .wvdialrc [Dialer Defaults] Modem = /dev/modem Baud = 115200 Init1 = ATZ Init2 = ATQ0 L0 M4 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Auto DNS = on Modem Type = Analog Modem [Dialer hotspace] Phone = 0123456 Username = fireman Password = Fire!Fire! TOnline = true [Dialer warlock] Phone = 0246813 Username = cop-120 Password = gimmethegun Force Address=10.0.0.120
Пример 12.4. Секционированный конфигурационный файл
Закрыть окно

methody@localhost:~ $ cat /etc/man.conf . . . # NOCACHE keeps man from creating cache pages ("cat pages") # (generally one enables/disable cat page creation by # creating/deleting the directory they would live in – man # never does mkdir) # # NOCACHE # The command "man -a xyzzy" will show all man pages for xyzzy. # When CMP is defined man will try to avoid showing the same # text twice. (But compressed pages compare unequal.) # CMP /usr/bin/cmp -s . . .
Пример 12.5. Самодокументированный конфигурационный файл
Закрыть окно

methody@localhost:~ $ cat /etc/passwd root:x:0:0:System Administrator:/root:/bin/bash bin:x:1:1:bin:/:/dev/null daemon:x:2:2:daemon:/:/dev/null adm:x:3:4:adm:/var/adm:/dev/null lp:x:4:7:lp:/var/spool/lpd:/dev/null . . . nobody:x:99:99:Nobody:/var/nobody:/dev/null shogun:x:400:400:Лев Гуревич:/home/shogun:/bin/zsh methody:x:503:503:Мефодий Кашин:/home/methody:/bin/bash methody@localhost:~ $ cat /etc/group root:x:0:root bin:x:1:root,bin,daemon daemon:x:2:root,bin,daemon sys:x:3:root,bin,adm adm:x:4:root,adm,daemon,shogun wheel:x:10:root,shogun . . . proc:x:19:root,shogun shogun:x:400: methody:x:503:
Пример 12. 6. Файлы /etc/passwd и /etc/group
Закрыть окно

[root@localhost root]# useradd -g users -G proc,cdrom -c "Incognito" incognito [root@localhost root]# id incognito uid=504(incognito) gid=100(users) groups=100(users),19(proc),22(cdrom) [root@localhost root]# userdel -r incognito [root@localhost root]# id incognito id: incognito: No such user
Пример 12.7. Добавление и удаление пользователя
Закрыть окно

[root@localhost root]# ls /etc/pam.d chpasswd groupdel other system-auth userdel chpasswd-newusers groupmod passwd system-auth- use_first_pass usermod crond login sshd user-group-mod groupadd newusers su useradd
Пример 12.8. Подключаемые модули идентификации (PAM)
Закрыть окно

[root@localhost root]# cat /etc/pam.d/login auth include system-auth auth required pam_nologin.so account include system-auth password include system-auth session include system-auth session optional pam_console.so [root@localhost root]# cat /etc/pam.d/system-auth auth required pam_tcb.so shadow count= 8 nullok account required pam_tcb.so shadow password required pam_tcb.so use_authtok shadow count=8 write_to=tcb session required pam_tcb.so
Пример 12.9. Настройка PAM для login
Закрыть окно

[root@localhost root]# cat /etc/syslog.conf *.notice;mail.err;authpriv.err /var/log/messages authpriv.*;auth.* /var/log/security.log *.emerg * *.* /dev/tty12 mail.info /var/log/maillog
Пример 12.10. Настройка системных журналов
Закрыть окно

[root@localhost root]# cat /etc/crontab #minute (0-59), #| hour (0-23), #| | day of the month (1-31), #| | | month of the year (1-12), #| | | | day of the week (0-6 with 0=Sunday). #| | | | | user #| | | | | | commands 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly
Пример 12.11. Настройка cron
Закрыть окно

[root@localhost root]# ls /etc/cron. daily 000anacron logrotate makewhatis osec stmpclean updatedb
Пример 12.12. Сценарии, запускаемые ежедневно
Закрыть окно

[root@localhost root]# ls -l /var/log/syslog/messages* -rw-r----- 1 root adm 292654 Dec 15 14:01 /var/log/syslog/messages -rw-r----- 1 root adm 34452 Dec 13 01:09 /var/log/syslog/messages.1.bz2 -rw-r----- 1 root adm 35892 Dec 6 09:38 /var/log/syslog/messages.2.bz2 -rw-r----- 1 root adm 60806 Nov 28 10:59 /var/log/syslog/messages.3.bz2 -rw-r----- 1 root adm 61063 Nov 21 10:47 /var/log/syslog/messages.4.bz2 -rw-r----- 1 root adm 60079 Nov 14 21:18 /var/log/syslog/messages.5.bz2
Пример 12.13. Системный журнал messages
Закрыть окно

methody@localhost:~ $ ls bin cat.info cat. stderr Documents examples grep.info textfile tmp methody@localhost:~ $ ls -AF .alias .bashrc .emacs .inputrc~ textfile .Xauthority .bash_history bin/ examples/ .lpoptions tmp/ .xsession.d/ .bash_logout cat.info grep.info .pinerc .viminfo .bash_profile cat.stderr .i18n .pyhistory .vimrc .bash_profile~ Documents/ .inputrc .pythonstartup .vimrc~ methody@localhost:~ $ rm .*~
Пример 12.14. Конфигурационные файлы в домашнем каталоге
Закрыть окно

methody@localhost:~ $ cat . pythonstartup import atexit, os, readline, rlcompleter historyPath = os.path.expanduser("~/.pyhistory") def save_history(historyPath=historyPath): import readline readline.write_history_file(historyPath) if os.path.exists(historyPath): readline.read_history_file(historyPath) atexit.register(save_history) del os, atexit, readline, rlcompleter, save_history, historyPath
Пример 12.15. Стартовый файл интерпретатора Python
Закрыть окно
Содержание раздела