/l3/users/bas/2011-03/linux5.unix.bas/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 |
|
#find / -name "*.png" -not -user student
/var/www/icons/up.png /var/www/icons/f.png /var/www/icons/world1.png /var/www/icons/bomb.png /var/www/icons/text.png /var/www/icons/portal.png /var/www/icons/generic.png /var/www/icons/sound2.png /var/www/icons/c.png /var/www/icons/image3.png ... /home/user/.thumbnails/normal/f036044d42fb5afe3c8e6995928ffd80.png /home/user/.thumbnails/normal/09924aa78dd857347f67308eaa686f44.png /home/user/.thumbnails/normal/55688029e0d99196699f9833b92118ef.png /home/user/.thumbnails/normal/d4018c3831bb08001dfad1f175a8d667.png /home/user/.thumbnails/normal/8c06c00c414c221c12453f9e54a98746.png /home/user/.thumbnails/normal/c2f2e44685edd23e94cfacc920c5bffc.png /home/user/.thumbnails/normal/4ed89cb53b32b3253ed50201e6a0c736.png /home/user/.thumbnails/normal/00cadf7ee1bd0f612dad3549ab0a3b2c.png /home/user/.thumbnails/normal/90e878f2a0eb786e874643bcf9038aec.png /home/user/.thumbnails/normal/7fc5c153b02dbcbca4f13ee9d709b488.png |
#find - perm 764
find: invalid predicate `-' |
#find -perm 764
|
#find / -perm 764
find: /proc/4558/task/4558/fd/4: No such file or directory find: /proc/4558/fd/4: No such file or directory |
#find / -perm +764
/ /net /lib64 /lib64/libthread_db-1.0.so /lib64/libBrokenLocale.so.1 /lib64/libutil-2.5.so /lib64/libc.so.6 /lib64/libdevmapper.so.1.02 /lib64/libpthread-2.5.so /lib64/libdevmapper-event.so.1.02 ... /home/student/.bash_profile /home/student/.bashrc /home/user3 /home/user3/.bash_logout /home/user3/.mozilla /home/user3/.mozilla/extensions /home/user3/.mozilla/plugins /home/user3/.bash_profile /home/user3/.bashrc /opt |
#find / -perm -004
/ /net /lib64 /lib64/libthread_db-1.0.so /lib64/libBrokenLocale.so.1 /lib64/libutil-2.5.so /lib64/libc.so.6 /lib64/libdevmapper.so.1.02 /lib64/libpthread-2.5.so /lib64/libdevmapper-event.so.1.02 ... /home/student/.mozilla/plugins /home/student/.bash_profile /home/student/.bashrc /home/user3/.bash_logout /home/user3/.mozilla /home/user3/.mozilla/extensions /home/user3/.mozilla/plugins /home/user3/.bash_profile /home/user3/.bashrc /opt |
#w
09:58:33 up 42 min, 3 users, load average: 1.92, 0.83, 0.31 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user :0 - 09:47 ?xdm? 4:39 0.05s /usr/bin/gnome- user pts/1 :0.0 09:48 10:19 0.00s 0.00s script -f -c ba user pts/3 :0.0 09:48 0.00s 0.24s 0.01s script -f -c ba |
#history | grep ssh
396 ssh user@192.168.15.253 647 pidif sshd 648 pidof sshd 657 ps aux | grep sshd 665 history | grep ssh 776 history | grep ssh |
#ssh user@192.168.15.253
user@book:~$ ssh root@192.168.15.2 Last login: Fri Apr 1 10:09:01 2011 [root@linux2:~]# su - user |
#mail
Mail version 8.1 6/6/93. Type ? for help. "/var/spool/mail/root": 3 messages 1 new 2 unread 1 user@linux5.unix.bas Wed Mar 30 12:20 96/2722 "System Info for $ (ho" U 2 logwatch@linux5.unix Thu Mar 31 10:27 142/4071 "Logwatch for linux5.u" >N 3 logwatch@linux5.unix Fri Apr 1 10:21 105/3104 "Logwatch for linux5.u" & 1 Message 1: From user@linux5.unix.bas Wed Mar 30 12:20:11 2011 Date: Wed, 30 Mar 2011 12:20:11 +0600 From: user@linux5.unix.bas ... --------------------- Selinux Audit Begin ------------------------ Interrupt & At EOF & At EOF & At EOF & quit Saved 3 messages in mbox |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:26:18:CA:EE:7B inet addr:192.168.15.5 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::226:18ff:feca:ee7b/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:11236 errors:0 dropped:0 overruns:0 frame:0 TX packets:8347 errors:0 dropped:0 overruns:0 carrier:1 collisions:0 txqueuelen:1000 RX bytes:11498273 (10.9 MiB) TX bytes:2184699 (2.0 MiB) Interrupt:66 Memory:feac0000-feb00000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1033 errors:0 dropped:0 overruns:0 frame:0 TX packets:1033 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1800605 (1.7 MiB) TX bytes:1800605 (1.7 MiB) |
#echo salam ot Bahi | ssh user@192.168.15.2 'cat >> /tmp/salam'
The authenticity of host '192.168.15.2 (192.168.15.2)' can't be established. RSA key fingerprint is b0:eb:1b:d3:22:b5:d5:bb:e8:4a:10:1d:3b:fb:59:f4. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.2' (RSA) to the list of known hosts. 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: |
#echo salam ot Bahi | ssh user@192.168.15.1 'cat >> /tmp/salam'
The authenticity of host '192.168.15.1 (192.168.15.1)' can't be established. RSA key fingerprint is e3:0e:09:ae:33:7d:81:a1:0f:24:09:ec:67:47:9a:3f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.1' (RSA) to the list of known hosts. user@192.168.15.1's password: |
$ls /tmp/
gcc-4.1.2-48.el5.x86_64.rpm gconfd-root gconfd-user glibc-devel-2.5-49.x86_64.rpm glibc-headers-2.5-49.x86_64.rpm install kernel-headers-2.6.18-194.el5.x86_64.rpm keyring-1LvXa7 keyring-vUyusk libgomp-4.4.0-6.el5.x86_64.rpm ... OSL_PIPE_0_SingleOfficeIPC_44e0c34da8623980ccf9f8299a62e4fb privet privet2 salam ssh-GZehAl5152 ssh-RtmTtW2881 sv3pj.tmp virtual-root.08n9gS virtual-user.PtZPq3 xdev |
$ls /tmp/s
salam ssh-GZehAl5152/ ssh-RtmTtW2881/ sv3pj.tmp/ |
$ls /tmp/s
salam ssh-GZehAl5152/ ssh-RtmTtW2881/ sv3pj.tmp/ |
$ls /tmp/salam
/tmp/salam |
$echo privet wall
privet wall |
$ls -lla /tmp/salam
-rw-rw-r-- 1 user user 14 Apr 1 10:53 /tmp/salam |
$cat /tmp/salam
.bash_history .elinks/ issue sh.vim2 .bash_logout .evolution/ .l3rc .ssh/ .bash_profile first_vim_file .lesshst .testhidden .bashrc .gconf/ .lftp/ .thumbnails/ cats .gconfd/ .lilalo/ .Trash/ .config/ .gnome/ Mail/ vim1.sh cpumem.info .gnome2/ .metacity/ .viminfo Desktop/ .gnome2_private/ .mozilla/ .xsession-errors devpts4 .gstreamer-0.10/ .nautilus/ .dmrc .gtkrc-1.2-gnome2 Projects/ .eggcups/ .ICEauthority .redhat/ |
$cat /tmp/salam
salam ot Bahi |
$echo privet | write user pts/1
|
$exit
exit Connection to 192.168.15.1 closed. |
$exit
exit Connection to 192.168.15.1 closed. |
$exit
exit Connection to 192.168.15.1 closed. |
$exit
exit exit Connection to 192.168.15.1 closed. |
#ssh user@192.168.15.1
user@192.168.15.1's password: Last login: Fri Apr 1 10:56:53 2011 from linux5.unix.bas l3-agent is already running: pid=4137; pidfile=/home/user/.lilalo/l3-agent.pid |
#ssh user@192.168.15.1
user@192.168.15.1's password: Last login: Fri Apr 1 11:01:05 2011 from linux5.unix.bas l3-agent is already running: pid=4137; pidfile=/home/user/.lilalo/l3-agent.pid |
#ssh user@192.168.15.1
user@192.168.15.1's password: Last login: Fri Apr 1 11:03:36 2011 from linux253.unix.bas l3-agent is already running: pid=4137; pidfile=/home/user/.lilalo/l3-agent.pid |
#ssh-keygen -t dsa
Generating public/private dsa key pair. Enter file in which to save the key (/root/.ssh/id_dsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_dsa. Your public key has been saved in /root/.ssh/id_dsa.pub. The key fingerprint is: 2b:bc:52:7a:9f:b8:c9:78:0e:27:94:a9:9c:7c:9d:6d root@linux5.unix.bas |
#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: |
#ssh user@192.168.15.3
The authenticity of host '192.168.15.3 (192.168.15.3)' can't be established. RSA key fingerprint is f4:5c:ee:e9:ef:b7:bd:94:2a:1a:de:fd:ad:43:a7:f7. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.3' (RSA) to the list of known hosts. user@192.168.15.3's password: Last login: Fri Apr 1 11:15:39 2011 from linux4.unix.bas l3-agent is already running: pid=4337; pidfile=/home/user/.lilalo/l3-agent.pid |
$exit
exit Connection to 192.168.15.3 closed. |
$exit
exit Connection to 192.168.15.3 closed. |
$chmod 644 ~/.ssh/authorized_keys
|
$exit
exit Connection to 192.168.15.3 closed. |
$exit
exit Connection to 192.168.15.3 closed. |
#ssh user@192.168.15.3
user@192.168.15.3's password: Last login: Fri Apr 1 11:15:56 2011 from linux5.unix.bas l3-agent is already running: pid=4337; pidfile=/home/user/.lilalo/l3-agent.pid |
#ssh user@192.168.15.3
user@192.168.15.3's password: Last login: Fri Apr 1 11:17:06 2011 from linux5.unix.bas l3-agent is already running: pid=4337; pidfile=/home/user/.lilalo/l3-agent.pid |
#ssh user@192.168.15.3
user@192.168.15.3's password: Last login: Fri Apr 1 11:17:15 2011 from linux5.unix.bas l3-agent is already running: pid=4337; pidfile=/home/user/.lilalo/l3-agent.pid |
#ssh-keygen -t dsa
Generating public/private dsa key pair. Enter file in which to save the key (/root/.ssh/id_dsa): /root/.ssh/id_dsa already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_dsa. Your public key has been saved in /root/.ssh/id_dsa.pub. The key fingerprint is: db:df:af:f0:95:a7:9d:0b:dd:0b:f4:ed:48:2c:29:43 root@linux5.unix.bas |
$exit
exit Connection to 192.168.15.1 closed. |
#ssh user@192.168.15.3
user@192.168.15.3's password: |
$exit
exit Connection to 192.168.15.3 closed. |
#ssh user@192.168.15.3
Last login: Fri Apr 1 11:17:39 2011 from linux5.unix.bas l3-agent is already running: pid=4337; pidfile=/home/user/.lilalo/l3-agent.pid |
#ssh user@192.168.15.3
-keygen -t dsa Generating public/private dsa key pair. Enter file in which to save the key (/root/.ssh/id_dsa): /root/.ssh/id_dsa already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_dsa. Your public key has been saved in /root/.ssh/id_dsa.pub. The key fingerprint is: 0c:5d:a2:e5:54:36:a3:20:23:db:21:bc:b4:13:f7:9d root@linux5.unix.bas |
#ssh-copy-id -i ~/.ssh/id_dsa.pub user@192.168.15.1
21 user@192.168.15.1's password: Now try logging into the machine, with "ssh 'user@192.168.15.1'", and check in: .ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting. |
#ssh user@192.168.15.3
|
#ssh user@192.168.15.3
|
#ps
PID TTY TIME CMD 4461 pts/5 00:00:00 bash 6694 pts/5 00:00:00 ps |
#passwd
Changing password for user root. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. |
#vim /boot/grub/menu.lst
--- /tmp/l3-saved-3992.21772.10547 2011-04-01 14:12:52.000000000 +0600 +++ /boot/grub/menu.lst 2011-04-01 14:20:19.000000000 +0600 @@ -11,6 +11,7 @@ timeout=5 splashimage=(hd0,0)/boot/grub/splash.xpm.gz hiddenmenu +password --md5 $1$xz.020$exuPuHqSEr8egEfXiwKeZ0 title CentOS (2.6.18-194.el5) root (hd0,0) kernel /boot/vmlinuz-2.6.18-194.el5 ro root=LABEL=/ rhgb quiet |
#cat /etc/inittab
# # inittab This file describes how the INIT process should set up # the system in a certain run-level. # # Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org> # Modified for RHS Linux by Marc Ewing and Donnie Barnes # # Default runlevel. The runlevels used by RHS are: # 0 - halt (Do NOT set initdefault to this) # 1 - Single user mode ... pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled" # Run gettys in standard runlevels 1:2345:respawn:/sbin/mingetty tty1 2:2345:respawn:/sbin/mingetty tty2 3:2345:respawn:/sbin/mingetty tty3 4:2345:respawn:/sbin/mingetty tty4 5:2345:respawn:/sbin/mingetty tty5 6:2345:respawn:/sbin/mingetty tty6 # Run xdm in runlevel 5 x:5:respawn:/etc/X11/prefdm -nodaemon |
#vim /etc/inittab
--- /tmp/l3-saved-3418.12114.23106 2011-04-01 14:44:32.000000000 +0600 +++ /etc/inittab 2011-04-01 14:46:01.000000000 +0600 @@ -48,6 +48,8 @@ 4:2345:respawn:/sbin/mingetty tty4 5:2345:respawn:/sbin/mingetty tty5 6:2345:respawn:/sbin/mingetty tty6 +9:2345:respawn:/sbin/mingetty tty9 + # Run xdm in runlevel 5 x:5:respawn:/etc/X11/prefdm -nodaemon |
#init q
|
#ps aux | grep mig
root 2 0.0 0.0 0 0 ? S< 14:39 0:00 [migration/0] root 5 0.0 0.0 0 0 ? S< 14:39 0:00 [migration/1] root 3516 0.0 0.0 61180 752 pts/5 S+ 14:46 0:00 grep mig |
#ps aux | grep minge
root 2745 0.0 0.0 3792 484 tty1 Ss+ 14:40 0:00 /sbin/mingetty tty1 root 2746 0.0 0.0 3792 480 tty2 Ss+ 14:40 0:00 /sbin/mingetty tty2 root 2747 0.0 0.0 3792 484 tty3 Ss+ 14:40 0:00 /sbin/mingetty tty3 root 2750 0.0 0.0 3792 480 tty4 Ss+ 14:40 0:00 /sbin/mingetty tty4 root 2752 0.0 0.0 3792 480 tty5 Ss+ 14:40 0:00 /sbin/mingetty tty5 root 2753 0.0 0.0 3792 480 tty6 Ss+ 14:40 0:00 /sbin/mingetty tty6 root 3497 0.0 0.0 3792 484 tty9 Ss+ 14:46 0:00 /sbin/mingetty tty9 root 3525 0.0 0.0 61180 752 pts/5 S+ 14:46 0:00 grep minge |
#vim /etc/inittab
--- /tmp/l3-saved-3418.29827.10841 2011-04-01 14:47:03.000000000 +0600 +++ /etc/inittab 2011-04-01 14:47:13.000000000 +0600 @@ -48,7 +48,7 @@ 4:2345:respawn:/sbin/mingetty tty4 5:2345:respawn:/sbin/mingetty tty5 6:2345:respawn:/sbin/mingetty tty6 -9:2345:respawn:/sbin/mingetty tty9 +# 9:2345:respawn:/sbin/mingetty tty9 # Run xdm in runlevel 5 |
#init q
|
#ps aux | grep minge
root 2745 0.0 0.0 3792 484 tty1 Ss+ 14:40 0:00 /sbin/mingetty tty1 root 2746 0.0 0.0 3792 480 tty2 Ss+ 14:40 0:00 /sbin/mingetty tty2 root 2747 0.0 0.0 3792 484 tty3 Ss+ 14:40 0:00 /sbin/mingetty tty3 root 2750 0.0 0.0 3792 480 tty4 Ss+ 14:40 0:00 /sbin/mingetty tty4 root 2752 0.0 0.0 3792 480 tty5 Ss+ 14:40 0:00 /sbin/mingetty tty5 root 2753 0.0 0.0 3792 480 tty6 Ss+ 14:40 0:00 /sbin/mingetty tty6 root 3566 0.0 0.0 61180 752 pts/5 S+ 14:47 0:00 grep minge |
#runlevel
N 5 |
#ps aux | grep *d
root 3626 0.0 0.0 61176 740 pts/5 S+ 15:01 0:00 grep *d |
#ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 10348 692 ? Ss 14:39 0:00 init [5] root 2 0.0 0.0 0 0 ? S< 14:39 0:00 [migration/0] root 3 0.0 0.0 0 0 ? SN 14:39 0:00 [ksoftirqd/0] root 4 0.0 0.0 0 0 ? S< 14:39 0:00 [watchdog/0] root 5 0.0 0.0 0 0 ? S< 14:39 0:00 [migration/1] root 6 0.0 0.0 0 0 ? SN 14:39 0:00 [ksoftirqd/1] root 7 0.0 0.0 0 0 ? S< 14:39 0:00 [watchdog/1] root 8 0.0 0.0 0 0 ? S< 14:39 0:00 [events/0] root 9 0.0 0.0 0 0 ? S< 14:39 0:00 [events/1] ... user 3315 0.0 0.0 60976 356 pts/3 S+ 14:41 0:00 script -f -c ba user 3316 0.0 0.0 66088 1600 pts/4 Ss 14:41 0:00 bash user 3354 0.0 0.0 56300 2744 pts/2 S+ 14:41 0:00 ssh user@192.16 user 3357 0.0 0.0 182932 1896 ? Ss 14:41 0:00 gnome-screensav root 3358 0.0 0.0 101080 1412 pts/4 S+ 14:41 0:00 su - root 3361 0.0 0.0 60972 560 pts/4 S+ 14:41 0:00 script -f -c ba root 3386 0.3 0.2 101572 10888 ? Ss 14:41 0:03 l3-agent root 3417 0.0 0.0 60976 360 pts/4 R+ 14:41 0:00 script -f -c ba root 3418 0.0 0.0 66220 1692 pts/5 Ss 14:41 0:00 bash root 3634 0.0 0.0 65616 968 pts/5 R+ 15:01 0:00 ps aux |
#ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 10348 692 ? Ss 14:39 0:00 init [5] root 2 0.0 0.0 0 0 ? S< 14:39 0:00 [migration/0] root 3 0.0 0.0 0 0 ? SN 14:39 0:00 [ksoftirqd/0] root 4 0.0 0.0 0 0 ? S< 14:39 0:00 [watchdog/0] root 5 0.0 0.0 0 0 ? S< 14:39 0:00 [migration/1] root 6 0.0 0.0 0 0 ? SN 14:39 0:00 [ksoftirqd/1] root 7 0.0 0.0 0 0 ? S< 14:39 0:00 [watchdog/1] root 8 0.0 0.0 0 0 ? S< 14:39 0:00 [events/0] root 9 0.0 0.0 0 0 ? S< 14:39 0:00 [events/1] ... user 3315 0.0 0.0 60976 356 pts/3 S+ 14:41 0:00 script -f -c bash -q user 3316 0.0 0.0 66088 1600 pts/4 Ss 14:41 0:00 bash user 3354 0.0 0.0 56300 2744 pts/2 S+ 14:41 0:00 ssh user@192.168.15.2 user 3357 0.0 0.0 182932 1896 ? Ss 14:41 0:00 gnome-screensaver root 3358 0.0 0.0 101080 1412 pts/4 S+ 14:41 0:00 su - root 3361 0.0 0.0 60972 560 pts/4 S+ 14:41 0:00 script -f -c bash -q root 3386 0.3 0.2 101572 10904 ? Ss 14:41 0:04 l3-agent root 3417 0.0 0.0 60976 360 pts/4 S+ 14:41 0:00 script -f -c bash -q root 3418 0.0 0.0 66220 1692 pts/5 Ss 14:41 0:00 bash root 3642 0.0 0.0 65616 972 pts/5 R+ 15:02 0:00 ps aux |
#check
check-binary-files checkmodule checkpolicy |
#chk
chkconfig chkfontpath |
#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:on 6:off capi 0:off 1:off 2:off 3:off 4:off 5:off 6:off ... sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off tcsd 0:off 1:off 2:off 3:off 4:off 5:off 6:off vncserver 0:off 1:off 2:off 3:off 4:off 5:off 6:off wdaemon 0:off 1:off 2:off 3:off 4:off 5:off 6:off winbind 0:off 1:off 2:off 3:off 4:off 5:off 6:off wpa_supplicant 0:off 1:off 2:off 3:off 4:off 5:off 6:off xfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off ypbind 0:off 1:off 2:off 3:off 4:off 5:off 6:off yum-updatesd 0:off 1:off 2:on 3:on 4:on 5:on 6:off |
#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:on 6:off capi 0:off 1:off 2:off 3:off 4:off 5:off 6:off ... sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off tcsd 0:off 1:off 2:off 3:off 4:off 5:off 6:off vncserver 0:off 1:off 2:off 3:off 4:off 5:off 6:off wdaemon 0:off 1:off 2:off 3:off 4:off 5:off 6:off winbind 0:off 1:off 2:off 3:off 4:off 5:off 6:off wpa_supplicant 0:off 1:off 2:off 3:off 4:off 5:off 6:off xfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off ypbind 0:off 1:off 2:off 3:off 4:off 5:off 6:off yum-updatesd 0:off 1:off 2:on 3:on 4:on 5:on 6:off |
#rpm -qf /etc/inittab
initscripts-8.45.30-2.el5.centos |
#rpm -q sendmail
sendmail-8.13.8-8.el5 |
#rpm -q crond
package crond is not installed |
#rpm -q cron
package cron is not installed |
#rpm -qi sendmail
Name : sendmail Relocations: (not relocatable) Version : 8.13.8 Vendor: CentOS Release : 8.el5 Build Date: Wed 31 Mar 2010 10:50:18 AM ALMT Install Date: Sun 27 Mar 2011 08:39:45 PM ALMT Build Host: builder10.centos.org Group : System Environment/Daemons Source RPM: sendmail-8.13.8-8.el5.src.rpm Size : 1372730 License: Sendmail Signature : DSA/SHA1, Tue 27 Apr 2010 05:42:01 AM ALMT, Key ID a8a447dce8562897 Summary : A widely used Mail Transport Agent (MTA). Description : The Sendmail program is a very widely used Mail Transport Agent (MTA). MTAs send mail from one machine to another. Sendmail is not a client program, which you use to read your email. Sendmail is a behind-the-scenes program which actually moves your email over networks or the Internet to where you want it to go. If you ever need to reconfigure Sendmail, you will also need to have the sendmail.cf package installed. If you need documentation on Sendmail, you can install the sendmail-doc package. |
#rpm -qip sendmail
error: open of sendmail failed: No such file or directory |
#rpm -qip bash
error: open of bash failed: No such file or directory |
#rpm -qf /etc/in
init.d/ initlog.conf inittab inputrc |
#rpm -qf /etc/inittab
initscripts-8.45.30-2.el5.centos |
#rpm -qlf /etc/inittab
/bin/doexec /bin/ipcalc /bin/usleep /etc/X11/prefdm /etc/adjtime /etc/initlog.conf /etc/inittab /etc/ppp /etc/ppp/ip-down /etc/ppp/ip-down.ipv6to4 ... /usr/share/man/man8/ppp-watch.8.gz /usr/share/man/man8/service.8.gz /usr/share/man/man8/sys-unconfig.8.gz /usr/share/man/man8/usernetctl.8.gz /var/lib/stateless /var/lib/stateless/writable /var/log/btmp /var/log/wtmp /var/run/netreport /var/run/utmp |
#yum list mc
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.neolabs.kz * base: mirror.neolabs.kz * extras: mirror.neolabs.kz * updates: mirror.neolabs.kz Available Packages mc.x86_64 1:4.6.1a-35.el5 base |
#yum install mc
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.neolabs.kz * base: mirror.neolabs.kz * extras: mirror.neolabs.kz * updates: mirror.neolabs.kz Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package mc.x86_64 1:4.6.1a-35.el5 set to be updated ... Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : mc 1/1 Installed: mc.x86_64 1:4.6.1a-35.el5 Complete! |
#mc
|
#yum list ctorrent
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.neolabs.kz * base: mirror.neolabs.kz * extras: mirror.neolabs.kz * updates: mirror.neolabs.kz Error: No matching Packages to list |
#yum install ctorrent
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.neolabs.kz * base: mirror.neolabs.kz * extras: mirror.neolabs.kz * updates: mirror.neolabs.kz Setting up Install Process No package ctorrent available. Nothing to do |
#yum search pidgin
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.neolabs.kz * base: mirror.neolabs.kz * extras: mirror.neolabs.kz * updates: mirror.neolabs.kz ================================== Matched: pidgin =================================== finch.i386 : A text-based user interface for Pidgin finch.x86_64 : A text-based user interface for Pidgin finch-devel.i386 : Headers etc. for finch stuffs ... libpurple-devel.i386 : Development headers, documentation, and libraries for libpurple libpurple-devel.x86_64 : Development headers, documentation, and libraries for : libpurple libpurple-perl.x86_64 : Perl scripting support for libpurple libpurple-tcl.x86_64 : Tcl scripting support for libpurple pidgin.i386 : A Gtk+ based multiprotocol instant messaging client pidgin.x86_64 : A Gtk+ based multiprotocol instant messaging client pidgin-devel.i386 : Development headers and libraries for pidgin pidgin-devel.x86_64 : Development headers and libraries for pidgin pidgin-perl.x86_64 : Perl scripting support for Pidgin |
#yum list wine
Loaded plugins: fastestmirror Existing lock /var/run/yum.pid: another copy is running as pid 12829. Another app is currently holding the yum lock; waiting for it to exit... The other application is: pirut Memory : 69 M RSS (411 MB VSZ) Started: Fri Apr 1 16:52:11 2011 - 07:52 ago State : Sleeping, pid: 12829 Another app is currently holding the yum lock; waiting for it to exit... The other application is: pirut Memory : 69 M RSS (411 MB VSZ) ... The other application is: pirut Memory : 69 M RSS (411 MB VSZ) Started: Fri Apr 1 16:52:11 2011 - 08:10 ago State : Sleeping, pid: 12829 Another app is currently holding the yum lock; waiting for it to exit... The other application is: pirut Memory : 69 M RSS (411 MB VSZ) Started: Fri Apr 1 16:52:11 2011 - 08:12 ago State : Sleeping, pid: 12829 Exiting on user cancel. |
#yum install wine
Loaded plugins: fastestmirror Existing lock /var/run/yum.pid: another copy is running as pid 12829. Another app is currently holding the yum lock; waiting for it to exit... The other application is: pirut Memory : 69 M RSS (411 MB VSZ) Started: Fri Apr 1 16:52:11 2011 - 08:25 ago State : Sleeping, pid: 12829 Another app is currently holding the yum lock; waiting for it to exit... The other application is: pirut Memory : 69 M RSS (411 MB VSZ) ... The other application is: pirut Memory : 69 M RSS (411 MB VSZ) Started: Fri Apr 1 16:52:11 2011 - 09:33 ago State : Sleeping, pid: 12829 Another app is currently holding the yum lock; waiting for it to exit... The other application is: pirut Memory : 69 M RSS (411 MB VSZ) Started: Fri Apr 1 16:52:11 2011 - 09:35 ago State : Sleeping, pid: 12829 Exiting on user cancel. |
#yum repolist
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.neolabs.kz * base: mirror.neolabs.kz * extras: mirror.neolabs.kz * updates: mirror.neolabs.kz repo id repo name status addons CentOS-5 - Addons enabled: 0 base CentOS-5 - Base enabled: 3,434 extras CentOS-5 - Extras enabled: 296 updates CentOS-5 - Updates enabled: 1,137 repolist: 4,867 |
#rpm -i rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
warning: rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6 |
#rpm -i rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
package rpmforge-release-0.5.2-2.el5.rf.x86_64 is already installed |
#yum list kernel
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.neolabs.kz * base: mirror.neolabs.kz * extras: mirror.neolabs.kz * rpmforge: fr2.rpmfind.net * updates: mirror.neolabs.kz rpmforge | 1.1 kB 00:00 rpmforge/primary | 2.2 MB 00:09 |
#qemu -cdrom /dev/cdrom
You have mail in /var/spool/mail/root |
##dd if=/dev/zero of=disk1.img count=1200 bs=1024k
|
#qemu -hda disk1.img -cdrom /dev/cdrom
qemu: could not open disk image disk1.img: No such file or directory |
#qemu -hda disk1.img -cdrom /dev/cdrom
|
#ssh -X root@192.168.15.1 evolution
root@192.168.15.1's password: Permission denied, please try again. root@192.168.15.1's password: Permission denied, please try again. root@192.168.15.1's password: |
#ssh -X root@192.168.15.2 evolution
root@192.168.15.2's password: Permission denied, please try again. root@192.168.15.2's password: Permission denied, please try again. root@192.168.15.2's password: |
#ssh -X root@192.168.15.3 evolution
root@192.168.15.3's password: Permission denied, please try again. root@192.168.15.3's password: |
#DISPLAY=192.168.15.2:0 xclock
Error: Can't open display: 192.168.15.2:0 |
#yum search kvm
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.neolabs.kz * base: mirror.neolabs.kz * extras: mirror.neolabs.kz * rpmforge: fr2.rpmfind.net * updates: mirror.neolabs.kz ==================================== Matched: kvm ===================================== etherboot-roms-kvm.x86_64 : Etherboot - boot roms supported by KVM, .rom format etherboot-zroms-kvm.x86_64 : Etherboot - boot roms supported by KVM, .zrom format kmod-kvm.x86_64 : kvm kernel module(s) kvm.x86_64 : Kernel-based Virtual Machine kvm-qemu-img.x86_64 : Qemu disk image utility kvm-tools.x86_64 : KVM debugging and diagnostics tools python-virtinst.noarch : Python modules and utilities for installing virtual machines virt-manager.x86_64 : Virtual Machine Manager |
init.d/ initlog.conf inittab inputrc
# # inittab This file describes how the INIT process should set up # the system in a certain run-level. # # Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org> # Modified for RHS Linux by Marc Ewing and Donnie Barnes # # Default runlevel. The runlevels used by RHS are: # 0 - halt (Do NOT set initdefault to this) # 1 - Single user mode # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) # id:5:initdefault: # System initialization. si::sysinit:/etc/rc.d/rc.sysinit l0:0:wait:/etc/rc.d/rc 0 l1:1:wait:/etc/rc.d/rc 1 l2:2:wait:/etc/rc.d/rc 2 l3:3:wait:/etc/rc.d/rc 3 l4:4:wait:/etc/rc.d/rc 4 l5:5:wait:/etc/rc.d/rc 5 l6:6:wait:/etc/rc.d/rc 6 # Trap CTRL-ALT-DELETE ca::ctrlaltdel:/sbin/shutdown -t3 -r now # When our UPS tells us power has failed, assume we have a few minutes # of power left. Schedule a shutdown for 2 minutes from now. # This does, of course, assume you have powerd installed and your # UPS connected and working correctly. pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down" # If power was restored before the shutdown kicked in, cancel it. pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled" # Run gettys in standard runlevels 1:2345:respawn:/sbin/mingetty tty1 2:2345:respawn:/sbin/mingetty tty2 3:2345:respawn:/sbin/mingetty tty3 4:2345:respawn:/sbin/mingetty tty4 5:2345:respawn:/sbin/mingetty tty5 6:2345:respawn:/sbin/mingetty tty6 # Run xdm in runlevel 5 x:5:respawn:/etc/X11/prefdm -nodaemon
salam ot Bahi
Время первой команды журнала | 05:48:36 2011- 4- 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 06:57:23 2011- 4- 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 15.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 4.34 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.38 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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