sandervanvugt

RHCSA day2 nov.21

Nov 17th, 2021
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.00 KB | None | 0 0
  1. connection.auth-retries ipv4.dad-timeout ipv6.dns-options
  2. connection.autoconnect ipv4.dhcp-client-id ipv6.dns-priority
  3. connection.autoconnect-priority ipv4.dhcp-fqdn ipv6.dns-search
  4. connection.autoconnect-retries ipv4.dhcp-hostname ipv6.gateway
  5. connection.autoconnect-slaves ipv4.dhcp-hostname-flags ipv6.ignore-auto-dns
  6. connection.gateway-ping-timeout ipv4.dhcp-iaid ipv6.ignore-auto-routes
  7. connection.id ipv4.dhcp-reject-servers ipv6.ip6-privacy
  8. connection.interface-name ipv4.dhcp-send-hostname ipv6.may-fail
  9. connection.lldp ipv4.dhcp-timeout ipv6.method
  10. connection.llmnr ipv4.dhcp-vendor-class-identifier ipv6.never-default
  11. connection.master ipv4.dns ipv6.ra-timeout
  12. connection.mdns ipv4.dns-options ipv6.route-metric
  13. connection.metered ipv4.dns-priority ipv6.routes
  14. connection.mud-url ipv4.dns-search ipv6.route-table
  15. connection.multi-connect ipv4.gateway ipv6.routing-rules
  16. connection.permissions ipv4.ignore-auto-dns ipv6.token
  17. connection.read-only ipv4.ignore-auto-routes master
  18. connection.secondaries ipv4.may-fail match.driver
  19. connection.slave-type ipv4.method match.interface-name
  20. connection.stable-id ipv4.never-default match.kernel-command-line
  21. connection.timestamp ipv4.route-metric match.path
  22. connection.type ipv4.routes proxy.browser-only
  23. connection.uuid ipv4.route-table proxy.method
  24. connection.wait-device-timeout ipv4.routing-rules proxy.pac-script
  25. connection.zone ipv6.addresses proxy.pac-url
  26. gw4 ipv6.addr-gen-mode slave-type
  27. hostname.from-dhcp ipv6.dhcp-duid tc.qdiscs
  28. hostname.from-dns-lookup ipv6.dhcp-hostname tc.tfilters
  29. hostname.only-from-default ipv6.dhcp-hostname-flags type
  30. hostname.priority ipv6.dhcp-iaid
  31. ifname ipv6.dhcp-send-hostname
  32. [root@localhost network-scripts]# nmcli connection add ipv4.addresses 10.0.0.10/24
  33. Error: 'type' argument is required.
  34. [root@localhost network-scripts]# nmcli connection add ipv4.addresses 10.0.0.10/24 type
  35. 6lowpan bond-slave gsm ovs-dpdk tun wifi-p2p
  36. 802-11-olpc-mesh bridge infiniband ovs-interface veth wimax
  37. 802-11-wireless bridge-slave ip-tunnel ovs-patch vlan wireguard
  38. 802-3-ethernet cdma macsec ovs-port vpn wpan
  39. adsl dummy macvlan pppoe vrf
  40. bluetooth ethernet olpc-mesh team vxlan
  41. bond generic ovs-bridge team-slave wifi
  42. [root@localhost network-scripts]# nmcli connection add ipv4.addresses 10.0.0.10/24 type ethernet
  43. Connection 'ethernet' (274b3b01-77fa-473b-813e-99fc607a29b5) successfully added.
  44. [root@localhost network-scripts]# nmcli con show
  45. NAME UUID TYPE DEVICE
  46. ens160 e0b161b0-4cbe-4b73-ba39-f96e64e39bf7 ethernet ens160
  47. virbr0 528c78bd-d167-4570-b3b5-d681e5343d36 bridge virbr0
  48. ethernet 274b3b01-77fa-473b-813e-99fc607a29b5 ethernet --
  49. [root@localhost network-scripts]# mount /dev/sr0 /mnt
  50. mount: /mnt: WARNING: device write-protected, mounted read-only.
  51. [root@localhost network-scripts]# ls /mnt/
  52. AppStream EFI extra_files.json images media.repo RPM-GPG-KEY-redhat-release
  53. BaseOS EULA GPL isolinux RPM-GPG-KEY-redhat-beta TRANS.TBL
  54. [root@localhost network-scripts]#
  55. [root@localhost network-scripts]# history
  56. 1 tar -cvzf /root/archive.tgz /etc
  57. 2 ls -l
  58. 3 tar -tvf archive.tgz
  59. 4 cat /etc/dnsmasq.conf | sed '/^$/d' | sort
  60. 5 cat /etc/dnsmasq.conf | sed '/^$/d' | sort > /var/tmp/dnslines.txt
  61. 6 useradd bob
  62. 7 mkdir /root/usersfiles; find / -user bob -exec cp {} /root/userfiles/ \;
  63. 8 mkdir /root/userfiles; find / -user bob -exec cp {} /root/userfiles/ \;
  64. 9 ls userfiles/
  65. 10 ls -Ra userfiles/
  66. 11 dnf install -y git
  67. 12 vim countdown
  68. 13 ./countdown 12
  69. 14 ls -l
  70. 15 chmod +x countdown
  71. 16 ./countdown 12
  72. 17 less /etc/passwd
  73. 18 id bob
  74. 19 su - bob
  75. 20 id student
  76. 21 visudo
  77. 22 vim /etc/login.defs
  78. 23 passwd bob
  79. 24 grep bob /etc/shadow
  80. 25 vim /etc/login.defs
  81. 26 useradd whoeve3r
  82. 27 passwd whoeve3r
  83. 28 tail -5 /etc/shadow
  84. 29 ls /etc/skel
  85. 30 ls -a /etc/skel
  86. 31 ls -a /home/bob
  87. 32 passwd --help | less
  88. 33 passwd -l bob
  89. 34 tail -5 /etc/shadow
  90. 35 chage --help
  91. 36 chage -l bob
  92. 37 groupadd dudes
  93. 38 usermod -aG dudes bob
  94. 39 id bob
  95. 40 grep bob /etc/passwd
  96. 41 grep bob /etc/group
  97. 42 id bob
  98. 43 passwd -S
  99. 44 passwd -S bob
  100. 45 vim /etc/ssh/sshd_config
  101. 46 ls -l /home
  102. 47 ls -l /etc/hosts
  103. 48 mkdir -p /data/sales
  104. 49 cd /data
  105. 50 ls -l
  106. 51 groupadd sales
  107. 52 usermod -aG sales bob
  108. 53 id
  109. 54 chgrp sales /data/sales
  110. 55 ls -l
  111. 56 chmod 770 sales
  112. 57 ls -l
  113. 58 history
  114. 59 cd
  115. 60 useradd linda
  116. 61 cd /home/linda
  117. 62 vim runme
  118. 63 chmod +x runme
  119. 64 su - linda
  120. 65 chmod u+s runme
  121. 66 ls -l
  122. 67 find / -perm /4000 2>/dev/null
  123. 68 find / -perm /4000 -exec ls -l {} \; 2>/dev/null
  124. 69 ls -l /etc/shadow
  125. 70 #find / -perm /4000 -exec ls -l {} \; 2>/dev/null
  126. 71 pwd
  127. 72 touch removeme
  128. 73 su - linda
  129. 74 touch writeme
  130. 75 su - linda
  131. 76 cd
  132. 77 ./countdown 12
  133. 78 man find
  134. 79 find / -perm /6000 -exec ls {} \;
  135. 80 find / -perm /6000 -exec ls -l {} \;
  136. 81 for i in find / -perm /4000;
  137. 82 find / -perm /6000 -exec ls -l {} \;
  138. 83 find / -perm /6000
  139. 84 for i in find / -perm /4000 2>/dev/null; do ls -l $i; done
  140. 85 for i in $(find / -perm /4000); do ls -l $i; done
  141. 86 strace -c for i in $(find / -perm /4000); do ls -l $i; done
  142. 87 strace -c "for i in $(find / -perm /4000); do ls -l $i; done"
  143. 88 vim countdown
  144. 89 ./countdown 1
  145. 90 vim countdown
  146. 91 ./countdown 5
  147. 92 vim countdown
  148. 93 history
  149. 94 strace -f /bin/bash -c 'for i in $(find / -perm /4000); do ls -l $i; done'
  150. 95 strace -c -f /bin/bash -c 'for i in $(find / -perm /4000); do ls -l $i; done'
  151. 96 strace -c find / -perm /6000 -exec ls -l {} \;
  152. 97 strace -c -f /bin/bash -c 'for i in $(find / -perm /4000); do ls -l $i; done'
  153. 98 strace -c -f find / -perm /6000 -exec ls -l {} \;
  154. 99 grep sales /etc/group
  155. 100 useradd -aG sales linda
  156. 101 usermod -aG sales linda
  157. 102 grep sales /etc/group
  158. 103 cd /data
  159. 104 ls -l
  160. 105 su - bob
  161. 106 su - linda
  162. 107 chmod g+s sales
  163. 108 ls -l
  164. 109 su - bob
  165. 110 su - linda
  166. 111 chmod +t /data/sales
  167. 112 ls -l
  168. 113 su - linda
  169. 114 chown linda sales
  170. 115 ls -l
  171. 116 su - linda
  172. 117 history
  173. 118 cd
  174. 119 ./countdown 10
  175. 120 vim countdown
  176. 121 ./countdown 10
  177. 122 groupadd students
  178. 123 groupadd profs
  179. 124 vim /etc/login.defs
  180. 125 groupadd -G students lisa
  181. 126 useradd -G students lisa
  182. 127 usermod -aG students linda
  183. 128 useradd -G profs anna
  184. 129 useradd -G profs anouk
  185. 130 mkdir -p /data/profs /data/students
  186. 131 cd /data
  187. 132 chgrp students students
  188. 133 chgrp profs profs
  189. 134 chmod 3770 profs
  190. 135 chmod 3770 students/
  191. 136 ls -l
  192. 137 chown anna students/
  193. 138 chown anna profs
  194. 139 ls -l
  195. 140 cd
  196. 141 ./countdown 13
  197. 142 lsblk
  198. 143 poweroff
  199. 144 man find
  200. 145 useradd --help
  201. 146 passwd --help
  202. 147 lsblk
  203. 148 fdisk /dev/sda
  204. 149 lsblk
  205. 150 mkfs.xfs /dev/sda3
  206. 151 mkdir /files
  207. 152 vim /etc/fstab
  208. 153 mount -a
  209. 154 vim /etc/fstab
  210. 155 mount -a
  211. 156 lsblk
  212. 157 mount
  213. 158 mount | wc
  214. 159 mount | grep '^/'
  215. 160 lsblk
  216. 161 history
  217. 162 man test
  218. 163 vim hintscript.sh
  219. 164 chmod +x hintscript.sh
  220. 165 ./hintscript.sh
  221. 166 vim hintscript.sh
  222. 167 lsblk
  223. 168 df -h
  224. 169 dd if=/dev/zero of=/root/diskfile.img bs=1M count=8192
  225. 170 du -h diskfile.img
  226. 171 losetup -fP diskfile.img
  227. 172 losetup -a
  228. 173 fdisk -l /dev/loop0
  229. 174 lsblk
  230. 175 xxd -l 512 /dev/sda | less
  231. 176 fdisk /dev/sda
  232. 177 fdisk -l /dev/sda
  233. 178 cat /proc/partitions
  234. 179 reboot
  235. 180 cat /proc/partitions
  236. 181 mkdir /xfsfiles
  237. 182 mkdir /ext4files
  238. 183 mkfs.xfs /dev/sda5
  239. 184 mkfs.ext4 /dev/sda6
  240. 185 vim /etc/fstab
  241. 186 mount -a
  242. 187 lsblk
  243. 188 fdisk /dev/sda
  244. 189 vim /etc/fstab
  245. 190 reboot
  246. 191 fdisk -l /dev/sda
  247. 192 touch aa
  248. 193 mount -o remount,rw /
  249. 194 history
  250. 195 vim /etc/fstab
  251. 196 reboot
  252. 197 blkid
  253. 198 vim /etc/fstab
  254. 199 tune2fs -L cow /dev/sda5
  255. 200 blkid
  256. 201 vim /etc/fstab
  257. 202 reboot
  258. 203 xxd -l 512 /dev/sda
  259. 204 cat /dev/sda | less
  260. 205 mkfs.ext4 --help | less
  261. 206 xfs_admin --help
  262. 207 tune2fs --help
  263. 208 cd /data
  264. 209 ls -l
  265. 210 su - anna
  266. 211 man setfacl
  267. 212 setfacl -R -m g:profs:rX students
  268. 213 ls students/
  269. 214 ls students/ -l
  270. 215 ls -l
  271. 216 getfacl students/
  272. 217 getfacl students/student1
  273. 218 su - anna
  274. 219 getfacl students/newfile
  275. 220 ls -lZ
  276. 221 setfacl -m d:g:profs:rx students
  277. 222 getfacl students/
  278. 223 su - anna
  279. 224 getfacl students/newfile2
  280. 225 history
  281. 226 sleep 180; /root/countdown 12
  282. 227 history
  283. 228 df -h
  284. 229 poweroff
  285. 230 lsblk
  286. 231 fdisk /dev/sdb
  287. 232 lsblk
  288. 233 pvcreate --help
  289. 234 pvcreate /dev/sdb1
  290. 235 pvs
  291. 236 vgcreate --help | less
  292. 237 vgcreate -s 8M vgdata /dev/sdb1
  293. 238 man lvcreate
  294. 239 lvcreate -L 1G -n lvdata vgdata
  295. 240 pvs
  296. 241 vgs
  297. 242 lvs
  298. 243 mkfs.xfs /dev/vgdata/lvdata
  299. 244 mkdir /lvdata
  300. 245 vim /etc/fstab
  301. 246 mount -a
  302. 247 mount
  303. 248 tail -1 /etc/fstab
  304. 249 ls -l /dev/vgdata/lvdata /dev/mapper/vgdata-lvdata
  305. 250 history
  306. 251 df -h
  307. 252 lvs
  308. 253 vgs
  309. 254 vgextend --help | less
  310. 255 vgextend rhel /dev/sdb2
  311. 256 vgs
  312. 257 lvextend --help | less
  313. 258 lvextend -r -l +100%FREE /dev/rhel
  314. 259 lvextend -r -l +100%FREE /dev/rhel/root
  315. 260 df -h
  316. 261 lvs
  317. 262 vgs
  318. 263 pvs
  319. 264 lvdisplay
  320. 265 lvs
  321. 266 history
  322. 267 ./countdown 15
  323. 268 dd if=/dev/sr0 of=/rhel8.iso bs=1M
  324. 269 df -h
  325. 270 mkdir /repo
  326. 271 vim /etc/fstab
  327. 272 mount -a
  328. 273 mount
  329. 274 cd /repo
  330. 275 ls
  331. 276 cd BaseOS/
  332. 277 ls
  333. 278 ls Packages/
  334. 279 cd /
  335. 280 lsblk
  336. 281 yum repolist
  337. 282 cd /etc/yum.repos.d/
  338. 283 ls
  339. 284 cat redhat.repo
  340. 285 rm -f *.repo
  341. 286 vim base.repo
  342. 287 vim appstream.repo
  343. 288 yum repolist
  344. 289 yum search nmap
  345. 290 yum install nmap-ncat
  346. 291 yum provides */yum-config-manager
  347. 292 man yum.conf
  348. 293 yum module list
  349. 294 yum module provides podman
  350. 295 yum module info container-tools
  351. 296 yum module info postgress
  352. 297 yum module info postgres
  353. 298 yum module info postgresql | less
  354. 299 yum module list postgresql
  355. 300 yum module install postgresql:9.6/client
  356. 301 yum install httpd
  357. 302 ls -l $(which yum) $(which dnf)
  358. 303 cd
  359. 304 ./countdown 15
  360. 305 lslbk
  361. 306 lsblk
  362. 307 history
  363. 308 ip a
  364. 309 ip route
  365. 310 cat /etc/resolv.conf
  366. 311 ping 8.8.8.8
  367. 312 ping nu.nl
  368. 313 man ifconfig
  369. 314 ip addr add dev ens160 10.0.0.10/24
  370. 315 ip a
  371. 316 ifconfig
  372. 317 ifconfig --all
  373. 318 ifconfig -a
  374. 319 ifconfig /all
  375. 320 rpm -qf $(which ifconfig)
  376. 321 yum remove net-tools
  377. 322 ip route del default via 192.168.29.2
  378. 323 ip route show
  379. 324 ping 8.8.8.8
  380. 325 ip route add default via 192.168.29.1
  381. 326 ping 8.8.8.8
  382. 327 ip route
  383. 328* ip route del default via 192.168.29.
  384. 329 ip route add default via 192.168.29.2
  385. 330 ping 8.8.8.8
  386. 331 ip a
  387. 332 systemctl status NetworkManager
  388. 333 cd /etc/sysconfig/network-scripts/
  389. 334 ls
  390. 335 vim ifcfg-ens160
  391. 336 nmtui
  392. 337 ip a
  393. 338 ping 8.8.8.8
  394. 339 ping nu.nl
  395. 340 nmtui
  396. 341 nmcli connection show
  397. 342 nmcli connection add ipv4.addresses 10.0.0.10/24
  398. 343 nmcli connection add ipv4.addresses 10.0.0.10/24 type ethernet
  399. 344 nmcli con show
  400. 345 mount /dev/sr0 /mnt
  401. 346 ls /mnt/
  402. 347 history
  403.  
Advertisement
Add Comment
Please, Sign In to add comment