Advertisement
Guest User

Untitled

a guest
Feb 15th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.25 KB | None | 0 0
  1. [student_bsos@localhost ~]$ u
  2. ucs2any unzipsfx
  3. udevinfo updatedb
  4. udevtest update-desktop-database
  5. ul update-gdk-pixbuf-loaders
  6. ulimit update-gtk-immodules
  7. umask update-mime-database
  8. umount updmap
  9. unalias updmap-sys
  10. uname uptime
  11. unexpand urlgrabber
  12. unicode_start url_handler.sh
  13. unicode_stop urlview
  14. uniq userformat
  15. uniqleaf userinfo
  16. unix2dos usermount
  17. unix-lpr.sh userpasswd
  18. unlink users
  19. unprotoize usleep
  20. unset utmpdump
  21. until uuclient
  22. unwrapdiff uuidgen
  23. unxz uxterm
  24. unzip uz
  25. [student_bsos@localhost ~]$ sudo /
  26. .autofsck etc/ misc/ root/ tmp/
  27. .autorelabel home/ mnt/ sbin/ usr/
  28. bin/ lib/ net/ selinux/ var/
  29. boot/ lost+found/ opt/ srv/
  30. dev/ media/ proc/ sys/
  31. [student_bsos@localhost ~]$ sudo /usr/sbin/useradd uzivatel1
  32. [student_bsos@localhost ~]$ sudo /usr/sbin/groupadd skupina_uzivatelu
  33. [student_bsos@localhost ~]$ cd /home
  34. [student_bsos@localhost home]$ ls
  35. multicast student_bsos student_bsos2 uzivatel1
  36. [student_bsos@localhost home]$ more /etc/group
  37. root:x:0:root
  38. bin:x:1:root,bin,daemon
  39. daemon:x:2:root,bin,daemon
  40. sys:x:3:root,bin,adm
  41. adm:x:4:root,adm,daemon
  42. tty:x:5:
  43. disk:x:6:root
  44. lp:x:7:daemon,lp
  45. mem:x:8:
  46. kmem:x:9:
  47. wheel:x:10:root
  48. mail:x:12:mail
  49. news:x:13:news
  50. uucp:x:14:uucp
  51. man:x:15:
  52. games:x:20:
  53. gopher:x:30:
  54. dip:x:40:
  55. ftp:x:50:
  56. lock:x:54:
  57. nobody:x:99:
  58. users:x:100:
  59. rpm:x:37:
  60. dbus:x:81:
  61. utmp:x:22:
  62. utempter:x:35:
  63. avahi:x:70:
  64. mailnull:x:47:
  65. smmsp:x:51:
  66. distcache:x:94:
  67. ntp:x:38:
  68. apache:x:48:
  69. nscd:x:28:
  70. floppy:x:19:
  71. vcsa:x:69:
  72. rpc:x:32:
  73. rpcuser:x:29:
  74. nfsnobody:x:65534:
  75. sshd:x:74:
  76. pcap:x:77:
  77. slocate:x:21:
  78. haldaemon:x:68:
  79. hsqldb:x:96:
  80. xfs:x:43:
  81. gdm:x:42:
  82. sabayon:x:86:
  83. multicast:x:500:
  84. student_bsos:x:501:
  85. student_bsos2:x:502:
  86. stapdev:x:101:
  87. stapusr:x:102:
  88. oprofile:x:16:
  89. audio:x:63:gdm
  90. stapsys:x:157:
  91. avahi-autoipd:x:158:
  92. vboxsf:x:503:
  93. squid:x:23:
  94. wbpriv:x:88:squid
  95. uzivatel1:x:504:
  96. skupina_uzivatelu:x:505:
  97. [student_bsos@localhost home]$
  98. [student_bsos@localhost home]$
  99. [student_bsos@localhost home]$
  100. [student_bsos@localhost home]$
  101. [student_bsos@localhost home]$
  102. [student_bsos@localhost home]$
  103. [student_bsos@localhost home]$
  104. [student_bsos@localhost home]$
  105. [student_bsos@localhost home]$
  106. [student_bsos@localhost home]$
  107. [student_bsos@localhost home]$
  108. [student_bsos@localhost home]$
  109. [student_bsos@localhost home]$
  110. [student_bsos@localhost home]$
  111. [student_bsos@localhost home]$
  112. [student_bsos@localhost home]$
  113. [student_bsos@localhost home]$
  114. [student_bsos@localhost home]$
  115. [student_bsos@localhost home]$
  116. [student_bsos@localhost home]$
  117. [student_bsos@localhost home]$
  118. [student_bsos@localhost home]$
  119. [student_bsos@localhost home]$
  120. [student_bsos@localhost home]$
  121. [student_bsos@localhost home]$
  122. [student_bsos@localhost home]$
  123. [student_bsos@localhost home]$
  124. [student_bsos@localhost home]$
  125. [student_bsos@localhost home]$
  126. [student_bsos@localhost home]$
  127. [student_bsos@localhost home]$
  128. [student_bsos@localhost home]$
  129. [student_bsos@localhost home]$
  130. [student_bsos@localhost home]$
  131. [student_bsos@localhost home]$
  132. [student_bsos@localhost home]$
  133. [student_bsos@localhost home]$
  134. [student_bsos@localhost home]$
  135. [student_bsos@localhost home]$
  136. [student_bsos@localhost home]$
  137. [student_bsos@localhost home]$
  138. [student_bsos@localhost home]$
  139. [student_bsos@localhost home]$
  140. [student_bsos@localhost home]$
  141. [student_bsos@localhost home]$
  142. [student_bsos@localhost home]$
  143. [student_bsos@localhost home]$
  144. [student_bsos@localhost home]$
  145. [student_bsos@localhost home]$
  146. [student_bsos@localhost home]$
  147. [student_bsos@localhost home]$
  148. [student_bsos@localhost home]$
  149. [student_bsos@localhost home]$
  150. [student_bsos@localhost home]$
  151. [student_bsos@localhost home]$
  152. [student_bsos@localhost home]$
  153. [student_bsos@localhost home]$
  154. [student_bsos@localhost home]$
  155. [student_bsos@localhost home]$
  156. [student_bsos@localhost home]$
  157. [student_bsos@localhost home]$
  158. [student_bsos@localhost home]$
  159. [student_bsos@localhost home]$
  160. [student_bsos@localhost home]$
  161. [student_bsos@localhost home]$
  162. [student_bsos@localhost home]$
  163. [student_bsos@localhost home]$
  164. [student_bsos@localhost home]$
  165. [student_bsos@localhost home]$
  166. [student_bsos@localhost home]$
  167. [student_bsos@localhost home]$
  168. [student_bsos@localhost home]$
  169. [student_bsos@localhost home]$
  170. [student_bsos@localhost home]$
  171. [student_bsos@localhost home]$
  172. [student_bsos@localhost home]$
  173. [student_bsos@localhost home]$
  174. [student_bsos@localhost home]$
  175. [student_bsos@localhost home]$
  176. [student_bsos@localhost home]$
  177. [student_bsos@localhost home]$
  178. [student_bsos@localhost home]$
  179. [student_bsos@localhost home]$
  180. [student_bsos@localhost home]$
  181. [student_bsos@localhost home]$
  182. [student_bsos@localhost home]$
  183. [student_bsos@localhost home]$ sudo /usr/sbin/usermod -G skupina_uzivatelu uzivatel
  184. usermod: user uzivatel does not exist
  185. [student_bsos@localhost home]$ sudo /usr/sbin/usermod -G skupina_uzivatelu uzivatel1
  186. [student_bsos@localhost home]$ groups uzivatel1
  187. uzivatel1 : uzivatel1 skupina_uzivatelu
  188. [student_bsos@localhost home]$ sudo /usr/sbin/useradd uzivatel2 -G skupina_uzivatelu
  189. [student_bsos@localhost home]$ groups uzivatel2
  190. uzivatel2 : uzivatel2 skupina_uzivatelu
  191. [student_bsos@localhost home]$ cd ~
  192. [student_bsos@localhost ~]$ mkdir sdileny_adresar
  193. [student_bsos@localhost ~]$ sudo chgrp skupina_uzivatelu sdileny_adresar
  194. [student_bsos@localhost ~]$ chmod g=rwx sdileny_adresar
  195. [student_bsos@localhost ~]$ ls
  196. Desktop sdileny_adresar
  197. [student_bsos@localhost ~]$ ls -l
  198. total 8
  199. drwxr-xr-x 2 student_bsos student_bsos 4096 Jul 24 2017 Desktop
  200. drwxrwxr-x 2 student_bsos skupina_uzivatelu 4096 Feb 15 11:17 sdileny_adresar
  201. [student_bsos@localhost ~]$ chmod o=--- sdileny_adresar
  202. [student_bsos@localhost ~]$ ls -l
  203. total 8
  204. drwxr-xr-x 2 student_bsos student_bsos 4096 Jul 24 2017 Desktop
  205. drwxrwx--- 2 student_bsos skupina_uzivatelu 4096 Feb 15 11:17 sdileny_adresar
  206. [student_bsos@localhost ~]$ cd sdileny_adresar
  207. [student_bsos@localhost sdileny_adresar]$ sudo su uzivatel1
  208. [uzivatel1@localhost sdileny_adresar]$ touch mujsoubor.txt
  209. [uzivatel1@localhost sdileny_adresar]$ exit
  210. exit
  211. [student_bsos@localhost sdileny_adresar]$ sudo su uzivatel2
  212. [uzivatel2@localhost sdileny_adresar]$ echo "dsdsds" > mujsoubor.txt
  213. bash: mujsoubor.txt: Permission denied
  214. [uzivatel2@localhost sdileny_adresar]$ ls -l
  215. total 0
  216. -rw-rw-r-- 1 uzivatel1 uzivatel1 0 Feb 15 11:26 mujsoubor.txt
  217. [uzivatel2@localhost sdileny_adresar]$ exit
  218. exit
  219. [student_bsos@localhost sdileny_adresar]$ id
  220. uid=501(student_bsos) gid=501(student_bsos) groups=501(student_bsos)
  221. [student_bsos@localhost sdileny_adresar]$ sudo chmod g+s sdileny_adresar
  222. chmod: cannot access `sdileny_adresar': No such file or directory
  223. [student_bsos@localhost sdileny_adresar]$ cd ..
  224. [student_bsos@localhost ~]$ sudo chmod g+s sdileny_adresar
  225. [student_bsos@localhost ~]$ cd sdileny_adresar
  226. [student_bsos@localhost sdileny_adresar]$ su uzivatel1
  227. Password:
  228.  
  229. [student_bsos@localhost sdileny_adresar]$ sudo su uzivatel1
  230. [uzivatel1@localhost sdileny_adresar]$ touch dalsi.txt
  231. [uzivatel1@localhost sdileny_adresar]$ ls -l
  232. total 0
  233. -rw-rw-r-- 1 uzivatel1 skupina_uzivatelu 0 Feb 15 11:34 dalsi.txt
  234. -rw-rw-r-- 1 uzivatel1 uzivatel1 0 Feb 15 11:26 mujsoubor.txt
  235. [uzivatel1@localhost sdileny_adresar]$ sudo su uzivatel2
  236.  
  237. We trust you have received the usual lecture from the local System
  238. Administrator. It usually boils down to these three things:
  239.  
  240. #1) Respect the privacy of others.
  241. #2) Think before you type.
  242. #3) With great power comes great responsibility.
  243.  
  244. [sudo] password for uzivatel1:
  245. Sorry, try again.
  246. [sudo] password for uzivatel1:
  247. Sorry, try again.
  248. [sudo] password for uzivatel1:
  249. sudo: 2 incorrect password attempts
  250. [uzivatel1@localhost sdileny_adresar]$ exit
  251. exit
  252. [student_bsos@localhost sdileny_adresar]$ sudo su uzivatel2
  253. [uzivatel2@localhost sdileny_adresar]$ echo "dsdsd">dalsi.txt
  254. [uzivatel2@localhost sdileny_adresar]$ touch treti.txt
  255. [uzivatel2@localhost sdileny_adresar]$ ls -l
  256. total 4
  257. -rw-rw-r-- 1 uzivatel1 skupina_uzivatelu 6 Feb 15 11:37 dalsi.txt
  258. -rw-rw-r-- 1 uzivatel1 uzivatel1 0 Feb 15 11:26 mujsoubor.txt
  259. -rw-rw-r-- 1 uzivatel2 skupina_uzivatelu 0 Feb 15 11:38 treti.txt
  260. [uzivatel2@localhost sdileny_adresar]$ exit
  261. exit
  262. [student_bsos@localhost sdileny_adresar]$ sudo su uzivatel1
  263. [uzivatel1@localhost sdileny_adresar]$ echo "sdsds">tretri.txt
  264. [uzivatel1@localhost sdileny_adresar]$ exit
  265. exit
  266. [student_bsos@localhost sdileny_adresar]$ cd /home/student_bsos
  267. [student_bsos@localhost ~]$ mkdir sdileny_adresar2
  268. [student_bsos@localhost ~]$ sudo chgrp skupina_uzivatelu sdileny_adresar2
  269. [student_bsos@localhost ~]$ chmod o=--- sdileny_adresar2
  270. [student_bsos@localhost ~]$ sudo chmod g+s sdileny_adresar2
  271. [student_bsos@localhost ~]$ sudo /usr/sbin/useradd uzivatel3
  272. [student_bsos@localhost ~]$ cd sdileny_adresar2
  273. [student_bsos@localhost sdileny_adresar2]$ sudo su uzivatel3
  274. [uzivatel3@localhost sdileny_adresar2]$ touch moje.txt
  275. touch: cannot touch `moje.txt': Permission denied
  276. [uzivatel3@localhost sdileny_adresar2]$ sudo su uzivatel1
  277.  
  278. We trust you have received the usual lecture from the local System
  279. Administrator. It usually boils down to these three things:
  280.  
  281. #1) Respect the privacy of others.
  282. #2) Think before you type.
  283. #3) With great power comes great responsibility.
  284.  
  285. [sudo] password for uzivatel3:
  286. [uzivatel3@localhost sdileny_adresar2]$ exit
  287. exit
  288. [student_bsos@localhost sdileny_adresar2]$ sudo su uzivatel1
  289. [uzivatel1@localhost sdileny_adresar2]$ touch dalsidalsi.txt
  290. [uzivatel1@localhost sdileny_adresar2]$ exit
  291. exit
  292. [student_bsos@localhost sdileny_adresar2]$ sudo su uzivatel2
  293. [uzivatel2@localhost sdileny_adresar2]$ echo "sdsdsd"> sdileny_adresar2
  294. [uzivatel2@localhost sdileny_adresar2]$
  295. [uzivatel2@localhost sdileny_adresar2]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement