Advertisement
sandervanvugt

RHCSA day 1 nov22

Nov 7th, 2022
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  1. [sudo] password for student:
  2. [root@localhost ~]# history
  3. 1 useradd bob
  4. 2 su - bob
  5. 3 find / -user bob
  6. 4 mkdir /root/userfiles; find / -user bob -exec cp {} /root/userfiles/ \;
  7. 5 man find
  8. 6 touch rtp{1..3}
  9. 7 ls
  10. 8 history
  11. 9 git
  12. 10 visudo
  13. 11 export EDITOPR=/bin/nano
  14. 12 visudo
  15. 13 export EDITOR=/bin/nano
  16. 14 visudo
  17. 15 export EDITOR=
  18. 16 visudo
  19. 17 grep linda /etc/passwd
  20. 18 useradd linda
  21. 19 echo password | passwd --stdin linda
  22. 20 su - linda
  23. 21 visudo
  24. 22 su - linda
  25. 23 cd /etc/sudoers.d
  26. 24 vim bob
  27. 25 id student
  28. 26 visudo
  29. 27 cd
  30. 28 curl -O https://raw.githubusercontent.com/sandervanvugt/rhcsa/master/countdown.sh
  31. 29 ls
  32. 30 cat countdown.sh
  33. 31 vim countdown
  34. 32 countdown 12
  35. 33 echo $PATH
  36. 34 ./countdown 12
  37. 35 ls -l countdown
  38. 36 chmod +x countdown
  39. 37 ./countdown 12
  40. 38 ln countdown /usr/bin/
  41. 39 vim /etc/login.defs
  42. 40 cd /etc/skel
  43. 41 ls -al
  44. 42 touch nothideen
  45. 43 cd
  46. 44 useradd lucy
  47. 45 ls -la /home/lucy/
  48. 46 usermod --help | less
  49. 47 passwd --help | less
  50. 48 cat /etc/passwd
  51. 49 usermod -aG wheel bob
  52. 50 usermod --help
  53. 51 vim /etc/group
  54. 52 countdown 16
  55. 53 vim /etc/login.defs
  56. 54 cd /etc/skel/
  57. 55 touch newfile
  58. 56 vim /etc/login.defs
  59. 57 pwd
  60. 58 useradd anna
  61. 59 useradd anouk
  62. 60 useradd lisa
  63. 61 useradd linda
  64. 62 usermod --help
  65. 63 usermod -p password anouk
  66. 64 grep anouk /etc/shadow
  67. 65 for u in anna anouk linda lisa; do echo password | passwd --stdin $u; done
  68. 66 passwd --help
  69. 67 vim /etc/shadow
  70. 68 vim /etc/default/useradd
  71. 69 groupadd profs
  72. 70 groupadd students
  73. 71 usermod -aG profs anna
  74. 72 usermod -aG profs anouk
  75. 73 usermod -aG student linda
  76. 74 usermod -aG student lisa
  77. 75 id linda
  78. 76 usermod -G wheel linda
  79. 77 id linda
  80. 78 usermod -aG student linda
  81. 79 id linda
  82. 80 grep student /etc/group
  83. 81 vim /etc/group
  84. 82 cd /home
  85. 83 ls -l
  86. 84 ls -l /etc/hosts
  87. 85 cd
  88. 86 vim permissions.txt
  89. 87 mkdir /data/sales/2022
  90. 88 mkdir -p /data/sales/2022
  91. 89 cd /data/sales
  92. 90 touch myfile
  93. 91 cd 2022
  94. 92 touch myother
  95. 93 cd ../..
  96. 94 chmod -r 000 data
  97. 95 chmod -r 700 sales
  98. 96 chmod --help
  99. 97 chmod -R 700 sales
  100. 98 ls -ld sales/
  101. 99 chmod -R +x sales
  102. 100 cd sales
  103. 101 ls
  104. 102 ls -l
  105. 103 cd 2022/
  106. 104 ls -l
  107. 105 cd ..
  108. 106 chmod -R -x sales
  109. 107 ls -l sales/
  110. 108 chmod -R +X sales
  111. 109 ls -ld sales/
  112. 110 ls -l sales/
  113. 111 history
  114. 112 mkdir profs
  115. 113 mkdir students
  116. 114 chown :profs profs
  117. 115 ls -l
  118. 116 chgrp sales sales
  119. 117 chgrp students students
  120. 118 ls -l
  121. 119 chmod 770 *
  122. 120 ls -l
  123. 121 chmod o+w,g-rx sales
  124. 122 ls -l
  125. 123 su - anna
  126. 124 chmod g+s /data/profs
  127. 125 su - anna
  128. 126 su - anouk
  129. 127 chmod +t /data/profs
  130. 128 su - anouk
  131. 129 umask
  132. 130 su - anna
  133. 131 countdown 14
  134. 132 cd
  135. 133 mkdir -p /mydata/profs
  136. 134 mkdir -p /mydata/students
  137. 135 cd /mydata
  138. 136 chgrp students students
  139. 137 chgrp profs profs
  140. 138 chmod 770 *
  141. 139 #umask 007
  142. 140 poweroff
  143. 141 lsblk
  144. 142 poweroff
  145. 143 fdisk /dev/sda
  146. 144 mount /dev/sda3 /mnt
  147. 145 mkfs.xfs /dev/sda3
  148. 146 mount /dev/sda3 /mnt
  149. 147 cd /mnt
  150. 148 touch hello_partition3
  151. 149 mkdir /whatever
  152. 150 vim /etc/fstab
  153. 151 mount -a
  154. 152 mount
  155. 153 fdisk /dev/sda
  156. 154 lsblk
  157. 155 mkfs.ext4 /dev/sda5
  158. 156 mkfs.xfs /dev/sda6
  159. 157 mkdir /ext4 /xfs
  160. 158 vim /etc/fstab
  161. 159 vim /etc/default//grub
  162. 160 grub2-mkconfig -o /boot/grub2/grub.cfg
  163. 161 reboot
  164. 162 journalctl -xb
  165. 163 lsblk
  166. 164 vim /etc/fstab
  167. 165 history
  168.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement