sandervanvugt

Untitled

May 27th, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.00 KB | None | 0 0
  1. [student@server2 ~]$ su -
  2. Password:
  3. [root@server2 ~]# vim /etc/fstab
  4. [root@server2 ~]# history
  5. 1 sudo useradd lisa
  6. 2 sudo userdel lida
  7. 3 sudo userdel lisa
  8. 4 sudo passwd lisa
  9. 5 sudo passwd root
  10. 6 exit
  11. 7 sudo passwd root
  12. 8 sudo passwd bob
  13. 9 exit
  14. 10 touch lindafile1
  15. 11 touch lindafile2
  16. 12 exit
  17. 13 cd /etc/sudoers.d/
  18. 14 ls
  19. 15 cat linda
  20. 16 yum provides */pbrun
  21. 17 cd /etc
  22. 18 ls sudoer*
  23. 19 cd /home/student/
  24. 20 ./countdown 12
  25. 21 man hier
  26. 22 cd /
  27. 23 ls
  28. 24 ls -l
  29. 25 cd boot
  30. 26 ls
  31. 27 cd /dev
  32. 28 ls
  33. 29 cd /etc
  34. 30 ls
  35. 31 cat sudoers
  36. 32 cat passwd
  37. 33 cd /
  38. 34 ls
  39. 35 cd home
  40. 36 ls
  41. 37 cd /root
  42. 38 ls
  43. 39 pwd
  44. 40 cd run
  45. 41 cd /run
  46. 42 ls
  47. 43 cd /tmp
  48. 44 ls
  49. 45 cd /usr
  50. 46 du -hs
  51. 47 ls
  52. 48 cd /var
  53. 49 ls
  54. 50 cd log
  55. 51 ls
  56. 52 cd /
  57. 53 ls -l
  58. 54 ls -il /etc/hosts
  59. 55 ln /etc/hosts /root/myhosts
  60. 56 ls -il /etc/hosts /root/myhosts
  61. 57 echo hello >> /etc/hosts
  62. 58 ls -il /etc/hosts /root/myhosts
  63. 59 cat /root/myhosts
  64. 60 cd
  65. 61 ln -s /root/myhosts /tmp/symhosts
  66. 62 ls -il /etc/hosts /root/myhosts /tmp/symhosts
  67. 63 cat /tmp/symhosts
  68. 64 rm /root/myhosts
  69. 65 ls -il /etc/hosts /root/myhosts /tmp/symhosts
  70. 66 cat /tmp/symhosts
  71. 67 ln /etc/hosts /root/myhosts
  72. 68 ls -il /etc/hosts /root/myhosts /tmp/symhosts
  73. 69 ln /etc /myetc
  74. 70 ln /boot/vmlinuz-4.18.0-147.el8.x86_64 mykernel
  75. 71 find / -samefile /etc/hosts
  76. 72 find / -samefile /etc/hosts
  77. 73 find / -samefile /etc/hosts 2> /dev/null
  78. 74 history
  79. 75 history | less
  80. 76 cp /tmp/symhosts .
  81. 77 ls -l
  82. 78 cat symhosts
  83. 79 man hier
  84. 80 lsblk
  85. 81 umount /dev/sdb1
  86. 82 lsblk
  87. 83 mount /dev/sdb1 /mnt
  88. 84 ls /mnt
  89. 85 umount /mnt
  90. 86 cd /home/student/
  91. 87 ls
  92. 88 countdown
  93. 89 echo $PATH
  94. 90 mv countdown /usr/bin
  95. 91 countdown 12
  96. 92 man -k user
  97. 93 man man
  98. 94 man apropos
  99. 95 man mandb
  100. 96 mandb
  101. 97 man -k user
  102. 98 man man
  103. 99 man -k user | grep 8
  104. 100 find / -name "hosts"
  105. 101 find / -name "*hosts*"
  106. 102 find / -user linda
  107. 103 find / -size +100M
  108. 104 find / -user linda -exec ls -l {} \;
  109. 105 find / -user linda -exec cp {} /root \;
  110. 106 ls
  111. 107 ls -la
  112. 108 su - linda
  113. 109 find / -user linda -exec cp {} /root \;
  114. 110 ls -l
  115. 111 pwd
  116. 112 cd /root
  117. 113 ls -l
  118. 114 history
  119. 115 ps aux
  120. 116 ps aux | grep ssh
  121. 117 grep linda /etc/*
  122. 118 grep linda /etc/* 2>/dev/null
  123. 119 grep -l linda /etc/* 2>/dev/null
  124. 120 grep -lR linda /etc/* 2>/dev/null
  125. 121 which vi
  126. 122 which vim
  127. 123 ls -l /bin/vi /bin/vim
  128. 124 exit
  129. 125 vim /etc/hosts
  130. 126 vim /etc/login.defs
  131. 127 echo $(( 99999 / 365 ))
  132. 128 vim /etc/login.defs
  133. 129 groupadd sales
  134. 130 groupadd account
  135. 131 useradd --help
  136. 132 useradd -G sales linda
  137. 133 id linda
  138. 134 usermod -aG sales linda
  139. 135 id linda
  140. 136 usermod -aG sales lisa
  141. 137 useradd -G account anna
  142. 138 useradd -G account anouk
  143. 139 history
  144. 140 tail -n 6 /etc/passwd
  145. 141 tail -n 3 /etc/group
  146. 142 tail -n 6 /etc/group
  147. 143 mkdir /data/sales
  148. 144 mkdir /data/sales -p
  149. 145 mkdir /data/account -p
  150. 146 cd /data
  151. 147 ls -l
  152. 148 id
  153. 149 chown :account account
  154. 150 ls -l
  155. 151 chgrp sales sales
  156. 152 ls -l
  157. 153 chmod 770 *
  158. 154 ls -l
  159. 155 su - lisa
  160. 156 su - linda
  161. 157 su - lisa
  162. 158 history
  163. 159 echo this is some text > rootfile
  164. 160 md5sum rootfile
  165. 161 md5sum rootfile > rootfile.md5
  166. 162 cat rootfile.md5
  167. 163 vim rootfile
  168. 164 md5sum rootfile
  169. 165 mkdir mydir
  170. 166 mkdir complete/path/of/directories
  171. 167 mkdir -p complete/path/of/directories
  172. 168 cp /etc/hosts /data/sales
  173. 169 cp /etc/hosts /data/sals
  174. 170 ls /data/sales
  175. 171 ls -l /data/sals
  176. 172 cat /data/sals
  177. 173 cp /etc/hosts /data/account/
  178. 174 cp /etc/hosts /data/accont/
  179. 175 history
  180. 176 vim rootfile
  181. 177 md5sum rootfile > newmd5.md5
  182. 178 diff rootfile.md5 newmd5.md5
  183. 179 cat rootfile.md5 newmd5.md5
  184. 180 vim /etc/group
  185. 181 cd /home/linda
  186. 182 vim playme
  187. 183 chmod +x playme
  188. 184 ./playme
  189. 185 chmod u+s playme
  190. 186 ls -l
  191. 187 su - linda
  192. 188 find / -perm /4000 -exec ls -l {} \;
  193. 189 ls -l /etc/shadow
  194. 190 cd /data/sales
  195. 191 su - linda
  196. 192 su - lisa
  197. 193 chmod g+s .
  198. 194 ls -l .
  199. 195 ls -ld .
  200. 196 su - lisa
  201. 197 chmod +t .
  202. 198 ls -ld .
  203. 199 su - lisa
  204. 200 id linda
  205. 201 grep linda /etc/group
  206. 202 grep linda /etc/passwd
  207. 203 less /var/log/messages
  208. 204 less /var/log/audit/audit.log
  209. 205 man auditctl
  210. 206 auditctl -w /etc/ -p wa
  211. 207 vim /etc/motd
  212. 208 less /var/log/audit/audit.log
  213. 209 cd ..
  214. 210 ls -l
  215. 211 rm r*
  216. 212 rm sals
  217. 213 rmdir mydir/ complete/
  218. 214 rm -rf complete/
  219. 215 ls -l
  220. 216 rm newmd5.md5
  221. 217 ls -l
  222. 218 getfacl sales
  223. 219 setfacl -m -R g:account:rx sales
  224. 220 setfacl -R -m g:account:rx sales
  225. 221 getfacl sales
  226. 222 cd sales
  227. 223 ls -l
  228. 224 man setfacl
  229. 225 cd ..
  230. 226 setfacl -R -x g:account sales
  231. 227 ls -l sales/
  232. 228 setfacl -R -m g:account:rX sales
  233. 229 getfacl sales
  234. 230 ls -l sales/
  235. 231 setfacl sales/lisa1
  236. 232 getfacl sales/lisa1
  237. 233 su - lisa
  238. 234 getfacl sales/newlisa
  239. 235 setfacl -m d:g:account:rx sales
  240. 236 getfacl sales
  241. 237 su - lisa
  242. 238 getfacl sales/lisa123
  243. 239 history
  244. 240 countdown 13
  245. 241 vim /etc/login.defs
  246. 242 groupadd profs students
  247. 243 groupadd profs
  248. 244 groupadd student
  249. 245 groupadd students
  250. 246 useradd mandy -aG students
  251. 247 useradd -aG students mandy
  252. 248 useradd -G students mandy
  253. 249 useradd -G students melanie
  254. 250 useradd -G profs boris
  255. 251 useradd -G profs bobob
  256. 252 history
  257. 253 usermod -aG students linda
  258. 254 usermod -aG students lisa
  259. 255 usermod -aG profs anna
  260. 256 usermod -aG profs anouk
  261. 257 chage -l linda
  262. 258 chage -l bob
  263. 259 chage -l bobob
  264. 260 chage bob
  265. 261 yum repolist
  266. 262 cd /etc/yum.repos.d/
  267. 263 ls
  268. 264 rm -f *
  269. 265 yum repolist
  270. 266 cd
  271. 267 dd if=/dev/sr0 of=/centos8.iso bs=1M
  272. 268 mkdir /repo
  273. 269 vim /etc/fstab
  274. 270 mount -a
  275. 271 cd /repo
  276. 272 ls
  277. 273 cd BaseOS/
  278. 274 ls
  279. 275 cd Packages/
  280. 276 ls
  281. 277 cd ../..
  282. 278 cd AppStream/
  283. 279 ls
  284. 280 cd Packages/
  285. 281 ls
  286. 282 cd ..
  287. 283 cd /etc/yum.repos.d/
  288. 284 vim baseos.repo
  289. 285 vim appstream.repo
  290. 286 yum repolist
  291. 287 vim appstream.repo
  292. 288 yum repolist
  293. 289 yum search nmap
  294. 290 yum install nmap
  295. 291 yum search seinfo
  296. 292 yum provides */seinfo
  297. 293 yum remove kernel
  298. 294 yum remove bash
  299. 295 cat appstream.repo baseos.repo
  300. 296 yum groups list
  301. 297 yum groups list --hidden
  302. 298 yum groups info "Virtualization Tools"
  303. 299 yum groups install "Virtualization Tools"
  304. 300 yum install -y epel-release
  305. 301 yum search epel
  306. 302 yum provides */kvm2
  307. 303 cd
  308. 304 countdown 12
  309. 305 ping google.com
  310. 306 yum modules list
  311. 307 yum module list
  312. 308 yum module list | less
  313. 309 yum modules provides httpd
  314. 310 yum module provides httpd
  315. 311 yum module info httpd
  316. 312 yum module install postgresql:9.6/devel
  317. 313 yum module info postgresql
  318. 314 yum module install postgresql:9.6/server
  319. 315 ip -h
  320. 316 ip a
  321. 317 ip addr add dev ens33 10.0.0.10/24
  322. 318 ip a
  323. 319 ping 10.0.0.10
  324. 320 ifconfig
  325. 321 ifconfig -a
  326. 322 man ifconfig
  327. 323 which ifconfig
  328. 324 rpm -qf $(which ifconfig)
  329. 325 rpm -ql net-tools
  330. 326 rpm -ql net-tools | grep bin
  331. 327 yum remove net-tools
  332. 328 ip route show
  333. 329 ip route del default via 192.168.4.2
  334. 330 ip route show
  335. 331 ping nu.nl
  336. 332 ip route add default via 192.168.4.2
  337. 333 ping nu.nl
  338. 334 vim /etc/resolv.conf
  339. 335 vim /etc/sysconfig/network-scripts/ifcfg-ens33
  340. 336 systemctl status NetworkManager
  341. 337 nmtui
  342. 338 ip a
  343. 339 ping nu.nl
  344. 340 vim /etc/sysconfig/network-scripts/ifcfg-ens33
  345. 341 vim /etc/resolv.conf
  346. 342 systemctl restart NetworkManager
  347. 343 vim /etc/resolv.conf
  348. 344 ip neigh
  349. 345 ip neigh -h
  350. 346 ip neigh help
  351. 347 ip neigh show
  352. 348 nmap -sn 192.168.4.0/24
  353. 349 ip neigh show
  354. 350 history
  355. 351 nmap -sn 192.168.4.0/24
  356. 352 ping 192.168.4.1
  357. 353 ping 192.168.4.254
  358. 354 ip neigh show
  359. 355 countdown 13
  360. 356 lsblk
  361. 357 poweroff
  362. 358 lsblk
  363. 359 fdisk /dev/sda
  364. 360 lsblk
  365. 361 mkfs.xfs /dev/sda3
  366. 362 mount /dev/sda3 /mnt
  367. 363 mount
  368. 364 mount | grep '^/'
  369. 365 vim /etc/fstab
  370. 366 mount -a
  371. 367 mkdir /myfiles
  372. 368 mount -a
  373. 369 mount | grep '^/'
  374. 370 umount /mnt
  375. 371 reboot
  376. 372 vim /etc/fstab
  377. 373 reboot
  378. 374 vim /etc/fstab
  379. 375 reboot
  380. 376 vim /etc/fstab
  381. 377 history
Add Comment
Please, Sign In to add comment