Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- status -l httpd
- 583 setenforce 0
- 584 systemctl start httpd
- 585 systemctl status httpd
- 586 grep sealert /var/log/messages
- 587 sealert -l 74f98838-27de-42a8-bea8-22d84df69951 | less
- 588 semanage port -a -t http_port_t -p tcp 82
- 589 getenforce
- 590 setenforce enforcing
- 591 systemctl restart httpd
- 592 systemctl status httpd
- 593 history
- 594 reboot
- 595 history
- [root@server2 ~]# cd /etc/selinux/targeted/
- contexts/ logins/ policy/
- [root@server2 ~]# cd /etc/selinux/targeted/contexts/
- files/ users/
- [root@server2 ~]# cd /etc/selinux/targeted/contexts/files/
- [root@server2 files]# ls
- file_contexts file_contexts.homedirs file_contexts.local file_contexts.subs media
- file_contexts.bin file_contexts.homedirs.bin file_contexts.local.bin file_contexts.subs_dist
- [root@server2 files]# cat file_contexts.local
- # This file is auto-generated by libsemanage
- # Do not edit directly.
- /web(/.*)? system_u:object_r:httpd_sys_content_t:s0
- [root@server2 files]# history
- 1 sudo useradd lisa
- 2 sudo userdel lida
- 3 sudo userdel lisa
- 4 sudo passwd lisa
- 5 sudo passwd root
- 6 exit
- 7 sudo passwd root
- 8 sudo passwd bob
- 9 exit
- 10 touch lindafile1
- 11 touch lindafile2
- 12 exit
- 13 cd /etc/sudoers.d/
- 14 ls
- 15 cat linda
- 16 yum provides */pbrun
- 17 cd /etc
- 18 ls sudoer*
- 19 cd /home/student/
- 20 ./countdown 12
- 21 man hier
- 22 cd /
- 23 ls
- 24 ls -l
- 25 cd boot
- 26 ls
- 27 cd /dev
- 28 ls
- 29 cd /etc
- 30 ls
- 31 cat sudoers
- 32 cat passwd
- 33 cd /
- 34 ls
- 35 cd home
- 36 ls
- 37 cd /root
- 38 ls
- 39 pwd
- 40 cd run
- 41 cd /run
- 42 ls
- 43 cd /tmp
- 44 ls
- 45 cd /usr
- 46 du -hs
- 47 ls
- 48 cd /var
- 49 ls
- 50 cd log
- 51 ls
- 52 cd /
- 53 ls -l
- 54 ls -il /etc/hosts
- 55 ln /etc/hosts /root/myhosts
- 56 ls -il /etc/hosts /root/myhosts
- 57 echo hello >> /etc/hosts
- 58 ls -il /etc/hosts /root/myhosts
- 59 cat /root/myhosts
- 60 cd
- 61 ln -s /root/myhosts /tmp/symhosts
- 62 ls -il /etc/hosts /root/myhosts /tmp/symhosts
- 63 cat /tmp/symhosts
- 64 rm /root/myhosts
- 65 ls -il /etc/hosts /root/myhosts /tmp/symhosts
- 66 cat /tmp/symhosts
- 67 ln /etc/hosts /root/myhosts
- 68 ls -il /etc/hosts /root/myhosts /tmp/symhosts
- 69 ln /etc /myetc
- 70 ln /boot/vmlinuz-4.18.0-147.el8.x86_64 mykernel
- 71 find / -samefile /etc/hosts
- 72 find / -samefile /etc/hosts
- 73 find / -samefile /etc/hosts 2> /dev/null
- 74 history
- 75 history | less
- 76 cp /tmp/symhosts .
- 77 ls -l
- 78 cat symhosts
- 79 man hier
- 80 lsblk
- 81 umount /dev/sdb1
- 82 lsblk
- 83 mount /dev/sdb1 /mnt
- 84 ls /mnt
- 85 umount /mnt
- 86 cd /home/student/
- 87 ls
- 88 countdown
- 89 echo $PATH
- 90 mv countdown /usr/bin
- 91 countdown 12
- 92 man -k user
- 93 man man
- 94 man apropos
- 95 man mandb
- 96 mandb
- 97 man -k user
- 98 man man
- 99 man -k user | grep 8
- 100 find / -name "hosts"
- 101 find / -name "*hosts*"
- 102 find / -user linda
- 103 find / -size +100M
- 104 find / -user linda -exec ls -l {} \;
- 105 find / -user linda -exec cp {} /root \;
- 106 ls
- 107 ls -la
- 108 su - linda
- 109 find / -user linda -exec cp {} /root \;
- 110 ls -l
- 111 pwd
- 112 cd /root
- 113 ls -l
- 114 history
- 115 ps aux
- 116 ps aux | grep ssh
- 117 grep linda /etc/*
- 118 grep linda /etc/* 2>/dev/null
- 119 grep -l linda /etc/* 2>/dev/null
- 120 grep -lR linda /etc/* 2>/dev/null
- 121 which vi
- 122 which vim
- 123 ls -l /bin/vi /bin/vim
- 124 exit
- 125 vim /etc/hosts
- 126 vim /etc/login.defs
- 127 echo $(( 99999 / 365 ))
- 128 vim /etc/login.defs
- 129 groupadd sales
- 130 groupadd account
- 131 useradd --help
- 132 useradd -G sales linda
- 133 id linda
- 134 usermod -aG sales linda
- 135 id linda
- 136 usermod -aG sales lisa
- 137 useradd -G account anna
- 138 useradd -G account anouk
- 139 history
- 140 tail -n 6 /etc/passwd
- 141 tail -n 3 /etc/group
- 142 tail -n 6 /etc/group
- 143 mkdir /data/sales
- 144 mkdir /data/sales -p
- 145 mkdir /data/account -p
- 146 cd /data
- 147 ls -l
- 148 id
- 149 chown :account account
- 150 ls -l
- 151 chgrp sales sales
- 152 ls -l
- 153 chmod 770 *
- 154 ls -l
- 155 su - lisa
- 156 su - linda
- 157 su - lisa
- 158 history
- 159 echo this is some text > rootfile
- 160 md5sum rootfile
- 161 md5sum rootfile > rootfile.md5
- 162 cat rootfile.md5
- 163 vim rootfile
- 164 md5sum rootfile
- 165 mkdir mydir
- 166 mkdir complete/path/of/directories
- 167 mkdir -p complete/path/of/directories
- 168 cp /etc/hosts /data/sales
- 169 cp /etc/hosts /data/sals
- 170 ls /data/sales
- 171 ls -l /data/sals
- 172 cat /data/sals
- 173 cp /etc/hosts /data/account/
- 174 cp /etc/hosts /data/accont/
- 175 history
- 176 vim rootfile
- 177 md5sum rootfile > newmd5.md5
- 178 diff rootfile.md5 newmd5.md5
- 179 cat rootfile.md5 newmd5.md5
- 180 vim /etc/group
- 181 cd /home/linda
- 182 vim playme
- 183 chmod +x playme
- 184 ./playme
- 185 chmod u+s playme
- 186 ls -l
- 187 su - linda
- 188 find / -perm /4000 -exec ls -l {} \;
- 189 ls -l /etc/shadow
- 190 cd /data/sales
- 191 su - linda
- 192 su - lisa
- 193 chmod g+s .
- 194 ls -l .
- 195 ls -ld .
- 196 su - lisa
- 197 chmod +t .
- 198 ls -ld .
- 199 su - lisa
- 200 id linda
- 201 grep linda /etc/group
- 202 grep linda /etc/passwd
- 203 less /var/log/messages
- 204 less /var/log/audit/audit.log
- 205 man auditctl
- 206 auditctl -w /etc/ -p wa
- 207 vim /etc/motd
- 208 less /var/log/audit/audit.log
- 209 cd ..
- 210 ls -l
- 211 rm r*
- 212 rm sals
- 213 rmdir mydir/ complete/
- 214 rm -rf complete/
- 215 ls -l
- 216 rm newmd5.md5
- 217 ls -l
- 218 getfacl sales
- 219 setfacl -m -R g:account:rx sales
- 220 setfacl -R -m g:account:rx sales
- 221 getfacl sales
- 222 cd sales
- 223 ls -l
- 224 man setfacl
- 225 cd ..
- 226 setfacl -R -x g:account sales
- 227 ls -l sales/
- 228 setfacl -R -m g:account:rX sales
- 229 getfacl sales
- 230 ls -l sales/
- 231 setfacl sales/lisa1
- 232 getfacl sales/lisa1
- 233 su - lisa
- 234 getfacl sales/newlisa
- 235 setfacl -m d:g:account:rx sales
- 236 getfacl sales
- 237 su - lisa
- 238 getfacl sales/lisa123
- 239 history
- 240 countdown 13
- 241 vim /etc/login.defs
- 242 groupadd profs students
- 243 groupadd profs
- 244 groupadd student
- 245 groupadd students
- 246 useradd mandy -aG students
- 247 useradd -aG students mandy
- 248 useradd -G students mandy
- 249 useradd -G students melanie
- 250 useradd -G profs boris
- 251 useradd -G profs bobob
- 252 history
- 253 usermod -aG students linda
- 254 usermod -aG students lisa
- 255 usermod -aG profs anna
- 256 usermod -aG profs anouk
- 257 chage -l linda
- 258 chage -l bob
- 259 chage -l bobob
- 260 chage bob
- 261 yum repolist
- 262 cd /etc/yum.repos.d/
- 263 ls
- 264 rm -f *
- 265 yum repolist
- 266 cd
- 267 dd if=/dev/sr0 of=/centos8.iso bs=1M
- 268 mkdir /repo
- 269 vim /etc/fstab
- 270 mount -a
- 271 cd /repo
- 272 ls
- 273 cd BaseOS/
- 274 ls
- 275 cd Packages/
- 276 ls
- 277 cd ../..
- 278 cd AppStream/
- 279 ls
- 280 cd Packages/
- 281 ls
- 282 cd ..
- 283 cd /etc/yum.repos.d/
- 284 vim baseos.repo
- 285 vim appstream.repo
- 286 yum repolist
- 287 vim appstream.repo
- 288 yum repolist
- 289 yum search nmap
- 290 yum install nmap
- 291 yum search seinfo
- 292 yum provides */seinfo
- 293 yum remove kernel
- 294 yum remove bash
- 295 cat appstream.repo baseos.repo
- 296 yum groups list
- 297 yum groups list --hidden
- 298 yum groups info "Virtualization Tools"
- 299 yum groups install "Virtualization Tools"
- 300 yum install -y epel-release
- 301 yum search epel
- 302 yum provides */kvm2
- 303 cd
- 304 countdown 12
- 305 ping google.com
- 306 yum modules list
- 307 yum module list
- 308 yum module list | less
- 309 yum modules provides httpd
- 310 yum module provides httpd
- 311 yum module info httpd
- 312 yum module install postgresql:9.6/devel
- 313 yum module info postgresql
- 314 yum module install postgresql:9.6/server
- 315 ip -h
- 316 ip a
- 317 ip addr add dev ens33 10.0.0.10/24
- 318 ip a
- 319 ping 10.0.0.10
- 320 ifconfig
- 321 ifconfig -a
- 322 man ifconfig
- 323 which ifconfig
- 324 rpm -qf $(which ifconfig)
- 325 rpm -ql net-tools
- 326 rpm -ql net-tools | grep bin
- 327 yum remove net-tools
- 328 ip route show
- 329 ip route del default via 192.168.4.2
- 330 ip route show
- 331 ping nu.nl
- 332 ip route add default via 192.168.4.2
- 333 ping nu.nl
- 334 vim /etc/resolv.conf
- 335 vim /etc/sysconfig/network-scripts/ifcfg-ens33
- 336 systemctl status NetworkManager
- 337 nmtui
- 338 ip a
- 339 ping nu.nl
- 340 vim /etc/sysconfig/network-scripts/ifcfg-ens33
- 341 vim /etc/resolv.conf
- 342 systemctl restart NetworkManager
- 343 vim /etc/resolv.conf
- 344 ip neigh
- 345 ip neigh -h
- 346 ip neigh help
- 347 ip neigh show
- 348 nmap -sn 192.168.4.0/24
- 349 ip neigh show
- 350 history
- 351 nmap -sn 192.168.4.0/24
- 352 ping 192.168.4.1
- 353 ping 192.168.4.254
- 354 ip neigh show
- 355 countdown 13
- 356 lsblk
- 357 poweroff
- 358 lsblk
- 359 fdisk /dev/sda
- 360 lsblk
- 361 mkfs.xfs /dev/sda3
- 362 mount /dev/sda3 /mnt
- 363 mount
- 364 mount | grep '^/'
- 365 vim /etc/fstab
- 366 mount -a
- 367 mkdir /myfiles
- 368 mount -a
- 369 mount | grep '^/'
- 370 umount /mnt
- 371 reboot
- 372 vim /etc/fstab
- 373 reboot
- 374 vim /etc/fstab
- 375 reboot
- 376 vim /etc/fstab
- 377 history
- 378 mkdir -p /data/profs /data/students
- 379 cd /data
- 380 ls -lk
- 381 chgrp students students
- 382 chgrp profs profs
- 383 ls -l
- 384 chown anna students
- 385 chown anna profs
- 386 chmod 3770 profs
- 387 chmod 3770 student
- 388 chmod 3770 students
- 389 ls -l
- 390 setfacl -R -m g:profs:rX students
- 391 setfacl -m d:g:profs:rx students
- 392 getfacl students/
- 393 cd /myrepo
- 394 mkdir /myrepo
- 395 cd /myrepo/
- 396 yum provides */yumdownloader
- 397 yum install -y yum-utils
- 398 yumdownloader nmap*
- 399 ls
- 400 yum provides */createrepo
- 401 yum install -y createrepo_c
- 402 createrepo /myrepo
- 403 ls
- 404 tree repodata/
- 405 cd /etc/yum.repos.d/
- 406 ls
- 407 vim myrepo.repo
- 408 yum repolist
- 409 yum provides */sealert
- 410 rpm -ql setroubleshoot-server
- 411 rpm -qc setroubleshoot-server
- 412 cd
- 413 fdisk -l /dev/sda
- 414 xxd -l 512 /dev/sda
- 415 fdisk /dev/sda
- 416 lsblk
- 417 mkfs.ext4 /dev/sda4
- 418 fdisk /dev/sda
- 419 fdisk -l /dev/sda
- 420 lsblk
- 421 partprobe /dev/sda
- 422 reboot
- 423 lsblk
- 424 mkfs.ext4 /dev/sda5
- 425 mkfs.xfs /dev/sda6
- 426 mkdir /sda5
- 427 mkdir /sda6
- 428 vim /etc/fstab
- 429 mount -a
- 430 mount
- 431 vim /etc/fstab
- 432 fdisk /dev/sda
- 433 reboot
- 434 fdisk -l
- 435 fdisk -l /dev/sda5
- 436 fdisk -l /dev/sda
- 437 xfs_admin --help
- 438 xfs_admin -L cow /dev/sda5
- 439 vim /etc/fstab
- 440 reboot
- 441 lsblk
- 442 blkid
- 443 vim /etc/fstab
- 444 fdisk /dev/sda
- 445 reboot
- 446 ss --help
- 447 ss -antZ
- 448 ss -antZ | grep 80
- 449 ss -aZ
- 450 man ss
- 451 ss -alZ
- 452 man ss
- 453 ss -Z
- 454 ss -sZ
- 455 yum install net-tools
- 456 netstat -Ztulpen
- 457 yum remove net-tools -y
- 458 vim /etc/httpd/conf/httpd.conf
- 459 systemctl restart httpd
- 460 systemctl status tuned
- 461 tuned-adm list
- 462 tuned-adm profile desktop
- 463 tuned-adm list
- 464 cat /etc/fstab
- 465 tuned-adm list
- 466 tuned-adm profile network-latency
- 467 sysctl -a
- 468 sysctl -a | wc
- 469 sysctl -a
- 470 countdown 13
- 471 lsblk
- 472 fdisk /dev/sda
- 473 lsblk
- 474 pvcreate --help
- 475 pvcreate /dev/sda7
- 476 pvs
- 477 vgcreate --help | less
- 478 vgcreate -s 8M vgdata /dev/sda7
- 479 vgs
- 480 pvs
- 481 lvcreat --help | less
- 482 lvcreate --help | less
- 483 lvcreate -n lvdata -L 2G vgdata
- 484 echo $(( 255 * 8 ))
- 485 lvcreate -n lvdata -l 100%FREE vgdata
- 486 lvs
- 487 mkfs.xfs /dev/vgdata/lvdata
- 488 mkdir /lvdata
- 489 vim /etc/fstab
- 490 mount -a
- 491 mount
- 492 ls -l /dev/vgdata/lvdata /dev/mapper/vgdata-lvdata
- 493 history
- 494 cat /etc/fstab
- 495 free -m
- 496 countdown 12
- 497 free -m
- 498 fdisk /dev/sda
- 499 lsblk
- 500 mkswap /dev/sda8
- 501 free -m
- 502 vim /etc/fstab
- 503 swapon -a
- 504 free -m
- 505 swapon -s
- 506 history
- 507 lsblk
- 508 cd /lvdata
- 509 df -h
- 510 dd if=/dev/zero of=bigfile
- 511 df -h
- 512 vgs
- 513 vgextend vgdata /dev/sda9
- 514 vgs
- 515 lvextend --help | less
- 516 man lvextend
- 517 lvextend -L +500M vgdata/lvdata
- 518 lvs
- 519 df -h
- 520 man -k resize
- 521 xfs_growfs /dev/vgdata/lvdata
- 522 resize2fs /dev/vgdata/lvdata
- 523 mount
- 524 xfs_growfs --help
- 525 xfs_growfs /lvdata
- 526 df -h
- 527 lvextend -l +20%FREE -r /dev/vgdata/lvdata
- 528 history
- 529 yum install -y httpd
- 530 systemctl start httpd
- 531 ps Zaux | grep httpd
- 532 ps Zaux | grep ssh
- 533 cd /var/www
- 534 ls -Z
- 535 cd ..
- 536 ls -Z
- 537 ss Ztupen
- 538 ss tupen
- 539 ss -tupen
- 540 ss -Ztupen
- 541 ss -Ztup
- 542 ss -ant
- 543 ss -antZ
- 544 ss -plantZ
- 545 ss -plantZ | grep 80
- 546 vim /etc/sysconfig/selinux
- 547 getenforce
- 548 setenforce permissive
- 549 getenforce
- 550 setenforce enforcing
- 551 cd
- 552 mkdir /web
- 553 vim /web/index.html
- 554 vim /etc/httpd/conf/httpd.conf
- 555 systemctl restart httpd
- 556 systemctl status httpd
- 557 curl http://localhost
- 558 ps Zaux | grep http
- 559 ls -Zd /web
- 560 setenforce permissive
- 561 curl http://localhost
- 562 ls -Zd /var/www/html/
- 563 setenforce enforcing
- 564 history
- 565 sleep 20; countdown 12
- 566 history
- 567 man semanage
- 568 ls -lZ /var/www
- 569 man semanage-fcontext
- 570 semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
- 571 ls -lZd /web
- 572 restorecon -Rv /web
- 573 getenforce
- 574 curl http://localhost
- 575 man semanage-port
- 576 getsebool -a
- 577 getsebool -a | wc
- 578 getsebool -a | grep ftp
- 579 setsebool -P ftpd_anon_write on
- 580 systemctl status httpd
- 581 systemctl status httpd -l
- 582 systemctl status -l httpd
- 583 setenforce 0
- 584 systemctl start httpd
- 585 systemctl status httpd
- 586 grep sealert /var/log/messages
- 587 sealert -l 74f98838-27de-42a8-bea8-22d84df69951 | less
- 588 semanage port -a -t http_port_t -p tcp 82
- 589 getenforce
- 590 setenforce enforcing
- 591 systemctl restart httpd
- 592 systemctl status httpd
- 593 history
- 594 reboot
- 595 history
- 596 cd /etc/selinux/targeted/contexts/files/
- 597 ls
- 598 cat file_contexts.local
- 599 history
- [root@server2 files]# cat /etc/fstab
- #
- # /etc/fstab
- # Created by anaconda on Tue May 26 13:38:27 2020
- #
- # Accessible filesystems, by reference, are maintained under '/dev/disk/'.
- # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
- #
- # After editing this file, run 'systemctl daemon-reload' to update systemd
- # units generated from this file.
- #
- /dev/mapper/cl-root / xfs defaults 0 0
- UUID=801e0a7c-4089-4b37-b370-0848bfa46f36 /boot ext4 defaults 1 2
- /dev/mapper/cl-swap swap swap defaults 0 0
- /centos8.iso /repo iso9660 defaults 0 0
- /dev/sda3 /myfiles xfs defaults 0 0
- LABEL=cow /sda6 xfs defaults 0 0
- /dev/vgdata/lvdata /lvdata xfs defaults 0 0
- UUID=e3329178-af90-46fc-b75a-9f05032847cf swap swap defaults 0 0
Add Comment
Please, Sign In to add comment