sandervanvugt

RHCSA-jul20-day2

Jul 14th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.83 KB | None | 0 0
  1. [root@localhost ~]# history
  2. 1 vimtutor
  3. 2 vim countdown
  4. 3 countdown 12
  5. 4 echo $PATH
  6. 5 ./countdown 12
  7. 6 ls -l countdown
  8. 7 chmod +x countdown
  9. 8 ./countdown 12
  10. 9 exit
  11. 10 visudo
  12. 11 id student
  13. 12 usermod -aG wheel student
  14. 13 id student
  15. 14 exit
  16. 15 visudo
  17. 16 useradd linda
  18. 17 passwd linda
  19. 18 su - linda
  20. 19 visudo
  21. 20 su - linda
  22. 21 visudo
  23. 22 vim /etc/sudoers.d/linda
  24. 23 history
  25. 24 systemctl isolate multi-user.target
  26. 25 systemctl start graphical.target
  27. 26 history
  28. 27 exit
  29. 28 ip a
  30. 29 systemctl status sshd
  31. 30 firewall-cmd --list-all
  32. 31 ./countdown 13
  33. 32 ./countdown
  34. 33 countdown
  35. 34 echo $PATH
  36. 35 cp countdown /usr/local/bin
  37. 36 cd /
  38. 37 ls -l
  39. 38 man hier
  40. 39 cd /etc
  41. 40 ls
  42. 41 cd
  43. 42 vim countdown
  44. 43 countdown 0
  45. 44 ln /etc/hosts myhosts
  46. 45 ls -il /etc/hosts myhosts
  47. 46 echo 10.0.0.10 dummy >> myhosts
  48. 47 ls -il /etc/hosts myhosts
  49. 48 ln -s myhosts symhosts
  50. 49 ls -il /etc/hosts myhosts symhosts
  51. 50 cat symhosts myhosts /etc/hosts
  52. 51 rm myhosts
  53. 52 ls -il /etc/hosts myhosts symhosts
  54. 53 cat symhosts
  55. 54 ln /etc/hosts myhosts
  56. 55 rm /etc/hosts
  57. 56 cat myhosts
  58. 57 ln myhosts /etc/hosts
  59. 58 ln /boot/vmlinuz-4.18.0-193.el8.x86_64 kernel
  60. 59 ln -s /boot/vmlinuz-4.18.0-193.el8.x86_64 kernel
  61. 60 ln /etc myetc
  62. 61 ln -s /etc myetc
  63. 62 lsblk
  64. 63 umount /dev/sdb1
  65. 64 ls /mnt
  66. 65 mount /dev/sdb1 /mnt
  67. 66 ls /mnt
  68. 67 cd /mnt
  69. 68 ls
  70. 69 umount /dev/sdb1
  71. 70 lsof /mnt
  72. 71 cd
  73. 72 umount /dev/sdb1
  74. 73 cd /boot
  75. 74 ls
  76. 75 cd
  77. 76 ls
  78. 77 rm myhosts
  79. 78 find / -xtype l
  80. 79 ls -l
  81. 80 find / -xtype l | grep host
  82. 81 find -P ./ -xtype l
  83. 82 find / -xtype l -exec ls -l {} \;
  84. 83 find / -xtype l -exec ls -l {} \; 2>/dev/null
  85. 84 find / -name "hosts"
  86. 85 find / -name "*hosts*"
  87. 86 find / -size +100M > bigfiles.txt
  88. 87 less bigfiles.txt
  89. 88 find / -user linda
  90. 89 ls -l /run/user/1000/
  91. 90 ls -il /run/user/1000/
  92. 91 ls -il /run/user/1000/gvfs
  93. 92 echo $?
  94. 93 history
  95. 94 alias twaalf='countdown 12'
  96. 95 twaalf
  97. 96 man password
  98. 97 man -k password
  99. 98 man man
  100. 99 man apropos
  101. 100 mandb
  102. 101 man -k password
  103. 102 man -k password | wc
  104. 103 man -k password | grep 1
  105. 104 man passwd
  106. 105 man -k authentication
  107. 106 man -k user
  108. 107 less /etc/passwd
  109. 108 less /etc/shadow
  110. 109 man passwd
  111. 110 man 5 passwd
  112. 111 man pwconv
  113. 112 ls -l /etc/passwd
  114. 113 ls -l /etc/shadow
  115. 114 cat /etc/shadow
  116. 115 id student
  117. 116 grep student /etc/group
  118. 117 grep student /etc/passwd
  119. 118 id student
  120. 119 vim /etc/login.defs
  121. 120 useradd lisa
  122. 121 passwd -l lisa
  123. 122 passwd -u lisa
  124. 123 passwd -L lisa
  125. 124 chage lisa
  126. 125 chage -L lisa
  127. 126 chage -l lisa
  128. 127 groups --help
  129. 128 groups student
  130. 129 history
  131. 130 chage lisa
  132. 131 chage --help
  133. 132 groupadd account
  134. 133 groupadd sales
  135. 134 useradd -G account anna
  136. 135 useradd -G account anouk
  137. 136 id anna
  138. 137 w
  139. 138 id linda
  140. 139 id lisa
  141. 140 usermod -aG sales lisa
  142. 141 usermod -aG sales linda
  143. 142 id lisa
  144. 143 usermod -G wheel lisa
  145. 144 id lisa
  146. 145 usermod -aG sales lisa
  147. 146 usermod --help | less
  148. 147 ls -l $(which useradd) $(which adduser)
  149. 148 ls -l /etc/skel
  150. 149 ls -al /etc/skel
  151. 150 touch /etc/skel/blah
  152. 151 useradd bill
  153. 152 ls -la /home/bill
  154. 153 history
  155. 154 cd /home
  156. 155 ls -l
  157. 156 cd /etc
  158. 157 ls -l
  159. 158 cd
  160. 159 tail -2 /etc/group
  161. 160 tail -8 /etc/group
  162. 161 mkdir /data/sales
  163. 162 mkdir -p /data/sales
  164. 163 mkdir -p /data/account
  165. 164 cd /data
  166. 165 ls -l
  167. 166 id
  168. 167 chown linda.sales sales
  169. 168 ls -l
  170. 169 chgrp account account
  171. 170 ls -l
  172. 171 chmod 770 *
  173. 172 ls -l
  174. 173 history
  175. 174 mkdir linda
  176. 175 chown linda linda
  177. 176 chmod 100 linda
  178. 177 ls -l
  179. 178 cd linda
  180. 179 touch a b c d e
  181. 180 ls -l
  182. 181 su - linda
  183. 182 pwd
  184. 183 chmod u+w .
  185. 184 ls -ld .
  186. 185 pwd
  187. 186 su - linda
  188. 187 pwd
  189. 188 chmod 400 .
  190. 189 ls -ld .
  191. 190 su - linda
  192. 191 history
  193. 192 pwd
  194. 193 cd /home/linda
  195. 194 touch rootfile
  196. 195 ls -l
  197. 196 su - linda
  198. 197 pwd
  199. 198 touch r2
  200. 199 su - linda
  201. 200 ls -l
  202. 201 cd
  203. 202 ls -l
  204. 203 ln /etc/hosts myhosts
  205. 204 ls -l /etc/hosts myhosts symhosts
  206. 205 passwd linda
  207. 206 ls -l /home/linda
  208. 207 ls -ld /home/linda
  209. 208 pwd
  210. 209 cd /home/linda
  211. 210 echo wortel > rootfile3
  212. 211 su - linda
  213. 212 pwd
  214. 213 cd ..
  215. 214 ls -l
  216. 215 userdel bill
  217. 216 ls -l
  218. 217 useradd jim -u 1006 -g 1008
  219. 218 ls -l
  220. 219 useradd jim -u 1006
  221. 220 ls -l
  222. 221 cd
  223. 222 find / -user "jim" -exec mv {} /root/ \;
  224. 223 ls
  225. 224 userdel --help
  226. 225 userdel -r jim
  227. 226 cd /home/linda
  228. 227 vim playme
  229. 228 chmod +x playme
  230. 229 su - linda
  231. 230 vim playme
  232. 231 chmod u+s playme
  233. 232 ls -l
  234. 233 find / -perm /4000 2>/dev/null
  235. 234 ls -l /usr/bin/passwd
  236. 235 ls -l /etc/shadow
  237. 236 cd /data
  238. 237 ls -l
  239. 238 su - anna
  240. 239 chmod g+s account/
  241. 240 ls -l
  242. 241 su - anna
  243. 242 ls
  244. 243 ls -l
  245. 244 su anouk
  246. 245 su - anouk
  247. 246 chmod +t *
  248. 247 ls -l
  249. 248 su - anouk
  250. 249 su - lisa
  251. 250 su - linda
  252. 251 su - anouk
  253. 252 history
  254. 253 countdown 13
  255. 254 ls -l
  256. 255 cd sales
  257. 256 ls
  258. 257 su - linda
  259. 258 chmod g+s sales
  260. 259 chmod g+s .
  261. 260 pwd
  262. 261 ls -ld .
  263. 262 su - linda
  264. 263 cd ..
  265. 264 getfacl sales
  266. 265 setfacl -m -R g:account:rx sales
  267. 266 setfacl -R -m g:account:rx sales
  268. 267 getfacl sales
  269. 268 ls -l sales
  270. 269 man setfacl
  271. 270 setfacl -x g:account sales
  272. 271 getfacl sales
  273. 272 setfacl -R -m g:account:rX sales
  274. 273 ls -l sales/
  275. 274 setfacl -x g:account sales
  276. 275 ls -l sales/
  277. 276 setfacl -R -x g:account sales
  278. 277 ls -l sales/
  279. 278 setfacl -R -m g:account:rX sales
  280. 279 ls -l sales/
  281. 280 getfacl sales
  282. 281 cd sales
  283. 282 getfacl a
  284. 283 history
  285. 284 su - linda
  286. 285 setfacl -m d:g:account:rx sales
  287. 286 setfacl -m d:g:account:rx .
  288. 287 su - linda
  289. 288 cd
  290. 289 yum repolist
  291. 290 cd /etc/yum.repos.d/
  292. 291 ls
  293. 292 rm -f *
  294. 293 yum repolist
  295. 294 cd /
  296. 295 df -h
  297. 296 dd if=/dev/sr0 of=/centos82.iso bs=1M &
  298. 297 mkdir /repo
  299. 298 vim /etc/fstab
  300. 299 ls /repo
  301. 300 mount -a
  302. 301 ls /repo
  303. 302 mount | grep repo
  304. 303 cd repo
  305. 304 ls
  306. 305 cd BaseOS/
  307. 306 ls
  308. 307 cd Packages/
  309. 308 ls
  310. 309 cd ..
  311. 310 cd repodata/
  312. 311 ls
  313. 312 cd ../../AppStream/
  314. 313 ls
  315. 314 cd
  316. 315 yum repolist
  317. 316 cd /etc/yum.repos.d/
  318. 317 vim BaseOS.repo
  319. 318 yum repolist
  320. 319 vim AppStream.repo
  321. 320 yum repolist
  322. 321 vim classroom.repo
  323. 322 yum repolist
  324. 323 cat classroom.repo
  325. 324 vim classroom.repo
  326. 325 yum repolist
  327. 326 cd
  328. 327 mount
  329. 328 mount | grep '^/'
  330. 329 history
  331. 330 history | grep dd
  332. 331 countdown 12
  333. 332 which yum
  334. 333 ls -l /usr/bin/yum
  335. 334 yum search nmap
  336. 335 yum install nmap-ncat
  337. 336 yum install nmap
  338. 337 yum search seinfo
  339. 338 yum provides */seinfo
  340. 339 yum install setools-console
  341. 340 yum module list
  342. 341 yum module provides httpd
  343. 342 yum module provides python
  344. 343 yum module provides python36
  345. 344 yum module provides nginx
  346. 345 yum module info nginx
  347. 346 yum module info postgresql
  348. 347 yum module info nginx
  349. 348 yum module install nginx:1.16
  350. 349 ip a
  351. 350 ip addr show
  352. 351 ip addr add dev ens33 10.0.0.10/24
  353. 352 ip a
  354. 353 ping 10.0.0.10
  355. 354 ifconfig
  356. 355 ifconfig -a
  357. 356 man ifconfig
  358. 357 ip -s link
  359. 358 which ifconfig
  360. 359 rpm -qf $(which ifconfig)
  361. 360 rpm -ql net-tools | grep bin
  362. 361 yum remove net-tools
  363. 362 ip route show
  364. 363 ping nu.nl
  365. 364 ip route del default via 192.168.4.2
  366. 365 ping nu.nl
  367. 366 ip route show
  368. 367 ip route add default via 192.168.4.2
  369. 368 ping nu.nl
  370. 369 cat /etc/resolv.conf
  371. 370 which dig
  372. 371 rpm -qf /usr/bin/dig
  373. 372 systemctl status NetworkManager
  374. 373 nmtui
  375. 374 ip a
  376. 375 vim /etc/sysconfig/network-scripts/ifcfg-ens33
  377. 376 nmtui
  378. 377 ip a
  379. 378 yum install bash-completion
  380. 379 nmcli connection show
  381. 380 nmcli connection show ens33
  382. 381 nmcli connection modify ens33 ipv4.addresses 192.168.4.190/24
  383. 382 cat /etc/sysconfig/network-scripts/ifcfg-ens33
  384. 383 ip a
  385. 384 nmcli connection up ens33
  386. 385 ip a
  387. 386 history
  388. 387 ip a
  389. 388 ip route show
  390. 389 cat /etc/resolv.conf
  391. 390 ping nu.nl
  392. 391 countdown 12
  393. 392 poweroff
  394. 393 history
Add Comment
Please, Sign In to add comment