Advertisement
sandervanvugt

RHCSA day2 may21

May 18th, 2021
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.63 KB | None | 0 0
  1. [root@rhcsa ~]# history
  2. 1 history
  3. 2 exit
  4. 3 tar cvzf /root/archive.tgz /etc
  5. 4 ls -l
  6. 5 file archive.tgz
  7. 6 cat /etc/dnsmasq.conf
  8. 7 cat /etc/dnsmasq.conf | grep -v '^$'
  9. 8 cat /etc/dnsmasq.conf | grep -v '^$' | sort
  10. 9 vim whatever
  11. 10 cat whatever | grep -v '^$' | sort
  12. 11 cat /etc/dnsmasq.conf | grep -v '^$' | sort
  13. 12 useradd lisa
  14. 13 find / -user lisa
  15. 14 mkdir /root/userfiles; find / -user lisa -exec cp {} /root/userfiles \;
  16. 15 cat /etc/dnsmasq.conf | grep -v '^$' | sort > /var/tmp/dnslines.txt
  17. 16 history
  18. 17 vim countdown
  19. 18 chmod +x countdown
  20. 19 ./countdown 12
  21. 20 history
  22. 21 vim countdown
  23. 22 less /etc/passwd
  24. 23 grep student /etc/passwd
  25. 24 id student
  26. 25 less /etc/passwd
  27. 26 vim /etc/login.defs
  28. 27 cd /etc/skel/
  29. 28 ls
  30. 29 ls -a
  31. 30 touch hello
  32. 31 ls -a
  33. 32 useradd linda
  34. 33 grep linda /etc/passwd
  35. 34 ls -al /home/linda
  36. 35 vim /etc/default/useradd
  37. 36 id linda
  38. 37 vim /etc/login.defs
  39. 38 history
  40. 39 visudo
  41. 40 cd
  42. 41 su - linda
  43. 42 passwd linda
  44. 43 su - linda
  45. 44 id linda
  46. 45 usermod -aG wheel linda
  47. 46 id linda
  48. 47 su - linda
  49. 48 cd /etc/skel/
  50. 49 ls
  51. 50 ls -a
  52. 51 vim .bash_logout
  53. 52 cd .mozilla/
  54. 53 ls
  55. 54 cd ..
  56. 55 cd
  57. 56 man su
  58. 57 exit
  59. 58 ./countdown 12
  60. 59 passwd --help |less
  61. 60 passwd -l linda
  62. 61 passwd --help |less
  63. 62 passwd -S linda
  64. 63 grep linda /etc/shadow
  65. 64 passwd -u linda
  66. 65 grep linda /etc/shadow
  67. 66 chage linda
  68. 67 ls
  69. 68 ./countdown 12
  70. 69 ssh localhost
  71. 70 vim /etc/ssh/sshd_config
  72. 71 passwd --help
  73. 72 cd /etc
  74. 73 ls -l
  75. 74 cd
  76. 75 chmod -x countdown
  77. 76 ls -l countdown
  78. 77 ./countdown
  79. 78 chmod +x countdown
  80. 79 ./countdown 0
  81. 80 mkdir /data/sales
  82. 81 mkdir -p /data/sales
  83. 82 mkdir -p /data/account
  84. 83 cd /data
  85. 84 ls -l
  86. 85 groupadd sales
  87. 86 groupadd account
  88. 87 usermod -aG sales linda
  89. 88 usermod -aG sales lisa
  90. 89 id linda
  91. 90 id lisa
  92. 91 useradd --help
  93. 92 useradd -G account anna
  94. 93 useradd -G account anouk
  95. 94 id anna
  96. 95 passwd lisa
  97. 96 history
  98. 97 history -d 97
  99. 98 history -d 96
  100. 99 history -d 95
  101. 100 echo password | passwd --stdin anna
  102. 101 ls -l
  103. 102 chgrp account account
  104. 103 ls -l
  105. 104 chgrp sales sales
  106. 105 ls
  107. 106 for i in *; do echo $i; done
  108. 107 for i in *; do chgrp $i $i; done
  109. 108 ls -l
  110. 109 chmod 770 *
  111. 110 ls -l
  112. 111 su - linda
  113. 112 su - lisa
  114. 113 cd /home/linda
  115. 114 vim playme
  116. 115 chmod +x playme
  117. 116 su - linda
  118. 117 chmod u+s playme
  119. 118 ls -l
  120. 119 su - linda
  121. 120 find / -perm /4000 2>/dev/null
  122. 121 ls -l /usr/bin/passwd
  123. 122 ls -l /etc/shadow
  124. 123 cat /etc/shadow
  125. 124 ls -l /etc/shadow
  126. 125 cd /data/sales
  127. 126 ls -l
  128. 127 chmod g+s .
  129. 128 ls -ld .
  130. 129 su - linda
  131. 130 su - lisa
  132. 131 chmod +t .
  133. 132 ls -ld .
  134. 133 su - lisa
  135. 134 /root/countdown 12
  136. 135 ls -ld .
  137. 136 cd ..
  138. 137 chmod 3770 *
  139. 138 ls -k
  140. 139 ls -l
  141. 140 chmod o+x *
  142. 141 ls -l
  143. 142 chmod o-x *
  144. 143 ls -l
  145. 144 ls -lr *
  146. 145 setfacl -R -m g:account:rx sales
  147. 146 cd sales
  148. 147 ls -l
  149. 148 man setfacl
  150. 149 setfacl -R -x g:account sales
  151. 150 cd ..
  152. 151 setfacl -R -x g:account sales
  153. 152 ls -l sales
  154. 153 setfacl -R -m g:account:rX sales
  155. 154 ls -l sales/
  156. 155 ls -l sales
  157. 156 ls -ld sales
  158. 157 getfacl sales
  159. 158 setfacl -m d:g:account:rx sales
  160. 159 getfacl sales
  161. 160 su - linda
  162. 161 lsblk
  163. 162 fdisk /dev/sda
  164. 163 lsblk
  165. 164 mkfs.xfs /dev/sda3
  166. 165 mount /dev/sda3 /mnt
  167. 166 history
  168. 167 vim /etc/login.defs
  169. 168 groupadd --help | less
  170. 169 groupadd students
  171. 170 groupadd profs
  172. 171 usermod -aG students anna
  173. 172 usermod -aG students anouk
  174. 173 id anna
  175. 174 usermod -aG profs,account anna
  176. 175 usermod -aG profs,account anouk
  177. 176 usermod -G profs,account anouk
  178. 177 usermod -G profs,account anna
  179. 178 id anna
  180. 179 usermod -aG students linda
  181. 180 usermod -aG students lisa
  182. 181 mkdir -p /data/profs /data/students
  183. 182 cd /data
  184. 183 ls -l
  185. 184 chown anna:profs profs
  186. 185 chown anna:students students
  187. 186 ls -l
  188. 187 chmod 3770 *
  189. 188 ls -l
  190. 189 setfacl -m d:g:profs:rx /data/students
  191. 190 su - linda
  192. 191 su - anouk
  193. 192 getfacl /data/students
  194. 193 setfacl -m d:g:profs:rX /data/students/
  195. 194 su - anouke
  196. 195 su - anouk
  197. 196 ls -l
  198. 197 rm -rf students
  199. 198 mkdir students
  200. 199 chmod 3770 students
  201. 200 chown anna:students
  202. 201 chown anna:students students
  203. 202 ls -l
  204. 203 setfacl -R -m g:profs:rX students
  205. 204 setfacl -m d:g:profs:rx students
  206. 205 getfacl students
  207. 206 id anouk
  208. 207 su - anouk
  209. 208 ls l
  210. 209 ls -l
  211. 210 cd
  212. 211 lsblk
  213. 212 fdisk /dev/sda
  214. 213 lsblk
  215. 214 reboot
  216. 215 lsblk
  217. 216 mkfs.xfs /dev/sda5
  218. 217 mkdir /files
  219. 218 mount /dev/sda5 /files
  220. 219 mount
  221. 220 umount /files
  222. 221 vim /etc/fstab
  223. 222 mount -a
  224. 223 mount
  225. 224 df -h
  226. 225 mkfs.ext4 /dev/sda6
  227. 226 mkdir /ext4
  228. 227 vim /etc/fstab
  229. 228 mount -a
  230. 229 df -h
  231. 230 vim /etc/fstab
  232. 231 umount /files
  233. 232 fdisk /dev/sda
  234. 233 reboot
  235. 234 blkid
  236. 235 blkid | grep sda5
  237. 236 blkid | grep sda5 | awk '{ print $2 }'
  238. 237 blkid | grep sda5 | awk '{ print $2 }' >> /etc/fstab
  239. 238 vim /etc/fstab
  240. 239 reboot
  241. 240 ./countdown 12
  242. 241 fdisk -l /dev/sda
  243. 242 vim /etc/fstab
  244. 243 fstab /dev/sda
  245. 244 fdisk /dev/sda
  246. 245 lsblk
  247. 246 mount /dev/sda6 /mnt
  248. 247 df -h
  249. 248 xfs_admin --help
  250. 249 xfs_admin -L goat /dev/sda6
  251. 250 umount /dev/sda6
  252. 251 xfs_admin -L goat /dev/sda6
  253. 252 vim /etc/fstab
  254. 253 tune2fs /dev/sda5 -L cow
  255. 254 vim /etc/fstab
  256. 255 fdisk /dev/sda
  257. 256 reboot
  258. 257 blkid
  259. 258 cat /proc/partitions
  260. 259 lsblk
  261. 260 vim /etc/fstab
  262. 261 cd /etc/yum.repos.d/
  263. 262 ls
  264. 263 rm -f *
  265. 264 ls
  266. 265 yum repolist
  267. 266 yum install nmap
  268. 267 cd
  269. 268 dd if=/dev/sr0 of=/rhel8.iso bs=1M
  270. 269 ls -l /rhel8.iso
  271. 270 df -h
  272. 271 mkdir /repo
  273. 272 vim /etc/fstab
  274. 273 mount -a
  275. 274 ls /repo
  276. 275 yum repolist
  277. 276 ./countdown 12
  278. 277 cd /etc/yum.repos.d/
  279. 278 ls
  280. 279 cd /repo/
  281. 280 ls
  282. 281 cd BaseOS/
  283. 282 ls
  284. 283 ls Packages/
  285. 284 ls repodata/
  286. 285 cd /etc/yum.repos.d/
  287. 286 vim base.repo
  288. 287 yum repolist
  289. 288 vim appstream.repo
  290. 289 yum repolist
  291. 290 yum search nmap
  292. 291 yum search nano
  293. 292 vim base.repo
  294. 293 which yum
  295. 294 ls -l /bin/yum
  296. 295 yum provides */passwd
  297. 296 seinfo
  298. 297 grep iso /etc/fstab
  299. 298 cd /repo
  300. 299 ls
  301. 300 vim /etc/yum.repos.d/base.repo
  302. 301 cd
  303. 302 yum modules list
  304. 303 yum module list
  305. 304 yum module provides httpd
  306. 305 yum module info postgresql
  307. 306 yum module info --profile postgresql
  308. 307 yum module list postgresql
  309. 308 yum module list httpd
  310. 309 yum module install postgresql:9.6/devel
  311. 310 yum module install postgresql:9.6/server
  312. 311 yum install httpd
  313. 312 yum module info --profile php
  314. 313 yum modules install php:7.2/devel
  315. 314 yum module install php:7.2/devel
  316. 315 yum module reset php
  317. 316 yum module install --allowerasing php:7.3
  318. 317 systemctl status NetworkManager
  319. 318 cd /etc/sysconfig/network-scripts/
  320. 319 ls
  321. 320 vim ifcfg-ens160
  322. 321 nmtui
  323. 322 ip a
  324. 323 ip a a dev ens160 10.0.0.10/24
  325. 324 ip a
  326. 325 ifconfig
  327. 326 man ifconfig
  328. 327 rpm -qf $(which ifconfig)
  329. 328 yum delete net-tool
  330. 329 rpm -ql net-tools
  331. 330 yum remove net-tools
  332. 331 cd
  333. 332 ./countdown 12
  334. 333 systemctl status tuned
  335. 334 tuned-adm --help
  336. 335 tuned-adm list
  337. 336 tuned-adm profile desktop
  338. 337 tuned-adm list
  339. 338 fdisk /dev/sda
  340. 339 cat /proc/partitions
  341. 340 pvcreate /dev/sda7
  342. 341 pvs
  343. 342 xxd /dev/sda7 | less
  344. 343 vgcreate --help | less
  345. 344 vcreate -s 8M vgdata /dev/sda7
  346. 345 vgcreate -s 8M vgdata /dev/sda7
  347. 346 vgs
  348. 347 pvs
  349. 348 vgdisplay
  350. 349 man lvcreate
  351. 350 lvcreate -L 1G -n lvdata vgdata
  352. 351 echo $(( 128 * 8 ))
  353. 352 echo $(( 1016 / 8 ))
  354. 353 lvcreate -l 127 -n lvdata vgdata
  355. 354 lvs
  356. 355 mkfs.xfs /dev/vgdata/lvdata
  357. 356 mount /dev/vgdata/lvdata /mnt
  358. 357 mount
  359. 358 ls -l /dev/vgdata/lvdata /dev/mapper/vgdata-lvdata
  360. 359 xxd /dev/sda7 | less
  361. 360 vim /etc/fstab
  362. 361 mount -a
  363. 362 mkdir /lvdata
  364. 363 mount -a
  365. 364 history
  366.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement