Advertisement
sandervanvugt

LFCS june23

Jun 8th, 2023
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.03 KB | None | 0 0
  1. root@june-lfcs:~/lfcs# history
  2. 1 apt-file update
  3. 2 apt-file search nfs-server
  4. 3 apt install nfs-kernel-server
  5. 4 history
  6. 5 exit
  7. 6 history
  8. 7 #dnf provides */nfs-server
  9. 8 #yum provides */nfs-server
  10. 9 man -k user
  11. 10 man -k user | grep 8
  12. 11 man -k sander
  13. 12 updatedb
  14. 13 mandb
  15. 14 vim countdown
  16. 15 bash countdown 4
  17. 16 cat /etc/passwd
  18. 17 ls -l /home
  19. 18 which nologin
  20. 19 id
  21. 20 id student
  22. 21 useradd --help | less
  23. 22 useradd -m isabelle
  24. 23 id isabelle
  25. 24 ls -l /home
  26. 25 groupadd --help
  27. 26 groupadd -g 9999 profs
  28. 27 groupadd -g 9998 staff
  29. 28 groupadd -g 9998 students
  30. 29 useradd -m -G profs marcha
  31. 30 id marcha
  32. 31 useradd -m -s /usr/sbin/nologin lisa
  33. 32 id lida
  34. 33 id lisa
  35. 34 grep lisa /etc/passwd
  36. 35 id marcha
  37. 36 usermod -G students marcha
  38. 37 id marcha
  39. 38 usermod -aG profs marcha
  40. 39 id marcha
  41. 40 passwd isabelle
  42. 41 grep isabelle /etc/passwd
  43. 42 grep isabelle /etc/shadow
  44. 43 vim /etc/login.defs
  45. 44 exit
  46. 45 history
  47. 46 vim go1.txt
  48. 47 passwd marcha
  49. 48 openssl passwd -6 salt pepper mypassword
  50. 49 openssl passwd -6 -salt pepper mypassword
  51. 50 useradd linda
  52. 51 usermod -p $(openssl passwd -6 -salt pepper mypassword) linda
  53. 52 grep linda /etc/shadow
  54. 53 exit
  55. 54 man -k ulimit
  56. 55 find / -name "limits.conf"
  57. 56 cd /etc/security/
  58. 57 ls
  59. 58 vim limits.conf
  60. 59 history
  61. 60 useradd -m lisa -s /bin/bash
  62. 61 grep lisa /etc/shadow
  63. 62 passwd lisa
  64. 63 vim limits.conf
  65. 64 su - lisa
  66. 65 vim /etc/passwd
  67. 66 su - lisa
  68. 67 cd
  69. 68 findmnt
  70. 69 mount
  71. 70 lsblk
  72. 71 df -h
  73. 72 du -hs
  74. 73 du -hs /usr
  75. 74 systemctl status sshd
  76. 75 vim /etc/ssh/sshd_config
  77. 76 su - lisa
  78. 77 su - marcha
  79. 78 history
  80. 79 vim go2.txt
  81. 80 man sshd_config
  82. 81 cat /etc/shadow
  83. 82 cat /etc/passwd
  84. 83 cd /home/isabelle/
  85. 84 ls -a
  86. 85 su - isabelle
  87. 86 ssh isabelle@localhost
  88. 87 su - isabelle
  89. 88 df -h
  90. 89 vim /tmp/storage-use.txt
  91. 90 cd
  92. 91 lsblk
  93. 92 df -h
  94. 93 dd if=/dev/zero of=/diskfile bs=1M count=1024
  95. 94 ls -l /dev/loop*
  96. 95 losetup --help | less
  97. 96 losetup -f /diskfil
  98. 97 losetup --help
  99. 98 losetup -l
  100. 99 pvcreate /diskfile
  101. 100 pvcreate /dev/loop3
  102. 101 pvs
  103. 102 vgcreate --help | less
  104. 103 vgcreate vgdata /dev/loop3
  105. 104 vgs
  106. 105 lvcreate -n lvdata -L 600M vgdata
  107. 106 lvs
  108. 107 mkfs.ext4 /dev/vgdata/lvdata
  109. 108 vim /etc/fstab
  110. 109 mkdir /data
  111. 110 mount -a
  112. 111 df -h
  113. 112 vgs
  114. 113 lvextend -r -L +100M /dev/vgdata/lvdata
  115. 114 df -h
  116. 115 history
  117. 116 tail -5 /etc/fstab
  118. 117 vim go3.txt
  119. 118 grep -e vmx -e svm /proc/cpuinfo
  120. 119 poweroff
  121. 120 bash countdown 15
  122. 121 bash countdown 5
  123. 122 vim countdown
  124. 123 bash countdown 15 "lab monitoring storage and lab ssh"
  125. 124 df -h
  126. 125 bash countdown 2
  127. 126 bash countdown 25 "to work on lab configuring LVM"
  128. 127 loginctl show-user
  129. 128 loginctl list-users
  130. 129 loginctl list-sessions
  131. 130 ps faux | less
  132. 131 kill -9 5476
  133. 132 vim /etc/ssh/sshd_config
  134. 133 grep -e vmx -e svm /proc/cpuinfo
  135. 134 apt install kvm* qemu* libvirt* virt*
  136. 135 apt install kvm* qemu* libvirt*
  137. 136 apt update
  138. 137 apt upgrade
  139. 138 apt install kvm* qemu* libvirt*
  140. 139 apt install kvm* qemu* libvirt
  141. 140 apt install kvm* qemu* libvirtd
  142. 141 apt install kvm* qemu*
  143. 142 top
  144. 143 iostat
  145. 144 apt install sysstat
  146. 145 iostat
  147. 146 lvs
  148. 147 findmnt
  149. 148 lsof /
  150. 149 lsof / | wc -l
  151. 150 apt install iotop
  152. 151 iotop
  153. 152 top
  154. 153 ps faux | less
  155. 154 kill -9 18953
  156. 155 ps faux | less
  157. 156 htop
  158. 157 vmstat 2 5
  159. 158 sar -A
  160. 159 man sar
  161. 160 systemctl status crond
  162. 161 systemctl status cron
  163. 162 ls /etc/cron*/
  164. 163 vim /etc/cron.d/sysstat
  165. 164 sar -A
  166. 165 vim /etc/cron.d/sysstat
  167. 166 date
  168. 167 sleep 20
  169. 168 sar -A
  170. 169 vim /etc/cron.d/sysstat
  171. 170 cd /var/log/sysstat/
  172. 171 ls
  173. 172 sar --help | less
  174. 173 sar -u
  175. 174 cd
  176. 175 systemctl list-units -t timer
  177. 176 vmstat --active
  178. 177 vmstat
  179. 178 iostat
  180. 179 iostat --active
  181. 180 iostat 2 5
  182. 181 cd /boot
  183. 182 lsof /boot
  184. 183 kill 21337
  185. 184 exit
  186. 185 vim stress.sh
  187. 186 chmod +x stress.sh
  188. 187 ./stress.sh &
  189. 188 top
  190. 189 ./stress.sh &
  191. 190 exit
  192. 191 ls
  193. 192 countdown 20
  194. 193 bash countdown 20
  195. 194 bash countdown 5
  196. 195 history
  197. 196 poweroff
  198. 197 bash countdown 3
  199. 198 mkdir /root/anna ; find / -user anna -exec cp -r {} /root/anna \;
  200. 199 useradd -m anna -s /bin/bash
  201. 200 su - anna
  202. 201 mkdir /root/anna ; find / -user anna -exec cp -r {} /root/anna \;
  203. 202 ls /root/anna/
  204. 203 su - anna
  205. 204 ls /etc/cron*/
  206. 205 vim /etc/crontab
  207. 206 systemctl status cron
  208. 207 ls -l /tmp/anna
  209. 208 crontab -e
  210. 209 date
  211. 210 journalctl
  212. 211 bash countdown 5
  213. 212 ls
  214. 213 countdown
  215. 214 echo $PATH
  216. 215 ./countdown
  217. 216 chmod +x countdown
  218. 217 ln countdown /usr/local/bin/
  219. 218 countdown 10
  220. 219 git clone https://github.com/ewxrjk/fingerd/
  221. 220 cd fingerd/
  222. 221 ls
  223. 222 cd ..
  224. 223 countdown 9
  225. 224 cd fingerd/
  226. 225 ls
  227. 226 less README.md
  228. 227 autoreconf -si
  229. 228 apt install autoconf make gcc
  230. 229 autoreconf -si
  231. 230 ls
  232. 231 ./configure
  233. 232 ls
  234. 233 make
  235. 234 make install
  236. 235 ls -l /usr/local/sbin/trivial.fingerd
  237. 236 history
  238. 237 cd
  239. 238 systemctl list-unit-files
  240. 239 apt-file search nfs-server.service
  241. 240 systemctl status nfs-server
  242. 241 showmount -e localhost
  243. 242 showmount -e 192.168.29.140
  244. 243 vim /etc/exports
  245. 244 showmount -e localhost
  246. 245 systemctl restart nfs-server
  247. 246 showmount -e localhost
  248. 247 vim /etc/exports
  249. 248 systemctl restart nfs-server
  250. 249 showmount -e localhost
  251. 250 countdown 10
  252. 251 history
  253. 252 systemctl status ntp
  254. 253 systemctl status ntpd
  255. 254 systemctl list-unit-files ntp*
  256. 255 apt search ntp
  257. 256 apt-file search ntp
  258. 257 apt-file search ntp.service
  259. 258 apt install ntp
  260. 259 vim /etc/ntp.conf
  261. 260 systemctl status ntp
  262. 261 ntpdate -q
  263. 262 apt install ntpdate
  264. 263 ntpdate -q
  265. 264 ntpdate -q pool.ubuntu.org
  266. 265 vim /etc/ntp.conf
  267. 266 ntpdate -q 0.ubuntu.pool.ntp.org
  268. 267 countdown 15
  269. 268 history
  270. 269 mkdir openssl
  271. 270 cd openssl/
  272. 271 openssl genrsa -des3 -out myCA.key 2048
  273. 272 openssl req -x509 -new -nodes -key myCA.key -sha256 -days 3650 -out myCA.pem
  274. 273 ls
  275. 274 ls -l
  276. 275 openssl genrsa -out tls.key 2048
  277. 276 openssl req -new -key tls.key -out tls.csr
  278. 277 ls -l
  279. 278 openssl x509 -req -in tls.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial -out tls.crt -days 1650 -sha256
  280. 279 openssl x509 -in tls.crt -noout -text | less
  281. 280 pwd
  282. 281 cd /etc/pki/
  283. 282 ls
  284. 283 mkdir tls
  285. 284 history
  286. 285 cd
  287. 286 cd lfcs
  288. 287 git clone https://github.com/sandervanvugt/lfcs
  289. 288 cd lfcs
  290. 289 ls
  291. 290 openssl x509 -noout -subject -nameopt multiline -in tls.crt
  292. 291 less tls.crt
  293. 292 strings tls.crt
  294. 293 openssl x509 -noout -in tls.crt
  295. 294 openssl x509 -noout -in tls.crt -text
  296. 295 openssl x509 -noout -in tls.crt -text | less
  297. 296 man openssl-x509
  298. 297 apt install firewalld
  299. 298 firewall-cmd --list-all
  300. 299 firewall-cmd --get-services
  301. 300 firewall-cmd --add-service jenkins
  302. 301 firewall-cmd --list-all
  303. 302 firewall-cmd --add-service jenkins --permanent
  304. 303 man -k firewalld
  305. 304 firewall-cmd --help | grep forward
  306. 305 firewall-cmd --add-forward-port=port=80:proto=tcp:toport=8080
  307. 306 firewall-cmd --list-all
  308. 307 man firewalld.richlanguage
  309. 308 history
  310. 309 vim cb.sh
  311. 310 sudo firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="172.19.0.0/16" forward-port to-port="8081" to-addr="127.0.0.1" protocol="tcp" port="80"'
  312. 311 sudo firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" forward-port to-port="8088" to-addr="127.0.0.1" protocol="tcp" port="80"'
  313. 312 history
  314. 313 docker run nginx
  315. 314 apt install docker.io
  316. 315 docker run nginx
  317. 316 docker run -d nginx
  318. 317 docker ps
  319. 318 docker run -d -p 8088:80 nginx
  320. 319 docker ps
  321. 320 curl localhost:8088
  322. 321 docker stop b3d
  323. 322 docker ps
  324. 323 man -k docker
  325. 324 man -k docker | wc -l
  326. 325 man docker-run
  327. 326 docker run -d mariadb
  328. 327 docker ps
  329. 328 docker ps -a
  330. 329 docker logs nostalgic_swartz
  331. 330 docker run -d -e MARIADB_ROOT_PASSWORD=password mariadb
  332. 331 docker ps
  333. 332 vim Dockerfile
  334. 333 docker build -t alpmap:latest .
  335. 334 docker images
  336. 335 docker run alpmap
  337. 336 docker ps
  338. 337 docker ps -a
  339. 338 history
  340. 339 docker build -t alpmap:latest:latest .
  341. 340 docker run -d -p 8080:80 --memory=256m --restart=unless-stopped nginx
  342. 341 docker top
  343. 342 docker top hungry_babbage
  344. 343 docker ps
  345. 344 docker inspect hungry_babbage | less
  346. 345 cd /proc/sys
  347. 346 ls
  348. 347 cd vm
  349. 348 ls
  350. 349 cat swappiness
  351. 350 echo 30 > swappiness
  352. 351 cat swappiness
  353. 352 sysctl -a | grep swapp
  354. 353 vim /etc/sysctl.conf
  355. 354 sysctl -a | grep ip_fo
  356. 355 cd
  357. 356 countdown 5
  358. 357 cd lfcs
  359. 358 ls
  360. 359 ./run-apache2.sh
  361. 360 systemctl status apache2
  362. 361 systemctl restart apache2
  363. 362 systemctl status apache2
  364. 363 which apache2
  365. 364 ls -l /usr/sbin/apache2
  366. 365 chmod +r /usr/sbin/apache2
  367. 366 chmod -x /usr/sbin/apache2
  368. 367 systemctl restart apache2
  369. 368 systemctl status apache2
  370. 369 journalctl -u apache2
  371. 370 systemctl status apache2
  372. 371 ls -l /usr/sbin/apache2
  373. 372 chmod +x /usr/sbin/apache2
  374. 373 systemctl restart apache2
  375. 374 systemctl status apache2
  376. 375 chmod -r /usr/sbin/apache2
  377. 376 systemctl restart apache2
  378. 377 ls -l /usr/sbin/apache2
  379. 378 history
  380.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement