Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [student@server1 ~]$ sudo -i
- [sudo] password for student:
- [root@server1 ~]# history
- 1 vim /etc/login.defs
- 2 useradd linda -G students
- 3 useradd lisa -G students
- 4 useradd anna -G profs
- 5 useradd anouk -G profs
- 6 id anna
- 7 history
- 8 groupadd sales
- 9 groupadd account
- 10 usermod -aG sales linda
- 11 usermod -aG sales lisa
- 12 usermod -aG account anna
- 13 usermod -aG account anouk
- 14 mkdir -p /data/sales
- 15 mkdir -p /data/account
- 16 cd /data
- 17 ls -l
- 18 id
- 19 chgrp sales sales
- 20 chgrp account account
- 21 ls -l
- 22 chmod 770 *
- 23 ls -l
- 24 cd /home/linda
- 25 touch wortel
- 26 ls -l
- 27 su - linda
- 28 touch anotherwortel
- 29 pwd
- 30 su - linda
- 31 vim playme
- 32 chmod +x playme
- 33 su - linda
- 34 chmod u+s playme
- 35 vim playme
- 36 su - linda
- 37 find / -perm /4000 2>/dev/null
- 38 find / -perm /4000 -exec ls -l {} ]; 2>/dev/null
- 39 find / -perm /4000 -exec ls -l {} \; 2>/dev/null
- 40 ls -l /etc/shadow
- 41 less /etc/passwd
- 42 useradd myservice -u 2000 -s /sbin/nologin
- 43 su - linda
- 44 su - lisa
- 45 ls -ld .
- 46 cd /data/sales
- 47 ls -ld .
- 48 chmod g+s .
- 49 ls -ld .
- 50 su - lisa
- 51 chmod +t /data/sales
- 52 ls -ld /data/sales
- 53 su - lisa
- 54 cd ..
- 55 ls -l
- 56 su - anna
- 57 getfacl sales
- 58 setfacl -R -m g:account:rx /data/sales
- 59 cd /data/sales
- 60 ls -l
- 61 getfacl lisa1
- 62 man setfacl
- 63 cd ..
- 64 setfacl -x g:account sales
- 65 getfacls sales
- 66 getfacl sales
- 67 getfacl sales/linda2
- 68 setfacl -R -x g:account sales
- 69 getfacl sales/linda2
- 70 setfacl -R -m g:account:rX /data/sales
- 71 getfacl /data/sales/linda2
- 72 su - linda
- 73 setfacl -m d:g:account:rx /data/sales
- 74 getfacl /data/sales
- 75 exit
- 76 su - linda
- 77 ./countdown 12
- 78 lsblk
- 79 poweroff
- 80 lslbk
- 81 lsblk
- 82 fdisk /dev/sda
- 83 lslbk
- 84 alias lslbk=lsblk
- 85 lslbk
- 86 mkfs.xfs /dev/sda3
- 87 lsbk
- 88 lsblk
- 89 mkdir /partition
- 90 vim /etc/fstab
- 91 mount -a
- 92 mount
- 93 reboot
- 94 poweroff
- 95 fdisk /dev/sda
- 96 fdisk -l /dev/sda
- 97 cat /proc/partitions
- 98 lslbk
- 99 lsblk
- 100 reboot
- 101 lsblk
- 102 mkfs.ext4 /dev/sda6
- 103 mkdir /oldfiles
- 104 vim /etc/fstab
- 105 fdisk /dev/sda
- 106 reboot
- 107 vim /etc/fstab
- 108 reboot
- 109 history
- 110 vim /etc/fstab
- 111 reboot
- 112 journalctl -xb
- 113 mount
- 114 mount -a
- 115 fdisk /dev/sda
- 116 blkid
- 117 blkid | grep sda5 | cut -f 2
- 118 blkid | grep sda5 | awk '{ print $2 }'
- 119 blkid | grep sda5 | awk '{ print $2 }' >> /etc/fstab
- 120 vim /etc/fstab
- 121 exit
- 122 mount
- 123 fdisk /dev/sda
- 124 lsblk
- 125 mkfs.xfs --help
- 126 mkfs.xfs -L horse /dev/sda6
- 127 mkdir /horses
- 128 vim /etc/fstab
- 129 mount -a
- 130 xfs_admin --help
- 131 fdisk /dev/sda
- 132 reboot
- 133 cd /data
- 134 ls -l
- 135 mkdir students profs
- 136 cgrp students students
- 137 chgrp students students
- 138 chgrp profs profs
- 139 ls -l
- 140 chmod 770 profs
- 141 chmod 770 students
- 142 chmod 3770 [sp]*
- 143 ls -l
- 144 chown anna profs
- 145 chown anna students
- 146 setfacl -m -R g:profs:rX students
- 147 setfacl -R -m g:profs:rX students
- 148 setfacl -R -m d:g:profs:rx students
- 149 chown -R anna /data
- 150 cd /
- 151 dd if=/dev/sr0 of=/centos82.iso bs=1M
- 152 mkdir /repo
- 153 vim /etc/fstab
- 154 mount -a
- 155 ls /repo
- 156 cd /repo
- 157 ls BaseOS/
- 158 ls AppStream/
- 159 cd /etc/yum.repos.d/
- 160 ls
- 161 rm -f *
- 162 yum repolist
- 163 vim baseOS.repo
- 164 vim AppStream.repo
- 165 cat baseOS.repo
- 166 yum repolist
- 167 cd
- 168 cd /repo
- 169 ls
- 170 cd
- 171 ls
- 172 ./countdown 12
- 173 yum search nmap
- 174 cd /etc/yum.repos.d/
- 175 vim baseOS.repo
- 176 ls
- 177 vim AppStream.repo
- 178 yum search nmap
- 179 cd
- 180 yum search seinfo
- 181 yum provides */seinfo
- 182 yum install nmap
- 183 yum remove nmap
- 184 yum info nmap
- 185 man 5 yum.conf
- 186 yum modules list
- 187 yum module list
- 188 yum module info postgresql
- 189 yum module info --profile postgresql
- 190 yum module install postgresql:9.6
- 191 yum module install postgresql:9.6/devel
- 192 yum module install postgresql:9.6
- 193 yum install httpd
- 194 yum module info httpd
- 195 yum module enable postgresql:10
- 196 yum module info --profile php
- 197 yum module install php:7.2/devel
- 198 yum module reset php
- 199 yum module install --allowerasing php:7.3
- 200 history
- 201 ip a
- 202 ip -c -brie a
- 203 ip addr
- 204 ip route
- 205 ip addr add dev ens33 10.0.0.11/24
- 206 ping 10.0.0.11
- 207 ip a
- 208 man ifconfig
- 209 ifconfig
- 210 ifconfig -a
- 211 man ifconfig
- 212 ip route show
- 213 ip route del default via 192.168.4.2
- 214 ip r
- 215 ping nu.nl
- 216 ip route add default via 192.168.4.2
- 217 ping nu.nl
- 218 history
- 219 ./countdown 12
- 220 nmtui
- 221 ip a
- 222 nmtui
- 223 ip a
- 224 man nmcli-examples
- 225 nmcli connection modify ens33 ipv4.addresses +10.0.0.12/24
- 226 nmcli connection add ens33 ipv4.addresses +10.0.0.12/24
- 227 nmcli connection modify ens33 ipv4.addresses 192.168.4.188/24
- 228 nmcli connection up ens33
- 229 ip a
- 230 cd /etc/sysconfig/network-scripts/
- 231 ls
- 232 vim ifcfg-ens33
- 233 cd
- 234 systemctl status tuned
- 235 tuned-adm --help
- 236 tuned-adm list
- 237 tuned-adm recommend
- 238 tuned-adm profile desktop
- 239 tuned-adm list
- 240 cd /usr/lib/tuned/virtual-guest/
- 241 ls
- 242 vim tuned.conf
- 243 lspci
- 244 cd
- 245 fdisk /dev/sda
- 246 xxd /dev/sda7 | less
- 247 pvcreate /dev/sda7
- 248 pvs
- 249 xxd /dev/sda7 | less
- 250 vgcreate --help
- 251 vgcreate -s 16m vgdata /dev/sda7
- 252 vgs
- 253 vgdisplay vgdata
- 254 lvcreate -n lvdata -L 1G vgdata
- 255 echo $(( 63 * 4 ))
- 256 echo $(( 63 * 16 ))
- 257 echo $(( 66 * 16 ))
- 258 echo $(( 64 * 16 ))
- 259 lvcreate -n lvdata -l 63 vgdata
- 260 lvs
- 261 mkfs.ext3 /dev/vgdata/lvdata
- 262 vim /etc/fstab
- 263 mount -a
- 264 mkdir /lvdata
- 265 mount -a
- 266 df -h
- 267 ls -l /dev/mapper/vgdata-lvdata /dev/vgdata/lvdata
- 268 \ls -l /dev/mapper/vgdata-lvdata /dev/vgdata/lvdata
- 269 history
- 270 tail -1 /etc/fstab
- 271 alias
- 272 xxd /dev/sda7 | less
- 273 yum provides */lvcreate
- 274 ./countdown 12
- 275 vgs
- 276 vgextend --help | less
- 277 vgextend vgdata /dev/sda8
- 278 vgs
- 279 man lvresize
- 280 lvresize --help | less
- 281 df -h
- 282 lvresize -r -L +500M /dev/vgdata/lvdata
- 283 lvresize -l +100%FREE /dev/vgdata/lvdata
- 284 lvs
- 285 df -h
- 286 resize2fs /dev/mapper/vgdata-lvdata
- 287 df -h
- 288 history
- 289 free -m
- 290 fdisk /dev/sda
- 291 mkswap /dev/sda9
- 292 free -m
- 293 vim /etc/fstab
- 294 swapon -a
- 295 free -m
- 296 history
- 297 grep -i active /proc/meminfo
- 298 cd /proc
- 299 ls
- 300 mkswap --help
- 301 swapon -s
- 302 grep -i activ /proc/meminfo
- 303 cd
- 304 history
- 305 q
- 306 poweroff
- 307 lsblk
- 308 gdisk /dev/sdb
- 309 lsblk
- 310 yum install stratis-cli stratisd
- 311 systemctl enable --now stratisd
- 312 stratis pool create mypool /dev/sdb1
- 313 stratis pool list
- 314 stratis filesystem create mypool myfs1
- 315 stratis filesystem list mypool
- 316 stratis filesystem create mypool myfs2
- 317 stratis filesystem list mypool
- 318 lsblk
- 319 mkdir /myfs1 /myfs2
- 320 stratis filesystem list mypool
- 321 stratis filesystem list mypool | grep myfs1 | awk '{ print $9 }'
- 322 stratis filesystem list mypool | grep myfs1 | awk '{ print $10 }'
- 323 stratis filesystem list mypool | grep myfs1 | awk '{ print $10 }' >> /etc/fstab
- 324 stratis filesystem list mypool | grep myfs2 | awk '{ print $NF }'
- 325 stratis filesystem list mypool | grep myfs2 | awk '{ print $NF }' >> /etc/fstab
- 326 vim /etc/fstab
- 327 mount -a
- 328 blkid
- 329 lsblk -f
- 330 blkid | tail -3
- 331 blkid | tail -3 | head -1 | awk '{ print $2 }'
- 332 blkid | tail -3 | head -1 | awk '{ print $2 }' >> /etc/fstab
- 333 blkid | tail -2 | head -1 | awk '{ print $2 }' >> /etc/fstab
- 334 vim /etc/fstab
- 335 mount -a
- 336 df -h
- 337 stratis pool list
- 338 stratis blockdev list mypool
- 339 stratis pool add-data mypool /dev/sdb2
- 340 stratis pool list
- 341 reboot
- 342 vim /etc/default/grub
- 343 grub2-mkconfig -o /boot/grub2/grub.cfg
- 344 history | grep pool
- 345 yum install vdo kmod-kvdo
- 346 man vdo
- 347 # vdo create --name=vdo0 --device=/dev/sdb1 --vdoLogicalSize=10T
- 348 gdisk /dev/sdc
- 349 lsblk
- 350 # vdo create --name=vdo0 --device=/dev/sdb1 --vdoLogicalSize=10T
- 351 vdo create --name=vdofiles --device=/dev/sdc1 --vdoLogicalSize=10T
- 352 vim /etc/fstab
- 353 cd /run/systemd/generator/
- 354 ls
- 355 vim myfs1.mount
- 356 vim lvdata.mount
- 357 vim -- -.mount
- 358 cd /usr/lib/systemd/system
- 359 ls *mount
- 360 vim tmp.mount
- 361 mount | grep '/tmp'
- 362 systemctl enable --now tmp.mount
- 363 mount | grep '/tmp'
- 364 history
- 365 cd /usr/share/doc/vdo/examples/
- 366 ls
- 367 cd systemd/
- 368 ls
- 369 mkdir /vdofiles
- 370 cp VDO.mount.example /etc/systemd/system/vdofiles.mount
- 371 vim /etc/systemd/system/vdofiles.mount
- 372 mkfs.xfs -K /dev/mapper/vdofiles
- 373 systemctl enable --now vdofiles.mount
- 374 systemctl status vdofiles.mount
- 375 reboot
- 376 mount | grep vdo
- 377 ./countdown 12
- 378 man lvmvdo
- 379 cd /usr/share/doc/vdo/
- 380 ls
- 381 cd examples/
- 382 ls
- 383 cd systemd/
- 384 pwd
- 385 ls
- 386 cat VDO.mount.example
- 387 ls -ld /usr/lib/systemd/system/
- 388 ls -ld /etc/systemd/system/
- 389 cd /etc/systemd/system/
- 390 ls
- 391 vim vdofiles.mount
- 392 cd
- 393 yum install -y httpd
- 394 systemctl enable --now httpd
- 395 ps Zaux | grep http
- 396 netstat -Ztulpen
- 397 cd /var/www
- 398 ls -Z
- 399 cd /var/tmp
- 400 ls
- 401 ls -Zd .
- 402 cd
- 403 getenforcce
- 404 getenforce
- 405 setenforce permissive
- 406 getenforce
- 407 vim /etc/sysconfig/selinux
- 408 ./countdown 12
- 409 vim /etc/httpd/conf/httpd.conf
- 410 mkdir /web
- 411 echo hello > /web/index.html
- 412 systemctl restart httpd
- 413 systemctl status httpd
- 414 curl http://localhost
- 415 getenforce
- 416 setenforce enforcing
- 417 curl http://localhost
- 418 setenforce permissive
- 419 curl http://localhost
- 420 grep AVC /var/log/audit/audit.log
- 421 grep AVC /var/log/audit/audit.log | grep httpd
- 422 ls -lZ /web
- 423 ls -ldZ /web /var/www/html
- 424 man semanage-fcontext
- 425 # semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
- 426 # restorecon -R -v /web
- 427 semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
- 428 cd /etc/selinux/targeted/contexts/files/
- 429 ls
- 430 cat file_contexts.local
- 431 ls -Zd /web
- 432 restorecon -Rv /web
- 433 curl http://localhost
- 434 getenforce
- 435 setenforce
- 436 setenforce enforcing
- 437 curl http://localhost
- 438 getsebool -a
- 439 getsebool -a |wc
- 440 semanage fcontext -l |wc
- 441 getsebool -a |grep httpd | grep home
- 442 setsebool -P httpd_enable_homedirs on
- 443 getsebool -a |grep httpd | grep home
- 444 vim /etc/httpd/conf/httpd.conf
- 445 systemctl stop httpd
- 446 systemctl start httpd
- 447 systemctl status httpd
- 448 grep AVC /var/log/audit/audit.log
- 449 grep sealert /var/log/messages
- 450 sealert -l 503fe43c-3dc5-45cf-868b-ec8d0e8413ea | less
- 451 semanage port -a -t http_port_t -p tcp 82
- 452 systemctl start httpd
- 453 systemctl status httpd
- 454 grep sealert /var/log/messages
- 455 sealert -l cf4e5b63-0b2a-46cf-bce4-f06ef8e57c44 | less
- 456 man semanage-port
- 457 man semanage-fcontext
- 458 showmount -e 192.168.4.182
- 459 cd
- 460 yum install -y autofs
- 461 vim /etc/auto.master
- 462 vim /etc/auto.misc
- 463 vim /etc/auto.master
- 464 vim /etc/auto.files
- 465 systemctl enable --now autofs
- 466 cd /
- 467 ls
- 468 cd files
- 469 ls -al
- 470 cd anna
- 471 pwd
- 472 cd ..
- 473 cd linda
- 474 ls
- 475 mount
- 476 cd /
- 477 cd
- 478 ./countdown 12
- 479 vim /etc/exports
- 480 systemctl enable --now nfs-server
- 481 showmount -e localhost
- 482 cat /etc/exports
- 483 vim /etc/fstab
- 484 systemctl firewalld status
- 485 systemctl status firewalld
- 486 firewall-cmd --list-all
- 487 firewall-cmd --get-services
- 488 firewall-cmd --add-service http --permanent
- 489 firewall-cmd --list-all
- 490 firewall-cmd --reload
- 491 systemctl -t help
- 492 systemctl list-unit-files -t mounts
- 493 systemctl list-unit-files -t mount
- 494 systemctl list-unit-files -t service
- 495 systemctl list-unit-files -t target
- 496 systemctl get-default
- 497 systemctl set-default multi-user.target
- 498 systemctl isolate rescue.target
- 499 systemctl list-units
- 500 reboot
- 501 cat /etc/sysconfig/selinux
- 502 ls -Z /etc/shadow
- 503 cd /
- 504 ls
- 505 ls -a
- 506 rm /.autorelabel
- 507 rpm -qf /etc/selinux/targeted/policy/policy.31
- 508 reboot
- 509 rpm -qf /etc/selinux/targeted/policy/policy.31
- 510 yum remove selinux-policy-targeted.noarch
- 511 cd /etc/selinux/
- 512 cat semanage.conf
- 513 pwd
- 514 cd ..
- 515 rm -rf selinux/
- 516 reboot
- 517 yum install selinux-policy-targeted
- 518 reboot
- 519 ls -ldZ /web
- 520 systemctl status httpd
- 521 cd /etc/selinux/targeted/contexts/files/
- 522 cat file_contexts.local
- 523 systemctl set-default graphical.target
- 524 systemctl start graphical.target
- 525 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement