/l3/users/bas/2011-03/linux5.unix.bas/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 |
|
#cat /etc/named.
named.caching-nameserver.conf named.rfc1912.zones named.conf named.zones |
#cat /etc/named.zones
zone 'karakol.unix.bas" { type master; file "karakol.unix.bas"; allow-transfer { 192.168.15.1; 192.168.15.5; }; }; zone "aktobe.unix.bas" { type slave; ... }; }; zone "50.168.192.in-addr.arpa" { type master; file "50.in-addr.arpa"; allow-transfer { 192.168.15.1; 192.168.15.5; }; }; |
#cat /var/named/50.in-addr.arpa
$TTL 3h @ SOA linux5.unix.bas. root.linux5.unix.bas. 2011040701 1d 1h 1w 3h NS linux5.unix.bas. NS linux2.unix.bas. 1 PTR host5.aktau.unix.bas. for i in {2..254} do echo "$i PTR host$i.aktau.unix.bas." done for i in range(1,255): print "%s PTR host%s.aktau.unix.bas." % (i,i) |
#cat /var/named/
50.in-addr.arpa data/ named.broadcast named.local aktau.unix.bas localdomain.zone named.ca named.zero chroot/ localhost.zone named.ip6.local slaves/ |
#cat /var/named/aktau.unix.bas
$TTL 3h @ SOA linux5.unix.bas. root.linux5.unix.bas. 2011040701 1d 1h 1w 3h NS linux5.unix.bas. NS linux2.unix.bas. A 192.168.15.5 m1 30 A 192.168.15.1 m2 A 192.168.15.2 m3 A 192.168.15.3 m4 A 192.168.15.4 m5 A 192.168.15.5 hi TXT "salam aleykum from Aktau!" |
#vim /etc/named.zones
|
#vim /var/named/
|
#vim /var/named/aktau.unix.bas
--- /tmp/l3-saved-3774.18145.26089 2011-04-07 16:51:28.000000000 +0600 +++ /var/named/aktau.unix.bas 2011-04-07 16:52:12.000000000 +0600 @@ -1,11 +1,9 @@ $TTL 3h - @ SOA linux5.unix.bas. root.linux5.unix.bas. 2011040701 1d 1h 1w 3h NS linux5.unix.bas. NS linux2.unix.bas. - A 192.168.15.5 -m1 30 A 192.168.15.1 +m1 A 192.168.15.1 m2 A 192.168.15.2 m3 A 192.168.15.3 m4 A 192.168.15.4 |
#vim /var/named/
|
#vim /var/named/50.in-addr.arpa
--- /tmp/l3-saved-3774.24874.22425 2011-04-07 16:52:39.000000000 +0600 +++ /var/named/50.in-addr.arpa 2011-04-07 16:54:46.000000000 +0600 @@ -4,14 +4,14 @@ NS linux5.unix.bas. NS linux2.unix.bas. -1 PTR host5.aktau.unix.bas. +1 PTR host1.aktau.unix.bas. +2 PTR host2.aktau.unix.bas. +3 PTR host3.aktau.unix.bas. +4 PTR host4.aktau.unix.bas. +5 PTR host5.aktau.unix.bas. +6 PTR host6.aktau.unix.bas. +7 PTR host7.aktau.unix.bas. +8 PTR host8.aktau.unix.bas. -for i in {2..254} -do -echo "$i PTR host$i.aktau.unix.bas." -done -for i in range(1,255): - print "%s PTR host%s.aktau.unix.bas." % (i,i) - |
#vim /etc/named.conf
|
#vim /etc/named.zones
--- /tmp/l3-saved-9405.28454.14698 2011-04-07 16:56:33.000000000 +0600 +++ /etc/named.zones 2011-04-07 16:57:13.000000000 +0600 @@ -14,8 +14,8 @@ }; zone "50.168.192.in-addr.arpa" { type master; - file "50.in-addr.arpa"; - allow-transfer { - 192.168.15.5; - }; - + file "50.in-addr.arpa"; + allow-transfer { + 192.168.15.5; + }; +}; |
#vim /etc/named.conf
--- /tmp/l3-saved-9405.15628.25062 2011-04-07 16:57:14.000000000 +0600 +++ /etc/named.conf 2011-04-07 16:57:33.000000000 +0600 @@ -44,16 +44,10 @@ match-destinations { localhost; }; recursion yes; include "/etc/named.rfc1912.zones"; - zone "aktau.unix.bas" { - type master; - file "aktau.unix.bas"; - }; + include "/etc/named.zones"; }; view all { match-clients { any; }; - zone "aktau.unix.bas" { - type master; - file "aktau.unix.bas"; - }; + include "/etc/named.zones"; }; |
#vim /etc/named.zones
|
#~
Stopping xinetd: [ OK ] Starting xinetd: [ OK ] |
#/etc/init.d/named restart
Stopping named: [ OK ] Starting named: [FAILED] |
#tail /var/log/messages
Apr 7 16:57:44 linux5 named[9324]: no longer listening on 127.0.0.1#53 Apr 7 16:57:44 linux5 named[9324]: no longer listening on 192.168.15.5#53 Apr 7 16:57:44 linux5 named[9324]: exiting Apr 7 16:57:46 linux5 named[9559]: starting BIND 9.3.6-P1-RedHat-9.3.6-4.P1.el5_5.3 -u named Apr 7 16:57:46 linux5 named[9559]: found 2 CPUs, using 2 worker threads Apr 7 16:57:46 linux5 named[9559]: using up to 4096 sockets Apr 7 16:57:46 linux5 named[9559]: loading configuration from '/etc/named.conf' Apr 7 16:57:46 linux5 named[9559]: /etc/named.conf:47: open: /etc/named.zones: permission denied Apr 7 16:57:46 linux5 named[9559]: loading configuration: permission denied Apr 7 16:57:46 linux5 named[9559]: exiting (due to fatal error) |
#chgrp named /etc/named.zones
|
#host 192.168.50.1
1.50.168.192.in-addr.arpa domain name pointer host1.aktau.unix.bas. |
#host aktau.unix.bas
aktau.unix.bas has address 192.168.15.5 |
#/etc/init.d/nfs restart
Shutting down NFS mountd: [FAILED] Shutting down NFS daemon: [FAILED] Shutting down NFS quotas: [FAILED] Shutting down NFS services: [FAILED] Starting NFS services: [ OK ] Starting NFS quotas: [ OK ] Starting NFS daemon: [ OK ] Starting NFS mountd: [ OK ] |
#show
showchar showconsolefont showkey showmount showrgb |
#showmount -e
Export list for linux5.unix.bas: /tmp/share 192.168.15.0/24 |
#showmount -e 102.168.15.1
|
#showmount -e 102.168.15.2
|
#showmount -e 102.168.15.3
|
#showmount -e 102.168.15.4
|
#showmount -e 102.168.15.5
|
#exportfs
/tmp/share 192.168.15.0/24 |
#history | grep showm
698 showmount -e 699 showmount -e 102.168.15.1 700 showmount -e 102.168.15.2 701 showmount -e 102.168.15.3 702 showmount -e 102.168.15.4 703 showmount -e 102.168.15.5 705 history | grep showm |
#showmount -a
All mount points on linux5.unix.bas: |
#showmount -d
Directories on linux5.unix.bas: |
#mkdir /mnt/nfs_mnt\
> |
#mkdir /mnt/nfs_mnt
|
#rm -rf /mnt/nfs_mnt
|
#ls /mnt/
data7 data8 data9 nfs |
#yum install ftp
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.space.kz * base: mirror.space.kz * extras: mirror.space.kz * rpmforge: fr2.rpmfind.net * updates: mirror.space.kz http://mirror.space.kz/centos/5.5/addons/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. http://centosf4.centos.org/centos/5.5/addons/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> ... Trying other mirror. http://centosg4.centos.org/centos/5.5/updates/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. http://centosz3-msync-dvd.centos.org/centos/5.5/updates/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. http://ftp.chg.ru/pub/Linux/CentOS/5.5/updates/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. Setting up Install Process Package ftp-0.17-35.el5.x86_64 already installed and latest version Nothing to do |
#yum install ftpd
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.space.kz * base: mirror.space.kz * extras: mirror.space.kz * rpmforge: fr2.rpmfind.net * updates: mirror.space.kz http://mirror.space.kz/centos/5.5/addons/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. http://centosf4.centos.org/centos/5.5/addons/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> ... Trying other mirror. http://centosg4.centos.org/centos/5.5/updates/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. http://centosz3-msync-dvd.centos.org/centos/5.5/updates/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. http://ftp.chg.ru/pub/Linux/CentOS/5.5/updates/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. Setting up Install Process No package ftpd available. Nothing to do |
#yum install vsftpd
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.space.kz * base: mirror.space.kz * extras: mirror.space.kz * rpmforge: fr2.rpmfind.net * updates: mirror.space.kz http://mirror.space.kz/centos/5.5/addons/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. http://centosf4.centos.org/centos/5.5/addons/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> ... http://centosz3-msync-dvd.centos.org/centos/5.5/addons/x86_64/repodata/filelists.xml.gz: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. http://ftp.chg.ru/pub/Linux/CentOS/5.5/addons/x86_64/repodata/filelists.xml.gz: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. Error: failure: repodata/filelists.xml.gz from addons: [Errno 256] No more mirrors to try. You could try using --skip-broken to work around the problem You could try running: package-cleanup --problems package-cleanup --dupes rpm -Va --nofiles --nodigest The program package-cleanup is found in the yum-utils package. |
#yum search vsftpd
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.space.kz * base: mirror.space.kz * extras: mirror.space.kz * rpmforge: fr2.rpmfind.net * updates: mirror.space.kz http://mirror.space.kz/centos/5.5/addons/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. http://centosf4.centos.org/centos/5.5/addons/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> ... Trying other mirror. http://centosg4.centos.org/centos/5.5/updates/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. http://centosz3-msync-dvd.centos.org/centos/5.5/updates/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. http://ftp.chg.ru/pub/Linux/CentOS/5.5/updates/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Trying other mirror. ================================== Matched: vsftpd =================================== pure-ftpd-selinux.x86_64 : SELinux support for Pure-FTPD vsftpd.x86_64 : vsftpd - Very Secure Ftp Daemon |
#/etc/init.d/named start
Starting named: [ OK ] You have new mail in /var/spool/mail/root |
#vim /etc/vsftpd/
--- /tmp/l3-saved-3452.6278.18395 2011-04-05 10:47:05.000000000 +0600 +++ /etc/sysconfig/network-scripts/ifcfg-eth0:0 2011-04-05 10:47:16.000000000 +0600 @@ -1,5 +1,5 @@ # Atheros Communications Atheros AR8121/AR8113/AR8114 PCI-E Ethernet Controller -DEVICE=eth0::0: +DEVICE=eth0:0 BOOTPROTO=none ONBOOT=yes NETMASK=255.255.255.0 |
#vim /etc/vsftpd/vsftpd.conf
--- /tmp/l3-saved-3670.24625.13354 2011-04-08 11:08:28.000000000 +0600 +++ /etc/vsftpd/vsftpd.conf 2011-04-08 11:10:57.000000000 +0600 @@ -86,7 +86,7 @@ # # You may specify a file of disallowed anonymous e-mail addresses. Apparently # useful for combatting certain DoS attacks. -#deny_email_enable=YES +deny_email_enable=YES # (default follows) #banned_email_file=/etc/vsftpd/banned_emails # |
#/etc/init.d/vsftpd status
vsftpd is stopped |
#/etc/init.d/vsftpd start
Starting vsftpd for vsftpd: [ OK ] |
#vim /etc/vsftpd/
|
#vim /etc/vsftpd/ftpusers
|
#lftp 192.168.15.2
lftp 192.168.15.2:~> lftp 192.168.15.2:~> lftp 192.168.15.2:~> lftp 192.168.15.2:~> ls drwxr-xr-x 2 0 0 4096 May 25 2010 pub lftp 192.168.15.2:/> cd /etc cd: Access failed: 550 Failed to change directory. (/etc) lftp 192.168.15.2:/> exit |
#lftp 192.168.15.2
lftp 192.168.15.2:~> exit |
#lftp 192.168.15.1
lftp 192.168.15.1:~> ls drwxr-xr-x 2 0 0 4096 May 25 2010 pub lftp 192.168.15.1:/> ls /etc lftp 192.168.15.1:/> ls / drwxr-xr-x 2 0 0 4096 May 25 2010 pub lftp 192.168.15.1:/> exit |
#lftp user@192.168.15.1
Password: lftp user@192.168.15.1:~> lftp user@192.168.15.1:~> lftp user@192.168.15.1:~> lftp user@192.168.15.1:~> ls drwxrwxr-x 2 500 500 4096 Apr 02 06:26 CentOS-5.5-x86_64-bin-DVD drwxr-xr-x 2 500 500 4096 Apr 06 05:40 Desktop drwx------ 2 500 500 4096 Mar 30 06:06 Mail -rw-rw-r-- 1 500 500 36 Mar 30 10:14 cats -rw-rw-r-- 1 500 500 2061 Mar 30 06:11 cpumem.info ... drwxr-x--- 30 0 0 4096 Apr 08 05:18 root drwxr-xr-x 3 0 0 12288 Apr 07 03:53 sbin drwxr-xr-x 2 0 0 4096 Mar 27 15:55 selinux drwxr-xr-x 2 0 0 4096 Apr 04 08:31 snapdir drwxr-xr-x 2 0 0 4096 Jan 26 2010 srv drwxr-xr-x 12 0 0 0 Apr 08 2011 sys drwxrwxrwt 20 0 0 4096 Apr 08 05:16 tmp drwxr-xr-x 17 0 0 4096 Apr 08 04:43 usr drwxr-xr-x 24 0 0 4096 Apr 08 05:06 var lftp user@192.168.15.1:/> exit |
#get
getafm getent gethostip get_module getpcaps gettext getconf getfacl getkey getopt getproxy gettext.sh getenforce getfattr getkeycodes getopts getsebool |
#getent passwd user
user:x:500:500::/home/user:/bin/bash |
#cat /etc/shells
/bin/sh /bin/bash /sbin/nologin /bin/tcsh /bin/csh /bin/ksh |
#vim /etc/shells
--- /tmp/l3-saved-3670.29112.973 2011-04-08 11:52:08.000000000 +0600 +++ /etc/shells 2011-04-08 11:52:22.000000000 +0600 @@ -4,3 +4,4 @@ /bin/tcsh /bin/csh /bin/ksh +/bin/true |
#sftp 192.168.15.2
Connecting to 192.168.15.2... root@192.168.15.2's password: sftp> sftp> sftp> sftp> ls 033_Unit1.html 111.txt Desktop GRUB ... xgu.ru Ð%97аглавнаÑ%8F_Ñ%81Ñ%82Ñ%80аниÑ%86а Ð%97аглавнаÑ%8F_Ñ%81Ñ%82Ñ%80аниÑ%86а.1 sftp> ls / /bin /boot /data10 /data9 /dev /etc /home /lib /lib64 /lost+found /media /misc /mnt /net /opt /proc /root /sbin /selinux /srv /sys /tmp /usr /var /vol0 /vol0snap /vol1 /vol1snap sftp> exit |
#yum install samba
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.space.kz * base: mirror.space.kz * extras: mirror.space.kz * rpmforge: fr2.rpmfind.net * updates: mirror.space.kz Setting up Install Process Resolving Dependencies --> Running transaction check ... Transaction Summary ====================================================================================== Install 2 Package(s) Upgrade 3 Package(s) Total download size: 30 M Is this ok [y/N]: y Downloading Packages: (1/5): perl-Convert-ASN1-0.20-1.1.noarch.rpm | 42 kB 00:00 (2/5): libsmbclient-3.0.33-3.29.el5_5.1.x86_64.rpm | 916 kB 00:15 (3/5): samba-client-3.0.33-3.29.el5_5.1.x86_64.rpm | 5.7 MB 02:26 |
#chkconfig
chkconfig version 1.3.30.2 - Copyright (C) 1997-2000 Red Hat, Inc. This may be freely redistributed under the terms of the GNU Public License. usage: chkconfig --list [name] chkconfig --add <name> chkconfig --del <name> chkconfig [--level <levels>] <name> <on|off|reset|resetpriorities> |
#chkconfig --list
NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off avahi-daemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off avahi-dnsconfd 0:off 1:off 2:off 3:off 4:off 5:off 6:off bluetooth 0:off 1:off 2:on 3:on 4:on 5:off 6:off capi 0:off 1:off 2:off 3:off 4:off 5:off 6:off ... finger: on gssftp: off klogin: off krb5-telnet: off kshell: off rsync: off tcpmux-server: off telnet: off time-dgram: off time-stream: off |
#chkconfig --list | grep namde
|
#chkconfig --list | grep named
named 0:off 1:off 2:on 3:on 4:on 5:on 6:off |
#export http_proxy=192.168.15.1:3128
|
#export http_proxy=http://192.168.15.1:3128
|
#yum install samba
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.space.kz * base: mirror.space.kz * extras: mirror.space.kz * rpmforge: fr2.rpmfind.net * updates: mirror.space.kz Setting up Install Process Resolving Dependencies --> Running transaction check ... ====================================================================================== Install 2 Package(s) Upgrade 3 Package(s) Total size: 30 M Total download size: 16 M Is this ok [y/N]: y Downloading Packages: samba-3.0.33-3.29.el5_5.1.x86_64.rpm | 2.6 MB 00:15 http://mirror.space.kz/centos/5.5/updates/x86_64/RPMS/samba-3.0.33-3.29.el5_5.1.x86_64.rpm: [Errno 4] Socket Error: (11, 'Resource temporarily unavailable') Trying other mirror. |
#yum install samba
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.space.kz * base: mirror.space.kz * extras: mirror.space.kz * rpmforge: fr2.rpmfind.net * updates: mirror.space.kz Setting up Install Process Resolving Dependencies --> Running transaction check ... Total size: 30 M Total download size: 16 M Is this ok [y/N]: y Downloading Packages: samba-3.0.33-3.29.el5_5.1.x86_64.rpm | 16 MB 04:21 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction |
#set
set setfattr setkeycodes setpci setsid setxkbmap setarch setfiles setleds setquota setsysfont setenforce setfont setmetamode setsebool setterm setfacl setkey setpcaps setserial setup |
#history | grep setxkbmap
29 setxkbmap -layout "us,ru" 31 setxkbmap -option "grp:ctrl_shift_toggle,grp_led:scroll" 545 setxkbmap -layout "us,ru" 546 setxkbmap -option "grp:ctrl_shift_toggle,grp_led:scroll" 703 history | grep setxkbmap |
#ls -l /etc/samba/
total 20 -rw-r--r-- 1 root root 20 Sep 15 2010 lmhosts -rw-r--r-- 1 root root 9733 Sep 15 2010 smb.conf -rw-r--r-- 1 root root 97 Sep 15 2010 smbusers |
#testparm
Load smb config files from /etc/samba/smb.conf Processing section "[homes]" Processing section "[printers]" Loaded services file OK. Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions [global] workgroup = MYGROUP server string = Samba Server Version %v passdb backend = tdbsam cups options = raw [homes] comment = Home Directories read only = No browseable = No [printers] comment = All Printers path = /var/spool/samba printable = Yes browseable = No |
#/etc/init.d/sm
smartd smb |
#/etc/init.d/smb start
Starting SMB services: [ OK ] Starting NMB services: [ OK ] |
#setxkbmap -option "grp:ctrl_shift_toggle,grp_led:scroll"
|
#smb
smbcacls smbcontrol smbd smbpasswd smbspool smbtar smbclient smbcquotas smbget smbprint smbstatus smbtree |
#smbpasswd user
New SMB password: Retype new SMB password: Failed to find entry for user user. Failed to modify password entry for user user |
#rdesktop -U administrator -p rootpass 192.168.15.222
rdesktop: invalid option -- U rdesktop: A Remote Desktop Protocol client. Version 1.6.0. Copyright (C) 1999-2008 Matthew Chapman. See http://www.rdesktop.org/ for more information. Usage: rdesktop [options] server[:port] -u: user name -d: domain -s: shell -c: working directory -p: password (- to prompt) ... example: -r scard:"eToken PRO 00 00"="AKS ifdh 0" "eToken PRO 00 00" -> Device in Linux/Unix enviroment "AKS ifdh 0" -> Device shown in Windows enviroment example: -r scard:"eToken PRO 00 00"="AKS ifdh 0;AKS" "eToken PRO 00 00" -> Device in Linux/Unix enviroment "AKS ifdh 0" -> Device shown in Windows enviroment "AKS" -> Device vendor name -0: attach to console -4: use RDP version 4 -5: use RDP version 5 (default) |
#rdesktop -u administrator -p rootpass 192.168.15.222
Autoselected keyboard map en-us WARNING: Remote desktop does not support colour depth 24; falling back to 16 |
#vin /etc/samba/smb.conf
bash: vin: command not found |
#smbpasswd -a user
New SMB password: Retype new SMB password: Added user user. |
#pdbedit -L user
Username not found! |
#pdbedit -L user
Username not found! |
#mount
/dev/sda1 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/sda6 on /tmp type ext3 (rw) /dev/sda3 on /var type ext3 (rw) /dev/sda2 on /usr type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) /dev/sda7 on /mnt/data7 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) nfsd on /proc/fs/nfsd type nfsd (rw) |
#smbclient //192.168.15.5
\\192.168.15.5: Not enough '\' characters in service Usage: smbclient [-?] [-?EgV] [-?EgV] [-?EgVNkP] [-?|--help] [--usage] [-R|--name-resolve NAME-RESOLVE-ORDER] [-M|--message HOST] [-I|--ip-address IP] [-E|--stderr] [-L|--list HOST] [-t|--terminal CODE] [-m|--max-protocol LEVEL] [-T|--tar <c|x>IXFqgbNan] [-D|--directory DIR] [-c|--command STRING] [-b|--send-buffer BYTES] [-p|--port PORT] [-g|--grepable] [-d|--debuglevel DEBUGLEVEL] [-s|--configfile CONFIGFILE] [-l|--log-basename LOGFILEBASE] [-V|--version] [-O|--socket-options SOCKETOPTIONS] [-n|--netbiosname NETBIOSNAME] [-W|--workgroup WORKGROUP] [-i|--scope SCOPE] [-U|--user USERNAME] [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file FILE] [-S|--signing on|off|required] [-P|--machine-pass] service <password> |
#smbclient -i //192.168.15.5
Usage: smbclient [-?] [-?EgV] [-?EgV] [-?EgVNkP] [-?|--help] [--usage] [-R|--name-resolve NAME-RESOLVE-ORDER] [-M|--message HOST] [-I|--ip-address IP] [-E|--stderr] [-L|--list HOST] [-t|--terminal CODE] [-m|--max-protocol LEVEL] [-T|--tar <c|x>IXFqgbNan] [-D|--directory DIR] [-c|--command STRING] [-b|--send-buffer BYTES] [-p|--port PORT] [-g|--grepable] [-d|--debuglevel DEBUGLEVEL] [-s|--configfile CONFIGFILE] [-l|--log-basename LOGFILEBASE] [-V|--version] [-O|--socket-options SOCKETOPTIONS] [-n|--netbiosname NETBIOSNAME] [-W|--workgroup WORKGROUP] [-i|--scope SCOPE] [-U|--user USERNAME] [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file FILE] [-S|--signing on|off|required] [-P|--machine-pass] service <password> |
#smbclient -i //192.168.15.5/user
Usage: smbclient [-?] [-?EgV] [-?EgV] [-?EgVNkP] [-?|--help] [--usage] [-R|--name-resolve NAME-RESOLVE-ORDER] [-M|--message HOST] [-I|--ip-address IP] [-E|--stderr] [-L|--list HOST] [-t|--terminal CODE] [-m|--max-protocol LEVEL] [-T|--tar <c|x>IXFqgbNan] [-D|--directory DIR] [-c|--command STRING] [-b|--send-buffer BYTES] [-p|--port PORT] [-g|--grepable] [-d|--debuglevel DEBUGLEVEL] [-s|--configfile CONFIGFILE] [-l|--log-basename LOGFILEBASE] [-V|--version] [-O|--socket-options SOCKETOPTIONS] [-n|--netbiosname NETBIOSNAME] [-W|--workgroup WORKGROUP] [-i|--scope SCOPE] [-U|--user USERNAME] [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file FILE] [-S|--signing on|off|required] [-P|--machine-pass] service <password> |
#smbclient -A //192.168.15.5/user
ERROR: Unable to open credentials file! |
#smbclient -A user -p password //192.168.15.5/user
ERROR: Unable to open credentials file! |
#smbclient -A user -p password //192.168.15.5/
ERROR: Unable to open credentials file! |
#smbclient -o username=user,password=password //192.168.15.5
username=user,password=password: Not enough '\' characters in service Usage: smbclient [-?] [-?EgV] [-?EgV] [-?EgVNkP] [-?|--help] [--usage] [-R|--name-resolve NAME-RESOLVE-ORDER] [-M|--message HOST] [-I|--ip-address IP] [-E|--stderr] [-L|--list HOST] [-t|--terminal CODE] [-m|--max-protocol LEVEL] [-T|--tar <c|x>IXFqgbNan] [-D|--directory DIR] [-c|--command STRING] [-b|--send-buffer BYTES] [-p|--port PORT] [-g|--grepable] [-d|--debuglevel DEBUGLEVEL] [-s|--configfile CONFIGFILE] [-l|--log-basename LOGFILEBASE] [-V|--version] [-O|--socket-options SOCKETOPTIONS] [-n|--netbiosname NETBIOSNAME] [-W|--workgroup WORKGROUP] [-i|--scope SCOPE] [-U|--user USERNAME] [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file FILE] [-S|--signing on|off|required] [-P|--machine-pass] service <password> |
#smbclient -o username=user,password=password //192.168.15.5/user
username=user,password=password: Not enough '\' characters in service Usage: smbclient [-?] [-?EgV] [-?EgV] [-?EgVNkP] [-?|--help] [--usage] [-R|--name-resolve NAME-RESOLVE-ORDER] [-M|--message HOST] [-I|--ip-address IP] [-E|--stderr] [-L|--list HOST] [-t|--terminal CODE] [-m|--max-protocol LEVEL] [-T|--tar <c|x>IXFqgbNan] [-D|--directory DIR] [-c|--command STRING] [-b|--send-buffer BYTES] [-p|--port PORT] [-g|--grepable] [-d|--debuglevel DEBUGLEVEL] [-s|--configfile CONFIGFILE] [-l|--log-basename LOGFILEBASE] [-V|--version] [-O|--socket-options SOCKETOPTIONS] [-n|--netbiosname NETBIOSNAME] [-W|--workgroup WORKGROUP] [-i|--scope SCOPE] [-U|--user USERNAME] [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file FILE] [-S|--signing on|off|required] [-P|--machine-pass] service <password> |
#smbclient -o username=user,password=password //192.168.15.5/user
username=user,password=password: Not enough '\' characters in service Usage: smbclient [-?] [-?EgV] [-?EgV] [-?EgVNkP] [-?|--help] [--usage] [-R|--name-resolve NAME-RESOLVE-ORDER] [-M|--message HOST] [-I|--ip-address IP] [-E|--stderr] [-L|--list HOST] [-t|--terminal CODE] [-m|--max-protocol LEVEL] [-T|--tar <c|x>IXFqgbNan] [-D|--directory DIR] [-c|--command STRING] [-b|--send-buffer BYTES] [-p|--port PORT] [-g|--grepable] [-d|--debuglevel DEBUGLEVEL] [-s|--configfile CONFIGFILE] [-l|--log-basename LOGFILEBASE] [-V|--version] [-O|--socket-options SOCKETOPTIONS] [-n|--netbiosname NETBIOSNAME] [-W|--workgroup WORKGROUP] [-i|--scope SCOPE] [-U|--user USERNAME] [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file FILE] [-S|--signing on|off|required] [-P|--machine-pass] service <password> |
#smbclient -o username=Administrator,password=rootpass //192.168.15
username=Administrator,password=rootpass: Not enough '\' characters in service Usage: smbclient [-?] [-?EgV] [-?EgV] [-?EgVNkP] [-?|--help] [--usage] [-R|--name-resolve NAME-RESOLVE-ORDER] [-M|--message HOST] [-I|--ip-address IP] [-E|--stderr] [-L|--list HOST] [-t|--terminal CODE] [-m|--max-protocol LEVEL] [-T|--tar <c|x>IXFqgbNan] [-D|--directory DIR] [-c|--command STRING] [-b|--send-buffer BYTES] [-p|--port PORT] [-g|--grepable] [-d|--debuglevel DEBUGLEVEL] [-s|--configfile CONFIGFILE] [-l|--log-basename LOGFILEBASE] [-V|--version] [-O|--socket-options SOCKETOPTIONS] [-n|--netbiosname NETBIOSNAME] [-W|--workgroup WORKGROUP] [-i|--scope SCOPE] [-U|--user USERNAME] [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file FILE] [-S|--signing on|off|required] [-P|--machine-pass] service <password> |
#ssh user@192.168.15.2
user@192.168.15.2's password: Permission denied, please try again. user@192.168.15.2's password: Permission denied, please try again. user@192.168.15.2's password: Permission denied (publickey,gssapi-with-mic,password). |
#smbclient -o username=Administrator,password=rootpass \\192.168.15
username=Administrator,password=rootpass: Not enough '\' characters in service Usage: smbclient [-?] [-?EgV] [-?EgV] [-?EgVNkP] [-?|--help] [--usage] [-R|--name-resolve NAME-RESOLVE-ORDER] [-M|--message HOST] [-I|--ip-address IP] [-E|--stderr] [-L|--list HOST] [-t|--terminal CODE] [-m|--max-protocol LEVEL] [-T|--tar <c|x>IXFqgbNan] [-D|--directory DIR] [-c|--command STRING] [-b|--send-buffer BYTES] [-p|--port PORT] [-g|--grepable] [-d|--debuglevel DEBUGLEVEL] [-s|--configfile CONFIGFILE] [-l|--log-basename LOGFILEBASE] [-V|--version] [-O|--socket-options SOCKETOPTIONS] [-n|--netbiosname NETBIOSNAME] [-W|--workgroup WORKGROUP] [-i|--scope SCOPE] [-U|--user USERNAME] [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file FILE] [-S|--signing on|off|required] [-P|--machine-pass] service <password> |
/tmp/share 192.168.15.0/24(rw)
zone 'karakol.unix.bas" { type master; file "karakol.unix.bas"; allow-transfer { 192.168.15.1; 192.168.15.5; }; }; zone "aktobe.unix.bas" { type slave; file "slaves/aktobe.unix.bas"; masters { 192.168.15.1; }; }; zone "aktau.unix.bas" { type slave; file "slaves/aktau.unix.bas"; masters { 192.168.15.5; }; }; zone "50.168.192.in-addr.arpa" { type master; file "50.in-addr.arpa"; allow-transfer { 192.168.15.1; 192.168.15.5; }; };
/bin/sh /bin/bash /sbin/nologin /bin/tcsh /bin/csh /bin/ksh
50.in-addr.arpa data/ named.broadcast named.local aktau.unix.bas localdomain.zone named.ca named.zero chroot/ localhost.zone named.ip6.local slaves/
$TTL 3h @ SOA linux5.unix.bas. root.linux5.unix.bas. 2011040701 1d 1h 1w 3h NS linux5.unix.bas. NS linux2.unix.bas. 1 PTR host5.aktau.unix.bas. for i in {2..254} do echo "$i PTR host$i.aktau.unix.bas." done for i in range(1,255): print "%s PTR host%s.aktau.unix.bas." % (i,i)
$TTL 3h @ SOA linux5.unix.bas. root.linux5.unix.bas. 2011040701 1d 1h 1w 3h NS linux5.unix.bas. NS linux2.unix.bas. A 192.168.15.5 m1 30 A 192.168.15.1 m2 A 192.168.15.2 m3 A 192.168.15.3 m4 A 192.168.15.4 m5 A 192.168.15.5 hi TXT "salam aleykum from Aktau!"
Время первой команды журнала | 12:35:33 2011- 4- 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:03:21 2011- 4- 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 28.71 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.91 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.58 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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