sandervanvugt

LFCS sep20 day1

Sep 28th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.04 KB | None | 0 0
  1. 1 cd /home/linda/
  2. 2 rm -f rootfile2
  3. 3 man chattr
  4. 4 chattr -i rootfile2
  5. 5 exit
  6. 6 mount
  7. 7 mount | grep '^/'
  8. 8 swapon -s
  9. 9 yum install -y git
  10. 10 git clone https://github.com/sandervanvugt/lfcs
  11. 11 cd lfcs
  12. 12 ls
  13. 13 ./countdown 12
  14. 14 ps aux | grep fire
  15. 15 ps aux | grep defunct
  16. 16 history
  17. 17 find / -name "hosts"
  18. 18 find / -name "hosts" 2>/dev/null
  19. 19 find / -name "*hosts*" 2>/dev/null
  20. 20 useradd linda
  21. 21 find / -user linda
  22. 22 mkdir linda
  23. 23 find / -user linda -exec cp {} /root/linda\;
  24. 24 find / -user linda -exec cp {} /root/linda \;
  25. 25 who
  26. 26 ls
  27. 27 who; ls
  28. 28 ls
  29. 29 ls -a linda/
  30. 30 su - linda
  31. 31 find / -user linda -exec cp {} /root/linda \;
  32. 32 ls -a linda/
  33. 33 find / -user linda -exec cp -R {} /root/linda \;
  34. 34 ls -a linda/
  35. 35 ls -ld linda/
  36. 36 find / -user linda -exec cp -R {} /root/linda/ \;
  37. 37 pwd
  38. 38 cd ..
  39. 39 ls
  40. 40 cat linda
  41. 41 rm linda
  42. 42 mkdir linda
  43. 43 find / -user linda -exec cp -R {} /root/linda/ \;
  44. 44 ls linda/
  45. 45 history
  46. 46 find / -perm /4000
  47. 47 find / -type f -size +100M
  48. 48 mkdir -p find/contents && find /etc -exec grep -l student {} \; -exec cp {} find/contents/ \; 2>/dev/null
  49. 49 find /etc/ -name '*' -type f | xargs grep "127.0.0.1"
  50. 50 sed -n 50 /etc/passwd
  51. 51 sed -n 5p /etc/passwd
  52. 52 vim myfiles
  53. 53 sed -i 's/one/ONE/g' ~/myfiles
  54. 54 cat myfiles
  55. 55 ip a
  56. 56 sed -i -e '2d' myfiles
  57. 57 cat myfiles
  58. 58 awk -F : '{ print $4 }' /etc/passwd
  59. 59 cut -d : -f 4 /etc/passwd
  60. 60 awk -F : '/linda/ { print $4 }' /etc/passwd
  61. 61 history
  62. 62 man mktemp
  63. 63 cd `mktemp -d` && touch 'a b c' '1' '2' && find . -type f | xargs grep
  64. 64 cd `mktemp -d` && touch 'a b c' '1' '2' && find . -type f | xargs grep .
  65. 65 ls
  66. 66 pwd
  67. 67 cd ..
  68. 68 cd `mktemp -d` && touch 'a b c' '1' '2' && find . -type f -exec grep {} \;
  69. 69 cd `mktemp -d` && touch 'a b c' '1' '2' && find . -type f -exec grep {} . \;
  70. 70 history
  71. 71 cd `mktemp -d` && touch 'a b c' '1' '2' && find . -type f -exec grep '.' {} \;
  72. 72 cd `mktemp -d` && touch 'a b c' '1' '2' && find . -type f | xargs grep '.'
  73. 73 cd
  74. 74 cd lfcs/
  75. 75 echo $PATH
  76. 76 ln countdown /usr/local/sbin/countdown
  77. 77 ln countdown /usr/local/bin/countdown
  78. 78 ls -l countdown
  79. 79 history
  80. 80 cd /lib
  81. 81 ls
  82. 82 cd modules
  83. 83 ls
  84. 84 uname -r
  85. 85 cd `uname -r`
  86. 86 cd ..
  87. 87 cd $(uname -r)
  88. 88 countdown 12
  89. 89 cd
  90. 90 vipw
  91. 91 tail /etc/shadow
  92. 92 vim /etc/login.defs
  93. 93 cd /etc/skel/
  94. 94 ls -a
  95. 95 id student
  96. 96 visudo
  97. 97 cd ..
  98. 98 ls -l /etc/passwd /etc/shadow
  99. 99 grep linda /etc/shadow
  100. 100 useradd --help | less
  101. 101 useradd -s /usr/bin/passwd -G wheel anna
  102. 102 grep anna /etc/passwd
  103. 103 grep anna /etc/shadow
  104. 104 passwd --help | less
  105. 105 passwd -x 90 anna
  106. 106 grep anna /etc/shadow
  107. 107 chage anna
  108. 108 ls -l
  109. 109 cd /home/linda
  110. 110 echo password | passwd --stdout
  111. 111 echo password | passwd --stdin
  112. 112 echo password | passwd --stdin linda
  113. 113 history -d 108
  114. 114 history
  115. 115 touch rootfile1
  116. 116 touch rootfile2
  117. 117 chattr +i rootfile2
  118. 118 su - linda
  119. 119 groupadd sales
  120. 120 groupadd account
  121. 121 useradd anna -G account
  122. 122 usermod anna -aG account
  123. 123 useradd anouk -G account
  124. 124 useradd linda -G sales
  125. 125 usermod -aG sales linda
  126. 126 useradd -G sales lisa
  127. 127 id anna
  128. 128 cd
  129. 129 mkdir /data/sales
  130. 130 mkdir -p /data/sales
  131. 131 mkdir -p /data/account
  132. 132 cd /data
  133. 133 ls -l
  134. 134 chgrp sales sales
  135. 135 chgrp account account
  136. 136 ls -l
  137. 137 chmod 770 *
  138. 138 ls -l
  139. 139 su - linda
  140. 140 su - lisa
  141. 141 chmod g+s *
  142. 142 ls -l
  143. 143 su - linda
  144. 144 su - lisa
  145. 145 chmod +t *
  146. 146 ls -l
  147. 147 su - lisa
  148. 148 chown lisa sales
  149. 149 ls -l
  150. 150 su - lisa
  151. 151 poweroff
  152. 152 lsblk
  153. 153 file --helo
  154. 154 lsblk
  155. 155 gdisk /dev/sda
  156. 156 ssh 192.168.4.162
  157. 157 gdisk /dev/sda
  158. 158 gdisk -l /dev/sda
  159. 159 lsblk
  160. 160 cat /proc/partitions
  161. 161 partprobe
  162. 162 cat /proc/partitions
  163. 163 mkfs.xfs /dev/sda7
  164. 164 mkdir /filesystem
  165. 165 vim /etc/fstab
  166. 166 mount -a
  167. 167 mount
  168. 168 xxd /dev/sda | less
  169. 169 mount
  170. 170 mount | grep '^/'
  171. 171 fdisk /dev/sda
  172. 172 cd /usr/lib/systemd/system
  173. 173 ls
  174. 174 ls tmp*
  175. 175 vim /etc/fstab
  176. 176 cd /run/systemd/generator/
  177. 177 ls
  178. 178 vim var-log.mount
  179. 179 vim /etc/fstab
  180. 180 cp boot.mount /etc/systemd/system/filesystem.mount
  181. 181 vim /etc/systemd/system/filesystem.mount
  182. 182 systemctl daemon-reload
  183. 183 systemctl enable --now filesystem.mount
  184. 184 systemctl status multi-user.target
  185. 185 mount |grep files
  186. 186 cd /usr/lib/systemd/system
  187. 187 vim tmp.mount
  188. 188 mount | grep tmp
  189. 189 ls /tmp
  190. 190 systemctl enable tmp.mount
  191. 191 reboot
  192. 192 fdisk /dev/sdb
  193. 193 mkfs.ext4 /dev/sdb5
  194. 194 mkfs.xfs /dev/sdb6
  195. 195 vim /etc/fstab
  196. 196 mkdir /bigfiles
  197. 197 mount -a
  198. 198 mount
  199. 199 fdisk /dev/sdb
  200. 200 mount /dev/sdb5 /mnt
  201. 201 cd /mnt
  202. 202 touch hello
  203. 203 touch dbs5
  204. 204 touch sdb5
  205. 205 ls
  206. 206 exit
  207. 207 fdisk /dev/sdb
  208. 208 reboot
  209. 209 journalctl -xb
  210. 210 vim /etc/fstab
  211. 211 fdisk -l /dev/sdb
  212. 212 xfs_admin -L cow /dev/sdb5
  213. 213 vim /etc/fstab
  214. 214 reboot
  215. 215 mount | grep '^/'
  216. 216 blkid
  217. 217 cat /etc/fstab
  218. 218 fdisk /dev/sdb
  219. 219 mount /dev/sdb6 /mnt
  220. 220 cd /mnt
  221. 221 ls
  222. 222 tune2fs -L goat /dev/sdb6
  223. 223 vim /etc/fstab
  224. 224 mkdir /cheese
  225. 225 fdisk /dev/sdb
  226. 226 reboot
  227. 227 free -m
  228. 228 less /proc/meminfo
  229. 229 gdisk /dev/sda
  230. 230 partprobe
  231. 231 reboot
  232. 232 gdisk -l /dev/sda
  233. 233 mkswap /dev/sda8
  234. 234 free -m
  235. 235 swapon /dev/sda8
  236. 236 free -m
  237. 237 vim /etc/fstab
  238. 238 history
  239.  
Add Comment
Please, Sign In to add comment