/l3/users/bas/2011-03/linux5.unix.bas/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 |
|
#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 |
#yum install 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 Setting up Install Process Resolving Dependencies --> Running transaction check ... Installing : kmod-kvm 8/9 Installing : kvm 9/9 Installed: kvm.x86_64 0:83-164.el5_5.25 Dependency Installed: celt051.x86_64 0:0.5.1.3-0.el5 etherboot-zroms-kvm.x86_64 0:5.4.4-13.el5.centos kmod-kvm.x86_64 0:83-164.el5_5.25 log4cpp.x86_64 0:1.0-9.el5 qcairo.x86_64 0:1.8.7.1-3.el5 qffmpeg-libs.x86_64 0:0.4.9-0.16.20080908.el5_5 qpixman.x86_64 0:0.13.3-4.el5 qspice-libs.x86_64 0:0.3.0-54.el5_5.2 Complete! |
#qemu
![]() qemu qemu-ppc qemu-system-mips64 qemu-alpha qemu-ppc64 qemu-system-mips64el qemu-arm qemu-ppc64abi32 qemu-system-mipsel qemu-armeb qemu-sh4 qemu-system-ppc qemu-cris qemu-sh4eb qemu-system-ppc64 qemu-i386 qemu-sparc qemu-system-ppcemb qemu-img qemu-sparc32plus qemu-system-sh4 qemu-io qemu-sparc64 qemu-system-sh4eb qemu-m68k qemu-system-arm qemu-system-sparc qemu-microblaze qemu-system-cris qemu-system-sparc64 qemu-mips qemu-system-m68k qemu-system-x86_64 qemu-mipsel qemu-system-microblaze qemu-x86_64 qemu-nbd qemu-system-mips |
#/usr/libexec/qemu-kvm
![]() open /dev/kvm: No such file or directory Could not initialize KVM, will disable KVM support QEMU PC emulator version 0.9.1 (kvm-83-maint-snapshot-20090205), Copyright (c) 2003-2008 Fabrice Bellard usage: qemu [options] [disk_image] 'disk_image' is a raw hard image image for IDE hard disk 0 Standard options: -M machine select emulated machine (-M ? for list) -cpu cpu select CPU (-cpu ? for list) -fda/-fdb file use 'file' as floppy disk 0/1 image -hda/-hdb file use 'file' as IDE hard disk 0/1 image ... -clock force the use of the given methods for timer alarm. To see what timers are available use -clock ? -startdate select initial date of the clock -icount [N|auto] Enable virtual instruction counter with 2^N clock ticks per instruction During emulation, the following keys are useful: ctrl-alt-f toggle full screen ctrl-alt-n switch to virtual console 'n' ctrl-alt toggle mouse and keyboard grab When using -nographic, press 'ctrl-a h' to get some help. |
#/usr/libexec/qemu-kvm /dev/cd
![]() cdrom cdrom-sr0 cdrw cdrw-sr0 cdwriter cdwriter-sr0 |
#/usr/libexec/qemu-kvm /dev/cdROM
![]() open /dev/kvm: No such file or directory Could not initialize KVM, will disable KVM support qemu: could not open disk image /dev/cdROM |
#/usr/libexec/qemu-kvm -cdrom /dev/cdrom
open /dev/kvm: No such file or directory Could not initialize KVM, will disable KVM support |
#/usr/libexec/qemu-kvm -cdrom /dev/cdrom
open /dev/kvm: No such file or directory Could not initialize KVM, will disable KVM support |
#cat /boot/grub/menu.lst
# grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You do not have a /boot partition. This means that # all kernel and initrd paths are relative to /, eg. # root (hd0,0) # kernel /boot/vmlinuz-version ro root=/dev/sda1 # initrd /boot/initrd-version.img #boot=/dev/sda default=0 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 initrd /boot/initrd-2.6.18-194.el5.img |
#uname -a
Linux linux5.unix.bas 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux |
#lsmod
Module Size Used by nls_utf8 35137 1 i915 58305 1 drm 115561 2 i915 autofs4 63049 3 hidp 83521 2 rfcomm 104681 0 l2cap 89281 10 hidp,rfcomm bluetooth 118853 5 hidp,rfcomm,l2cap lockd 101553 0 ... dm_mem_cache 38977 1 dm_raid45 ata_piix 56901 6 libata 209489 1 ata_piix sd_mod 56513 6 scsi_mod 196953 5 scsi_dh,sr_mod,sg,libata,sd_mod ext3 168913 4 jbd 94769 1 ext3 uhci_hcd 57433 0 ohci_hcd 56309 0 ehci_hcd 66125 0 |
#lsmod | head
Module Size Used by nls_utf8 35137 1 i915 58305 1 drm 115561 2 i915 autofs4 63049 3 hidp 83521 2 rfcomm 104681 0 l2cap 89281 10 hidp,rfcomm bluetooth 118853 5 hidp,rfcomm,l2cap lockd 101553 0 |
#lspci -n
00:00.0 0600: 8086:2e30 (rev 03) 00:02.0 0300: 8086:2e32 (rev 03) 00:02.1 0380: 8086:2e33 (rev 03) 00:1b.0 0403: 8086:27d8 (rev 01) 00:1c.0 0604: 8086:27d0 (rev 01) 00:1c.1 0604: 8086:27d2 (rev 01) 00:1d.0 0c03: 8086:27c8 (rev 01) 00:1d.1 0c03: 8086:27c9 (rev 01) 00:1d.2 0c03: 8086:27ca (rev 01) 00:1d.3 0c03: 8086:27cb (rev 01) 00:1d.7 0c03: 8086:27cc (rev 01) 00:1e.0 0604: 8086:244e (rev e1) 00:1f.0 0601: 8086:27b8 (rev 01) 00:1f.1 0101: 8086:27df (rev 01) 00:1f.2 0101: 8086:27c0 (rev 01) 01:00.0 0200: 1969:1026 (rev b0) 03:00.0 0700: 9710:9835 (rev 01) 03:01.0 0280: 14e4:4318 (rev 02) |
#lspci
00:00.0 Host bridge: Intel Corporation 4 Series Chipset DRAM Controller (rev 03) 00:02.0 VGA compatible controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03) 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01) 00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 01) 00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 01) 00:1d.0 USB Controller: Intel Corporation N10/ICH7 Family USB UHCI Controller #1 (rev 01) 00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 01) 00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 01) 00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 01) 00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 01) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) 00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01) 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) 00:1f.2 IDE interface: Intel Corporation N10/ICH7 Family SATA IDE Controller (rev 01) 01:00.0 Ethernet controller: Atheros Communications Atheros AR8121/AR8113/AR8114 PCI-E Ethernet Controller (rev b0) 03:00.0 Serial controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01) 03:01.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02) |
#lspci
00:00.0 Host bridge: Intel Corporation 4 Series Chipset DRAM Controller (rev 03) 00:02.0 VGA compatible controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03) 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01) 00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 01) 00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 01) 00:1d.0 USB Controller: Intel Corporation N10/ICH7 Family USB UHCI Controller #1 (rev 01) 00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 01) 00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 01) 00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 01) 00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 01) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) 00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01) 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) 00:1f.2 IDE interface: Intel Corporation N10/ICH7 Family SATA IDE Controller (rev 01) 01:00.0 Ethernet controller: Atheros Communications Atheros AR8121/AR8113/AR8114 PCI-E Ethernet Controller (rev b0) 03:00.0 Serial controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01) 03:01.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02) |
#lspci | grep wi
![]() |
#lspci
00:00.0 Host bridge: Intel Corporation 4 Series Chipset DRAM Controller (rev 03) 00:02.0 VGA compatible controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03) 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01) 00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 01) 00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 01) 00:1d.0 USB Controller: Intel Corporation N10/ICH7 Family USB UHCI Controller #1 (rev 01) 00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 01) 00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 01) 00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 01) 00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 01) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) 00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01) 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) 00:1f.2 IDE interface: Intel Corporation N10/ICH7 Family SATA IDE Controller (rev 01) 01:00.0 Ethernet controller: Atheros Communications Atheros AR8121/AR8113/AR8114 PCI-E Ethernet Controller (rev b0) 03:00.0 Serial controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01) 03:01.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02) |
#lspci -n
00:00.0 0600: 8086:2e30 (rev 03) 00:02.0 0300: 8086:2e32 (rev 03) 00:02.1 0380: 8086:2e33 (rev 03) 00:1b.0 0403: 8086:27d8 (rev 01) 00:1c.0 0604: 8086:27d0 (rev 01) 00:1c.1 0604: 8086:27d2 (rev 01) 00:1d.0 0c03: 8086:27c8 (rev 01) 00:1d.1 0c03: 8086:27c9 (rev 01) 00:1d.2 0c03: 8086:27ca (rev 01) 00:1d.3 0c03: 8086:27cb (rev 01) 00:1d.7 0c03: 8086:27cc (rev 01) 00:1e.0 0604: 8086:244e (rev e1) 00:1f.0 0601: 8086:27b8 (rev 01) 00:1f.1 0101: 8086:27df (rev 01) 00:1f.2 0101: 8086:27c0 (rev 01) 01:00.0 0200: 1969:1026 (rev b0) 03:00.0 0700: 9710:9835 (rev 01) 03:01.0 0280: 14e4:4318 (rev 02) |
#grep 1969:1026
![]() |
#grep 1969:1026 /lib/modules/`uname -r` /*pcimap
![]() grep: /*pcimap: No such file or directory |
#grep 1969:1026 /lib/modules/`uname -r` /*pcimap*
![]() grep: /*pcimap*: No such file or directory |
#grep 1969:1026 /lib/modules/`uname -r` /*pcimap*
![]() grep: /*pcimap*: No such file or directory |
#grep 14e4.*4318 /lib/modules/`uname -r`/*pcimap*
bcm43xx 0x000014e4 0x00004318 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 |
#modprobe -r bcm43xx
|
#modprobe -r bcm43xx
|
#modprobe --help
![]() modprobe: unrecognized option `--help' Usage: modprobe [-v] [-V] [-C config-file] [-n] [-i] [-q] [-b] [-o <modname>] <modname> [parameters...] modprobe -r [-n] [-i] [-v] <modulename> ... modprobe -l -t <dirname> [ -a <modulename> ...] |
#modprobe
![]() Usage: modprobe [-v] [-V] [-C config-file] [-n] [-i] [-q] [-b] [-o <modname>] <modname> [parameters...] modprobe -r [-n] [-i] [-v] <modulename> ... modprobe -l -t <dirname> [ -a <modulename> ...] |
#modprobe -r bcm43xx
|
#man modprobe
|
#man lspsi
![]() |
#man lspci
|
#lspci -t
-[0000:00]-+-00.0 +-02.0 +-02.1 +-1b.0 +-1c.0-[0000:02]-- +-1c.1-[0000:01]----00.0 +-1d.0 +-1d.1 +-1d.2 +-1d.3 +-1d.7 +-1e.0-[0000:03]--+-00.0 | \-01.0 +-1f.0 +-1f.1 \-1f.2 |
#lspci --help
![]() lspci: invalid option -- - Usage: lspci [<switches>] -v Be verbose -n Show numeric ID's -b Bus-centric view (PCI addresses and IRQ's instead of those seen by the CPU) -x Show hex-dump of the standard portion of config space -xxx Show hex-dump of the whole config space (dangerous; root only) -xxxx Show hex-dump of the 4096-byte extended config space (root only) -s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]] Show only devices in selected slots -d [<vendor>]:[<device>] Show only selected devices -t Show bus tree -m Produce machine-readable output -i <file> Use specified ID database instead of /usr/share/hwdata/pci.ids -D Always show domain numbers -M Enable `bus mapping' mode (dangerous; root only) -P <dir> Use specified directory instead of /proc/bus/pci -H <mode> Use direct hardware access (<mode> = 1 or 2) -F <file> Read configuration data from given file -G Enable PCI access debugging This version is modified by Red Hat, so that it also takes all /usr/share/hwdata/pci.ids.d/*.ids files into account. |
#dd if=/dev/zero of=disk2.img count=1200 bs=10240k
![]() dd: writing `disk2.img': No space left on device 110+0 records in 109+0 records out 1146265600 bytes (1.1 GB) copied, 21.4979 seconds, 53.3 MB/s |
#/usr/libexec/qemu-kvm -cdrom /dev/cdrom
open /dev/kvm: No such file or directory Could not initialize KVM, will disable KVM support |
#ls -la /dev/zero
crw-rw-rw- 1 root root 1, 5 Apr 2 09:37 /dev/zero |
#yum search pidgin
![]() |
#ssh user@192.168.15.3
![]() find / -perm dd: writing `disk1.img': No space left on device 673+0 records in 672+0 records out 3523694592 bytes (3.5 GB) copied, 37.9335 seconds, 92.9 MB/s |
#qume
![]() bash: qume: command not found |
#=l
![]() bash: =l: command not found |
#qume -l
![]() bash: qume: command not found |
#history | cdrom
![]() bash: cdrom: command not found |
#df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda1 4.9G 4.9G 0 100% / /dev/sda6 2.0G 160M 1.7G 9% /tmp /dev/sda3 9.7G 357M 8.9G 4% /var /dev/sda2 20G 2.6G 16G 15% /usr tmpfs 2.0G 0 2.0G 0% /dev/shm /dev/scd0 4.1G 4.1G 0 100% /media/CentOS_5.5_Final |
#ls -l disk1
![]() ls: disk1: No such file or directory |
#ls -l disk1.img
-rw-r--r-- 1 root root 3523694592 Apr 2 14:08 disk1.img |
#/usr/libexec/qemu-kvm -cdrom /dev/cdrom -hda disk1.img -m 712
open /dev/kvm: No such file or directory Could not initialize KVM, will disable KVM support |
#rm -rf /dev/zero/disk2.img
![]() rm: cannot remove `/dev/zero/disk2.img': Not a directory |
#rm /dev/zero/disk2.img
![]() rm: cannot lstat `/dev/zero/disk2.img': Not a directory |
#ls -l disk
![]() ls: disk: No such file or directory |
#m 712 &
![]() dd if=/dev/zero of=disk1.img count=1200 bs=10240k dd: writing `disk1.img': No space left on device 337+0 records in 336+0 records out 3525136384 bytes (3.5 GB) copied, 35.4915 seconds, 99.3 MB/s [2]+ Done /usr/libexec/qemu-kvm -cdrom /dev/cdrom -hda disk1.img -boot d -m 712 |
#useradd -c "user12" -s /usr/bin/to
![]() toc2cddb toe totem toc2cue top totem-video-thumbnailer |
#useradd -c "user12" -s /usr/bin/to
![]() toc2cddb toe totem toc2cue top totem-video-thumbnailer |
#useradd -c "Petya" -s /usr/bin/top -m user12
|
#ls /home/
student user user12 user2 user3 |
#passwd user12
Changing password for user user12. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully. |
#cat /etc/passwd | grep user
rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin user:x:500:500::/home/user:/bin/bash user2:x:502:502::/home/user2:/bin/bash user3:x:503:503::/home/user3:/bin/bash user12:x:504:504:Petya:/home/user12:/usr/bin/top |
#su user12
top - 14:41:49 up 5:04, 4 users, load average: 0.95, 0.50, 0.44 Tasks: 146 total, 1 running, 145 sleeping, 0 stopped, 0 zombie Cpu(s): 5.3%us, 0.0%sy, 0.0%ni, 94.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 4016364k total, 3919344k used, 97020k free, 76748k buffers PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Swap: 2096984k total, 168k used, 2096816k free, 3311540k cached 1 root 15 0 10348 688 576 S 0.0 0.0 0:00.41 init 2 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/0 3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0 4 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0 ... 7 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/1 8 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/0 9 root 10 -5 0 0 0 S 0.0 0.0 0:00.01 events/1 10 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khelper 47 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kthread 52 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/0 53 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/1 54 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid 161 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/0 162 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/1 |
#whish mc
![]() bash: whish: command not found |
#which mc
alias mc='. /usr/share/mc/bin/mc-wrapper.sh' |
#useradd -c "Petya" -s /usr/share/mc/bin/mc -m user13
mc.csh mc.sh mc-wrapper.csh mc-wrapper.sh |
#passwd user13
Changing password for user user13. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully. |
#ssh user@localhost
![]() The authenticity of host 'localhost (127.0.0.1)' can't be established. RSA key fingerprint is 15:5e:e7:df:4b:47:21:44:da:38:70:6c:aa:b9:ef:80. Are you sure you want to continue connecting (yes/no)? |
#ssh user13@localhost
![]() The authenticity of host 'localhost (127.0.0.1)' can't be established. RSA key fingerprint is 15:5e:e7:df:4b:47:21:44:da:38:70:6c:aa:b9:ef:80. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'localhost' (RSA) to the list of known hosts. user13@localhost's password: /usr/share/mc/bin/mc-wrapper.sh: Exec format error Connection to localhost closed. |
#rm -rf /home/user
![]() user/ user12/ user13/ user2/ user3/ |
#rm -rf /home/user
![]() user/ user12/ user13/ user2/ user3/ |
#rm -rf /home/user13
|
#useradd -c "Petya" -s /usr/share/mc/bin/mc -m user14
|
#userdel --help
![]() Usage: userdel [options] LOGIN Options: -f, --force force removal of files, even if not owned by user -h, --help display this help message and exit -r, --remove remove home directory and mail spool |
#cat /etc/passwd | grep user
rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin user:x:500:500::/home/user:/bin/bash user2:x:502:502::/home/user2:/bin/bash user3:x:503:503::/home/user3:/bin/bash user13:x:505:505:Petya:/home/user13:/usr/share/mc/bin/mc user14:x:506:506:Petya:/home/user14:/usr/share/mc/bin/mc |
#userdel -r user3
|
#userdel -r user13
![]() userdel: error removing directory /home/user13 |
#userdel -r user14
|
#cat /etc/passwd | grep user
rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin user:x:500:500::/home/user:/bin/bash |
#adduser -- help\
![]() > |
#adduser -- help
|
#adduser --help
![]() Usage: useradd [options] LOGIN Options: -b, --base-dir BASE_DIR base directory for the new user account home directory -c, --comment COMMENT set the GECOS field for the new user account -d, --home-dir HOME_DIR home directory for the new user account -D, --defaults print or save modified default useradd configuration -e, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE -f, --inactive INACTIVE set password inactive after expiration ... -l, do not add user to lastlog database file -M, do not create user's home directory(overrides /etc/login.defs) -r, create system account -o, --non-unique allow create user with duplicate (non-unique) UID -p, --password PASSWORD use encrypted password for the new user account -s, --shell SHELL the login shell for the new user account -u, --uid UID force use the UID for the new user account -Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping |
#adduser user1 -s /bin/bas
![]() basename bash |
#adduser user1 -s /usr/bin/to
![]() toc2cddb toe totem toc2cue top totem-video-thumbnailer |
#adduser -s /usr/bin/top user1
|
#passwd user1
Changing password for user user1. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully. |
#ssh user1@localhost
-top - 14:52:44 up 5:15, 5 users, load average: 0.13, 0.12, 0.24 Tasks: 149 total, 1 running, 148 sleeping, 0 stopped, 0 zombie Cpu(s): 7.3%us, 0.4%sy, 0.1%ni, 91.3%id, 0.9%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 4016364k total, 3990116k used, 26248k free, 79784k buffers PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Swap: 2096984k total, 168k used, 2096816k free, 3096652k cached 1 root 15 0 10348 688 576 S 0.0 0.0 0:00.41 init 2 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/0 3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0 4 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0 ... 9 root 10 -5 0 0 0 S 0.0 0.0 0:00.03 events/1 Connection to localhost closed. 10 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khelper 47 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kthread 52 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/0 53 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/1 54 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid 161 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/0 162 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/1 165 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khubd |
#ls /home/
![]() help/ student/ user/ user1/ |
#ls /home/user1
|
#passwd user1
Changing password for user user1. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully. |
#mc
|
#adduser -s /bin/bash -m user1
|
#ls -la /home/
total 36 drwxr-xr-x 6 root root 4096 Apr 2 15:01 . drwxr-xr-x 24 root root 4096 Apr 2 09:38 .. drwx------ 3 help help 4096 Apr 2 14:50 help drwx------ 3 student student 4096 Mar 28 12:04 student drwx------ 23 user user 4096 Apr 2 10:20 user drwx------ 3 user1 user1 4096 Apr 2 15:02 user1 |
#adduser -m zlo
|
#userdel zlo
|
#adduser dobro
|
#ls - la /home/
![]() ls: -: No such file or directory ls: la: No such file or directory /home/: dobro help student user user1 zlo |
#ls -la /home/
total 44 drwxr-xr-x 8 root root 4096 Apr 2 15:11 . drwxr-xr-x 24 root root 4096 Apr 2 09:38 .. drwx------ 3 dobro dobro 4096 Apr 2 15:11 dobro drwx------ 3 help help 4096 Apr 2 14:50 help drwx------ 3 student student 4096 Mar 28 12:04 student drwx------ 23 user user 4096 Apr 2 10:20 user drwx------ 3 user1 user1 4096 Apr 2 15:02 user1 drwx------ 3 dobro dobro 4096 Apr 2 15:11 zlo |
#userdel -r zlo
![]() userdel: user zlo does not exist |
#userdel -r dobro
|
#ls -la /home/
total 40 drwxr-xr-x 7 root root 4096 Apr 2 15:13 . drwxr-xr-x 24 root root 4096 Apr 2 09:38 .. drwx------ 3 help help 4096 Apr 2 14:50 help drwx------ 3 student student 4096 Mar 28 12:04 student drwx------ 23 user user 4096 Apr 2 10:20 user drwx------ 3 user1 user1 4096 Apr 2 15:02 user1 drwx------ 3 504 504 4096 Apr 2 15:11 zlo |
#for i in 2 4 7 11 ; do userdel -r user$i; done
userdel: user user2 does not exist userdel: user user4 does not exist userdel: user user7 does not exist userdel: user user11 does not exist |
#mkdir /tmp 1 2 3 4 5 6 7 8 9
![]() mkdir: cannot create directory `/tmp': File exists |
#mkdir /tmp/1 2 3 4 5 6 7 8 9
![]() mkdir: cannot create directory `2': File exists mkdir: cannot create directory `3': File exists mkdir: cannot create directory `4': File exists mkdir: cannot create directory `5': File exists mkdir: cannot create directory `6': File exists mkdir: cannot create directory `7': File exists mkdir: cannot create directory `8': File exists mkdir: cannot create directory `9': File exists |
#mkdir /tmp/1
![]() mkdir: cannot create directory `/tmp/1': File exists |
#ls /tmp/
1 16:48:47 crchkWQw5Fw crstknMzxEh crxmlxjGZC2 etc.tar gcc-4.1.2-48.el5.x86_64.rpm gconfd-root gconfd-user glibc-devel-2.5-49.x86_64.rpm ... libgomp-4.4.0-6.el5.x86_64.rpm lost+found mapping-user mc-root orbit-user OSL_PIPE_500_SingleOfficeIPC_ca704f7757b55718faf53037ec7a6af5 scrollkeeper-user ssh-WrkbjX2903 svc17.tmp virtual-user.Mz5Hul |
# grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You do not have a /boot partition. This means that # all kernel and initrd paths are relative to /, eg. # root (hd0,0) # kernel /boot/vmlinuz-version ro root=/dev/sda1 # initrd /boot/initrd-version.img #boot=/dev/sda default=0 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 initrd /boot/initrd-2.6.18-194.el5.img
Время первой команды журнала | 06:57:23 2011- 4- 2 | |||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 11:29:49 2011- 4- 2 | |||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 29.70 | |||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 4.95 | |||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.16 | |||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.53 | |||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|