Advertisement
sandervanvugt

RHCSA day1 sept23

Sep 18th, 2023
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.84 KB | None | 0 0
  1. [root@localhost mnt]# history
  2. 1 free -m
  3. 2 lscpu
  4. 3 df -h
  5. 4 lsblk
  6. 5 vim countdown
  7. 6 chmod +x countdown
  8. 7 ./countdown 14
  9. 8 ./countdown 14 lab
  10. 9 tar -czvf /root/archive.tgz /etc
  11. 10 ls -l
  12. 11 file archive.tgz
  13. 12 tar -tvf archive.tgz
  14. 13 tar -czvf /root/archive.tgz /etc/
  15. 14 tar -tvf archive.tgz
  16. 15 tar -czvf /root/archive.tgz /etc/*
  17. 16 tar -tvf archive.tgz
  18. 17 rm archive.tgz
  19. 18 tar -czvf /root/archive.tgz /etc/*
  20. 19 tar -tvf archive.tgz
  21. 20 cd /etc
  22. 21 tar -czvf /root/archive.tgz .
  23. 22 tar -tvf /root/archive.tgz
  24. 23 cd
  25. 24 rm archive.tgz
  26. 25 tar -czvf /root/archive.tgz -C /etc
  27. 26 tar -czvf /root/archive.tgz -C /etc .
  28. 27 history
  29. 28 grep -v '^$' /etc/dnsmasq.conf
  30. 29 grep -v '^$' /etc/dnsmasq.conf | sort
  31. 30 history
  32. 31 useradd bob
  33. 32 find / -type f -user bob
  34. 33 mkdir /root/userfiles ; find / -type f -user bob -exec cp {} /root/userfiles/ \;
  35. 34 history
  36. 35 mkdir /root/userfiles ; find / -type f -user bob -exec cp {} /root/userfiles/ \; 2> errors.txt
  37. 36 cat errors.txt
  38. 37 uname -r
  39. 38 visudo
  40. 39 useradd linda
  41. 40 echo password | passwd --stdin linda
  42. 41 visudo
  43. 42 which useradd
  44. 43 which userdel
  45. 44 which passwd
  46. 45 su - linda
  47. 46 visudo
  48. 47 su - linda
  49. 48 visudo
  50. 49 id student
  51. 50 exit
  52. 51 visudo
  53. 52 history
  54. 53 man -k sander
  55. 54 touch hello
  56. 55 locate hello
  57. 56 updatedb
  58. 57 locate hello
  59. 58 touch goedemiddag
  60. 59 locate goedemiddag
  61. 60 less /etc/passwd
  62. 61 vim /etc/login.defs
  63. 62 useradd --help | less
  64. 63 cd /etc/skel/
  65. 64 touch lijk
  66. 65 useradd anna
  67. 66 ls -al /home/anna
  68. 67 tail /etc/passwd
  69. 68 ls -l /etc/passwd
  70. 69 tail /etc/shadow
  71. 70 man 5 shadow
  72. 71 cd
  73. 72 grep anna /etc/passwd
  74. 73 grep 1004 /etc/group
  75. 74 groupadd profs
  76. 75 usermod -aG profs anna
  77. 76 grep anna /etc/passwd
  78. 77 grep anna /etc/group
  79. 78 id anna
  80. 79 lid -g wheel
  81. 80 history
  82. 81 vim /etc/login.defs
  83. 82 cd /etc/skel
  84. 83 touch newfile
  85. 84 groupadd profs
  86. 85 groupadd students
  87. 86 useradd -G profs anna
  88. 87 usermod -aG profs anna
  89. 88 usermod -aG profs linda
  90. 89 usermod -aG students lisa
  91. 90 usermod -aG students linda
  92. 91 useradd -G profs anouk
  93. 92 vim /etc/group
  94. 93 for i in anna anouk linda lisa; do echo password | passwd --stdin $i; done
  95. 94 history
  96. 95 su - linda
  97. 96 ls -l /tmp/linda1
  98. 97 id linda
  99. 98 su - linda
  100. 99 chmod 077 /tmp/linda1
  101. 100 su - linda
  102. 101 mkdir -p /data/specials
  103. 102 chgrp sales /data/specials
  104. 103 chgrp student /data/specials
  105. 104 ls -ld /data/specials/
  106. 105 chmod g+w /data/specials
  107. 106 chmod g-w /data/specials
  108. 107 mkdir /data/specials/dir{1-9}
  109. 108 touch /data/specials/file{1-9}
  110. 109 ls -l /data/specials/
  111. 110 touch /data/specials/file[1-9]
  112. 111 ls -l /data/specials/
  113. 112 cd /data/specials/*
  114. 113 rm -fr /data/specials/*
  115. 114 touch /data/specials/file{1..9}
  116. 115 mkdir /data/specials/dir{1..}
  117. 116 ls -l /data/specials/
  118. 117 mkdir /data/specials/dir{1..9}
  119. 118 ls -l /data/specials/
  120. 119 chgrp students /data/specials/ -R
  121. 120 ls -l /data/specials/
  122. 121 chmod -R +w /data/specials/
  123. 122 chmod -R -x /data/specials/
  124. 123 ls -l /data/specials/
  125. 124 chmod -R +x /data/specials/
  126. 125 ls -l /data/specials/
  127. 126 chmod -R -x /data/specials/
  128. 127 chmod -R +X /data/specials/
  129. 128 ls -l /data/specials/
  130. 129 mkdir -p /data/profs /data/students
  131. 130 ls -l /data/
  132. 131 chown :profs /data/profs
  133. 132 chgrp student /data/students
  134. 133 ls -l /data/
  135. 134 chmod 770 /data/*
  136. 135 ls -k
  137. 136 ls -l
  138. 137 ls -l /data
  139. 138 chmod g+w,o-rx /data/profs
  140. 139 cd
  141. 140 touch /home/linda/rootfile
  142. 141 su - linda
  143. 142 touch /home/linda/stuck
  144. 143 chattr +i /home/linda/stuck
  145. 144 rm -f /home/linda/stuck
  146. 145 chattr -i /home/linda/stuck
  147. 146 su - anna
  148. 147 chmod g+s /data/profs
  149. 148 ls -ld /data/profs
  150. 149 su - anna
  151. 150 su - anouk
  152. 151 chmod +t /data/profs
  153. 152 su - anouk
  154. 153 chmod o+x /data/profs
  155. 154 ls -ld /data/profs
  156. 155 history
  157. 156 umask
  158. 157 su - linda
  159. 158 su - lisa
  160. 159 cd /data
  161. 160 ls -,
  162. 161 ls -l
  163. 162 chmod 3770 *
  164. 163 ls -l
  165. 164 chattr +i students/
  166. 165 cd students/
  167. 166 ls
  168. 167 touch student1
  169. 168 echo hello > hello
  170. 169 exit
  171. 170 ./countdown 12
  172. 171 ./countdown 1
  173. 172 ./countdown 15
  174. 173 ./countdown 13
  175. 174 chattr -i /data/students/
  176. 175 poweroff
  177. 176 lsblk
  178. 177 fdisk /dev/sda
  179. 178 lsblk
  180. 179 mount /dev/sda3 /mnt
  181. 180 mkfs.ext4 /dev/sda3
  182. 181 mount /dev/sda3 /mnt
  183. 182 cd /mnt
  184. 183 ls
  185. 184 cp /etc/hosts .
  186. 185 history
  187.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement