/l3/users/clint/unix-win/linux1.linux.nt/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
#cat /etc/samba/smb.conf
# the default order is "host lmhosts wins bcast". "host" means use the unix # system gethostbyname() function call that will use either /etc/hosts OR # DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf # and the /etc/resolv.conf file. "host" therefore is system configuration # dependant. This parameter is most often of use to prevent DNS lookups # in order to resolve NetBIOS names to IP Addresses. Use with care! # The example below excludes use of name resolution for machines that are NOT # on the local network segment # - OR - are not deliberately to be known via lmhosts or via WINS. ; name resolve order = wins lmhosts bcast ... # sticky bit set on it to prevent abuse. Obviously this could be extended to # as many users as required. ;[myshare] ; comment = Mary's and Fred's stuff ; path = /usr/somewhere/shared ; valid users = mary fred ; public = no ; writable = yes ; printable = no ; create mask = 0765 |
#cat /etc/samba/smb.conf | grep "wins|domaine"
|
#cat /etc/samba/smb.conf | egrep -i "wins|domaine"
# the default order is "host lmhosts wins bcast". "host" means use the unix # - OR - are not deliberately to be known via lmhosts or via WINS. ; name resolve order = wins lmhosts bcast # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server wins support = no # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both wins server = 192.168.15.2 # WINS Proxy - Tells Samba to answer name resolution queries on # behalf of a non WINS capable client, for this to work there must be # at least one WINS Server on the network. The default is NO. ; wins proxy = yes |
#cat /etc/samba/smb.conf | egrep -i "wins|domain"
# workgroup = NT-Domain-Name or Workgroup-Name # Domain Master specifies Samba to be the Domain Master Browser. This # if you already have a Windows NT domain controller doing this job domain master = no # Enable this if you want Samba to be a domain logon server for ; domain logons = yes # if you enable domain logons then you may want a per-machine or # the default order is "host lmhosts wins bcast". "host" means use the unix # - OR - are not deliberately to be known via lmhosts or via WINS. ; name resolve order = wins lmhosts bcast # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server wins support = no # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both wins server = 192.168.15.2 # WINS Proxy - Tells Samba to answer name resolution queries on # behalf of a non WINS capable client, for this to work there must be # at least one WINS Server on the network. The default is NO. ; wins proxy = yes # Un-comment the following and create the netlogon directory for Domain Logons |
#cat /etc/samba/smb.conf | egrep -i "wins|master"
# set local master to no if you don't want Samba to become a master ; local master = no # OS Level determines the precedence of this server in master browser # Domain Master specifies Samba to be the Domain Master Browser. This domain master = no # Preferred Master causes Samba to force a local browser election on startup preferred master = no # the default order is "host lmhosts wins bcast". "host" means use the unix # - OR - are not deliberately to be known via lmhosts or via WINS. ; name resolve order = wins lmhosts bcast # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server wins support = no # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both wins server = 192.168.15.2 # WINS Proxy - Tells Samba to answer name resolution queries on # behalf of a non WINS capable client, for this to work there must be # at least one WINS Server on the network. The default is NO. ; wins proxy = yes |
#cat /etc/samba/smb.conf | egrep -i "wins|master|local"
# connections to machines which are on your local network. The # Cause this host to announce itself to local subnets here # set local master to no if you don't want Samba to become a master ; local master = no # OS Level determines the precedence of this server in master browser # Domain Master specifies Samba to be the Domain Master Browser. This domain master = no # Preferred Master causes Samba to force a local browser election on startup preferred master = no # the default order is "host lmhosts wins bcast". "host" means use the unix ... ; name resolve order = wins lmhosts bcast # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server wins support = no # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both wins server = 192.168.15.2 # WINS Proxy - Tells Samba to answer name resolution queries on # behalf of a non WINS capable client, for this to work there must be # at least one WINS Server on the network. The default is NO. ; wins proxy = yes |
#cat /etc/samba/smb.conf | egrep -i "wins|master|local" | e
domain master = no preferred master = no wins support = no wins server = 192.168.15.2 |
#cat /etc/samba/smb.conf | egrep -i "wins|master|local" | egrep
-v "^#\ *" ; local master = no domain master = no preferred master = no ; name resolve order = wins lmhosts bcast wins support = no wins server = 192.168.15.2 ; wins proxy = yes |
#vim /etc/
|
#vim /etc/samba/smb
|
#vim /etc/samba/smb
|
#vim /etc/samba/smbpasswd
|
#cat /etc/samba/smb.conf | egrep -i "wins|master|local"
|
#vim /etc/samba/smb.conf
|
#vim /etc/vimrc
29c29 < set hlsearch --- > set nohlsearch |
#vim /etc/samba/smb.conf
186a187,192 > [sharename1] > comment = comment > browseable = yes > writable = yes > > |
#vim /etc/samba/smb.conf
189,190c189,191 < browseable = yes < writable = yes --- > path = /pub > browseable = yes > writable = no |
#vim /etc/samba/smb.conf
21c21 < server string = Samba Serzhix --- > server string = Файл сервер |
#/etc/init.d/smb restart
Останавливаются службы SMB: [ ОК ] Останавливаются службы NMB: [ ОК ] Запускаются сервисы SMB: [ ОК ] Запускаются сервисы NMB: [ ОК ] |
#vim /etc/samba/smb.conf
0a1,6 > #Russian Comments > dos charset = cp866 > unix charset = utf-8 > display charset = utf-8 > > |
#/etc/init.d/smb restart
Останавливаются службы SMB: [ ОК ] Останавливаются службы NMB: [ ОК ] Запускаются сервисы SMB: [ ОК ] Запускаются сервисы NMB: [ ОК ] |
#vim /etc/samba/smb.conf
|
#/etc/init.d/smb restart
Останавливаются службы SMB: [ ОК ] Останавливаются службы NMB: [ ОК ] Запускаются сервисы SMB: [ ОК ] Запускаются сервисы NMB: [ ОК ] |
#/etc/init.d/smb restart
Останавливаются службы SMB: [ ОК ] Останавливаются службы NMB: [ ОК ] Запускаются сервисы SMB: [ ОК ] Запускаются сервисы NMB: [ ОК ] |
#vim /etc/samba/smb.conf
|
# nmblookup -M WORKGROUP
querying WORKGROUP on 192.168.15.255 192.168.15.101 WORKGROUP<1d> |
# nmblookup -M WORKGROUP
querying WORKGROUP on 192.168.15.255 192.168.15.101 WORKGROUP<1d> |
# nmblookup -M WORKGROUP
querying WORKGROUP on 192.168.15.255 192.168.15.101 WORKGROUP<1d> |
# nmblookup -M WORKGROUP
querying WORKGROUP on 192.168.15.255 192.168.15.101 WORKGROUP<1d> |
# nmblookup -M WORKGROUP
querying WORKGROUP on 192.168.15.255 192.168.15.101 WORKGROUP<1d> |
# nmblookup -M WORKGROUP
querying WORKGROUP on 192.168.15.255 192.168.15.101 WORKGROUP<1d> |
# nmblookup -M WORKGROUP
querying WORKGROUP on 192.168.15.255 192.168.15.101 WORKGROUP<1d> |
# nmblookup -M WORKGROUP
querying WORKGROUP on 192.168.15.255 192.168.15.101 WORKGROUP<1d> |
# nmblookup -M WORKGROUP
querying WORKGROUP on 192.168.15.255 192.168.15.101 WORKGROUP<1d> |
# nmblookup -M WORKGROUP
querying WORKGROUP on 192.168.15.255 192.168.15.101 WORKGROUP<1d> |
# nmblookup -M WORKGROUP
querying WORKGROUP on 192.168.15.255 192.168.15.101 WORKGROUP<1d> |
# nmblookup -M WORKGROUP
querying WORKGROUP on 192.168.15.255 192.168.15.101 WORKGROUP<1d> |
#mount
/dev/hdb1 on / type ext3 (rw,errors=remount-ro) proc on /proc type proc (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) usbfs on /proc/bus/usb type usbfs (rw) /dev/hdb6 on /var type ext3 (rw) /dev/hdb8 on /tmp type ext3 (rw) /dev/hdb9 on /usr type ext3 (rw) /dev/hdb7 on /home type ext3 (rw) /dev/hdb10 on /vmware type ext3 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) 192.168.15.254:/ftp/pub/ on /pub type nfs (rw,nfsvers=2,addr=192.168.15.254) /dev/hdb11 on /vmware.bsd type ext3 (rw) |
##rsync -auv 192.168.15.3:/vmware.bsd/ /vmware.bsd/
|
# nmblookup -M WORKGROUP
querying WORKGROUP on 192.168.15.255 192.168.15.103 WORKGROUP<1d> |
#nmblookup -M MYGROUP
querying MYGROUP on 192.168.15.255 192.168.15.2 MYGROUP<1d> |
#vim /etc/resolv.conf
|
#vim /etc/hostn
|
#vim /etc/host
|
#vim /etc/hosts
2c2 < 192.168.15.3 linux3.linux.nt --- > 192.168.15.1 linux1.linux.nt |
#hostname
linux1.linux.nt |
#vim /etc/hosts
|
##rsync -auv 192.168.15.3:/vmware.bsd/ /vmware.bsd/
|
#vim /etc/samba/smb.conf
|
#vim /etc/samba/smb.conf
|
#smbclient -L 192.168.15.1
Password: Anonymous login successful Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.0.8-1asp] Sharename Type Comment --------- ---- ------- sharename1 Disk comment IPC$ IPC IPC Service (Файл сервер) ADMIN$ IPC IPC Service (Файл сервер) Anonymous login successful Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.0.8-1asp] Server Comment --------- ------- LINUX1 Файл сервер LINUX2 Workgroup Master --------- ------- MYGROUP LINUX2 |
#ssh -f -N -R 29000:127.0.0.1:22 clint@77.122.243.6
The authenticity of host '77.122.243.6 (77.122.243.6)' can't be established. RSA key fingerprint is 0d:93:be:e9:93:ea:cd:4a:dd:84:ae:80:97:4c:26:f7. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '77.122.243.6' (RSA) to the list of known hosts. Welcome! Debian GNU/Linux testing/unstable Linux 2.6.18-3-xen-686 i686 GNU/Linux clint@77.122.243.6's password: |
#ssh clint@77.122.243.6
Connection to 77.122.243.6 closed. |
#ssh -f -N -R 29000:127.0.0.1:22 77.122.243.6
|
#ssh clint@77.122.243.6
Welcome! Debian GNU/Linux testing/unstable Linux 2.6.18-3-xen-686 i686 GNU/Linux clint@77.122.243.6's password: clint:Dom0~$ ssh 127.0.0.1 -p 29000 -l root WARNING: DSA key found for host 127.0.0.1 in /home/clint/.ssh/known_hosts:8 DSA key fingerprint 80:40:2d:07:09:f7:83:02:33:f0:4d:ee:29:96:9d:c8. The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established but keys of different type are already known for this host. RSA key fingerprint is 23:21:f2:8f:e7:03:3e:eb:c2:2b:e1:da:6c:d1:2b:d2. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '127.0.0.1' (RSA) to the list of known hosts. root@127.0.0.1's password: Last login: Mon Feb 19 15:57:37 2007 from 192.168.15.254 l3-agent is already running: pid=4993; pidfile=/root/.lilalo/l3-agent.pid |
#exit
Connection to 77.122.243.6 closed. |
#vim /etc/samba/smb.conf
|
#crontab -e
~ ~ ~ ~ ~ ~ ~ ~ ~ "crontab.8845" 1L, 114C written crontab: installing new crontab |
#crontab -e
~/tmp/crontab.8854" 1L, 114C ~ ~ ~ ~ ~ ~ ~ ~ ~ crontab: no changes made to crontab |
#ssh clint@77.122.243.6
Connection to 77.122.243.6 closed. You have new mail in /var/spool/mail/root |
#mail
Mail version 8.1 6/6/93. Type ? for help. "/var/spool/mail/root": 4 messages 2 new 4 unread U 1 user@linux3.linux.nt Sat Feb 26 16:24 17/801 "*** SECURITY information fo" U 2 root@linux3.linux.nt Sun Feb 27 12:35 353/17897 "LogWatch for linux3.linux.n" >N 3 root@linux1.linux.nt Mon Feb 19 16:10 19/751 "Anacron job 'cron.daily'" N 4 root@linux1.linux.nt Mon Feb 19 17:27 31/1216 "Cron <root@linux1> ssh 77.1" & 4 Message 4: From root@linux1.linux.nt Mon Feb 19 17:27:04 2007 Date: Mon, 19 Feb 2007 17:27:02 +0200 ... Linux 2.6.18-3-xen-686 i686 GNU/Linux Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,password). & At EOF & q^H^H^H^[[3~^[[3~q Unknown command: "q Saved 1 message in mbox Held 3 messages in /var/spool/mail/root |
#crontab -e
~ ~ ~ ~ ~ ~ ~ ~ ~ "crontab.8901" 1L, 115C written crontab: installing new crontab |
# the default order is "host lmhosts wins bcast". "host" means use the unix # system gethostbyname() function call that will use either /etc/hosts OR # DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf # and the /etc/resolv.conf file. "host" therefore is system configuration # dependant. This parameter is most often of use to prevent DNS lookups # in order to resolve NetBIOS names to IP Addresses. Use with care! # The example below excludes use of name resolution for machines that are NOT # on the local network segment # - OR - are not deliberately to be known via lmhosts or via WINS. ; name resolve order = wins lmhosts bcast # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server wins support = no # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both wins server = 192.168.15.2 # WINS Proxy - Tells Samba to answer name resolution queries on # behalf of a non WINS capable client, for this to work there must be # at least one WINS Server on the network. The default is NO. ; wins proxy = yes # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names # via DNS nslookups. The built-in default for versions 1.9.17 is yes, # this has been changed in version 1.9.18 to no. dns proxy = no # Case Preservation can be handy - system default is _no_ # NOTE: These can be set on a per share basis ; preserve case = no ; short preserve case = no # Default case is normally upper case for all DOS files ; default case = lower # Be very careful with case sensitivity - it can break things! ; case sensitive = no #============================ Share Definitions ============================== [homes] comment = Home Directories browseable = no writable = yes # Un-comment the following and create the netlogon directory for Domain Logons ; [netlogon] ; comment = Network Logon Service ; path = /home/netlogon ; guest ok = yes ; writable = no ; share modes = no # Un-comment the following to provide a specific roving profile share # the default is to use the user's home directory ;[Profiles] ; path = /home/profiles ; browseable = no ; guest ok = yes # NOTE: If you have a BSD-style print system there is no need to # specifically define each individual printer [printers] comment = All Printers path = /var/spool/samba browseable = no # Set public = yes to allow user 'guest account' to print guest ok = no writable = no printable = yes # This one is useful for people to share files ;[tmp] ; comment = Temporary file space ; path = /tmp ; read only = no ; public = yes # A publicly accessible directory, but read only, except for people in # the "staff" group ;[public] ; comment = Public Stuff ; path = /home/samba ; public = yes ; read only = yes ; write list = @staff # Other examples. # # A private printer, usable only by fred. Spool data will be placed in fred's # home directory. Note that fred must have write access to the spool directory, # wherever it is. ;[fredsprn] ; comment = Fred's Printer ; valid users = fred ; path = /homes/fred ; printer = freds_printer ; public = no ; writable = no ; printable = yes # A private directory, usable only by fred. Note that fred requires write # access to the directory. ;[fredsdir] ; comment = Fred's Service ; path = /usr/somewhere/private ; valid users = fred ; public = no ; writable = yes ; printable = no # a service which has a different directory for each machine that connects # this allows you to tailor configurations to incoming machines. You could # also use the %u option to tailor it by user name. # The %m gets replaced with the machine name that is connecting. ;[pchome] ; comment = PC Directories ; path = /usr/pc/%m ; public = no ; writable = yes # A publicly accessible directory, read/write to all users. Note that all files # created in the directory by users will be owned by the default user, so # any user with access can delete any other user's files. Obviously this # directory must be writable by the default user. Another user could of course # be specified, in which case all files would be owned by that user instead. ;[public] ; path = /usr/somewhere/else/public ; public = yes ; only guest = yes ; writable = yes ; printable = no # The following two entries demonstrate how to share a directory so that two # users can place files there that will be owned by the specific users. In this # setup, the directory should be writable by both users and should have the # sticky bit set on it to prevent abuse. Obviously this could be extended to # as many users as required. ;[myshare] ; comment = Mary's and Fred's stuff ; path = /usr/somewhere/shared ; valid users = mary fred ; public = no ; writable = yes ; printable = no ; create mask = 0765
Время первой команды журнала | 15:44:36 2007- 2-19 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 17:28:00 2007- 2-19 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 62 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 11.29 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 0.96 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.08 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008