sandervanvugt

RHCSA jul20 day1

Jul 13th, 2020
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. ### from visual
  2. linda ALL=/usr/sbin/useradd, /usr/sbin/usermod, /usr/bin/passwd, ! /usr/bin/passwd root
  3.  
  4. #### commands
  5. [root@localhost ~]# history
  6. 1 vimtutor
  7. 2 vim countdown
  8. 3 countdown 12
  9. 4 echo $PATH
  10. 5 ./countdown 12
  11. 6 ls -l countdown
  12. 7 chmod +x countdown
  13. 8 ./countdown 12
  14. 9 exit
  15. 10 visudo
  16. 11 id student
  17. 12 usermod -aG wheel student
  18. 13 id student
  19. 14 exit
  20. 15 visudo
  21. 16 useradd linda
  22. 17 passwd linda
  23. 18 su - linda
  24. 19 visudo
  25. 20 su - linda
  26. 21 visudo
  27. 22 vim /etc/sudoers.d/linda
  28. 23 history
  29. 24 systemctl isolate multi-user.target
  30. 25 systemctl start graphical.target
  31. 26 ip a
  32. 27 systemctl status sshd
  33. 28 firewall-cmd --list-all
  34. 29 ./countdown 13
  35. 30 ./countdown
  36. 31 countdown
  37. 32 echo $PATH
  38. 33 cp countdown /usr/local/bin
  39. 34 cd /
  40. 35 ls -l
  41. 36 man hier
  42. 37 cd /etc
  43. 38 ls
  44. 39 cd
  45. 40 vim countdown
  46. 41 countdown 0
  47. 42 ln /etc/hosts myhosts
  48. 43 ls -il /etc/hosts myhosts
  49. 44 echo 10.0.0.10 dummy >> myhosts
  50. 45 ls -il /etc/hosts myhosts
  51. 46 ln -s myhosts symhosts
  52. 47 ls -il /etc/hosts myhosts symhosts
  53. 48 cat symhosts myhosts /etc/hosts
  54. 49 rm myhosts
  55. 50 ls -il /etc/hosts myhosts symhosts
  56. 51 cat symhosts
  57. 52 ln /etc/hosts myhosts
  58. 53 rm /etc/hosts
  59. 54 cat myhosts
  60. 55 ln myhosts /etc/hosts
  61. 56 ln /boot/vmlinuz-4.18.0-193.el8.x86_64 kernel
  62. 57 ln -s /boot/vmlinuz-4.18.0-193.el8.x86_64 kernel
  63. 58 ln /etc myetc
  64. 59 ln -s /etc myetc
  65. 60 lsblk
  66. 61 umount /dev/sdb1
  67. 62 ls /mnt
  68. 63 mount /dev/sdb1 /mnt
  69. 64 ls /mnt
  70. 65 cd /mnt
  71. 66 ls
  72. 67 umount /dev/sdb1
  73. 68 lsof /mnt
  74. 69 cd
  75. 70 umount /dev/sdb1
  76. 71 cd /boot
  77. 72 ls
  78. 73 cd
  79. 74 ls
  80. 75 rm myhosts
  81. 76 find / -xtype l
  82. 77 ls -l
  83. 78 find / -xtype l | grep host
  84. 79 find -P ./ -xtype l
  85. 80 find / -xtype l -exec ls -l {} \;
  86. 81 find / -xtype l -exec ls -l {} \; 2>/dev/null
  87. 82 find / -name "hosts"
  88. 83 find / -name "*hosts*"
  89. 84 find / -size +100M > bigfiles.txt
  90. 85 less bigfiles.txt
  91. 86 find / -user linda
  92. 87 ls -l /run/user/1000/
  93. 88 ls -il /run/user/1000/
  94. 89 ls -il /run/user/1000/gvfs
  95. 90 echo $?
  96. 91 history
  97. 92 alias twaalf='countdown 12'
  98. 93 twaalf
  99. 94 man password
  100. 95 man -k password
  101. 96 man man
  102. 97 man apropos
  103. 98 mandb
  104. 99 man -k password
  105. 100 man -k password | wc
  106. 101 man -k password | grep 1
  107. 102 man passwd
  108. 103 man -k authentication
  109. 104 man -k user
  110. 105 less /etc/passwd
  111. 106 less /etc/shadow
  112. 107 man passwd
  113. 108 man 5 passwd
  114. 109 man pwconv
  115. 110 ls -l /etc/passwd
  116. 111 ls -l /etc/shadow
  117. 112 cat /etc/shadow
  118. 113 id student
  119. 114 grep student /etc/group
  120. 115 grep student /etc/passwd
  121. 116 id student
  122. 117 vim /etc/login.defs
  123. 118 useradd lisa
  124. 119 passwd -l lisa
  125. 120 passwd -u lisa
  126. 121 passwd -L lisa
  127. 122 chage lisa
  128. 123 chage -L lisa
  129. 124 chage -l lisa
  130. 125 groups --help
  131. 126 groups student
  132. 127 history
  133. 128 chage lisa
  134. 129 chage --help
  135. 130 groupadd account
  136. 131 groupadd sales
  137. 132 useradd -G account anna
  138. 133 useradd -G account anouk
  139. 134 id anna
  140. 135 w
  141. 136 id linda
  142. 137 id lisa
  143. 138 usermod -aG sales lisa
  144. 139 usermod -aG sales linda
  145. 140 id lisa
  146. 141 usermod -G wheel lisa
  147. 142 id lisa
  148. 143 usermod -aG sales lisa
  149. 144 usermod --help | less
  150. 145 ls -l $(which useradd) $(which adduser)
  151. 146 ls -l /etc/skel
  152. 147 ls -al /etc/skel
  153. 148 touch /etc/skel/blah
  154. 149 useradd bill
  155. 150 ls -la /home/bill
  156. 151 history
Add Comment
Please, Sign In to add comment