Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [student_bsos@localhost ~]$ u
- ucs2any unzipsfx
- udevinfo updatedb
- udevtest update-desktop-database
- ul update-gdk-pixbuf-loaders
- ulimit update-gtk-immodules
- umask update-mime-database
- umount updmap
- unalias updmap-sys
- uname uptime
- unexpand urlgrabber
- unicode_start url_handler.sh
- unicode_stop urlview
- uniq userformat
- uniqleaf userinfo
- unix2dos usermount
- unix-lpr.sh userpasswd
- unlink users
- unprotoize usleep
- unset utmpdump
- until uuclient
- unwrapdiff uuidgen
- unxz uxterm
- unzip uz
- [student_bsos@localhost ~]$ sudo /
- .autofsck etc/ misc/ root/ tmp/
- .autorelabel home/ mnt/ sbin/ usr/
- bin/ lib/ net/ selinux/ var/
- boot/ lost+found/ opt/ srv/
- dev/ media/ proc/ sys/
- [student_bsos@localhost ~]$ sudo /usr/sbin/useradd uzivatel1
- [student_bsos@localhost ~]$ sudo /usr/sbin/groupadd skupina_uzivatelu
- [student_bsos@localhost ~]$ cd /home
- [student_bsos@localhost home]$ ls
- multicast student_bsos student_bsos2 uzivatel1
- [student_bsos@localhost home]$ more /etc/group
- root:x:0:root
- bin:x:1:root,bin,daemon
- daemon:x:2:root,bin,daemon
- sys:x:3:root,bin,adm
- adm:x:4:root,adm,daemon
- tty:x:5:
- disk:x:6:root
- lp:x:7:daemon,lp
- mem:x:8:
- kmem:x:9:
- wheel:x:10:root
- mail:x:12:mail
- news:x:13:news
- uucp:x:14:uucp
- man:x:15:
- games:x:20:
- gopher:x:30:
- dip:x:40:
- ftp:x:50:
- lock:x:54:
- nobody:x:99:
- users:x:100:
- rpm:x:37:
- dbus:x:81:
- utmp:x:22:
- utempter:x:35:
- avahi:x:70:
- mailnull:x:47:
- smmsp:x:51:
- distcache:x:94:
- ntp:x:38:
- apache:x:48:
- nscd:x:28:
- floppy:x:19:
- vcsa:x:69:
- rpc:x:32:
- rpcuser:x:29:
- nfsnobody:x:65534:
- sshd:x:74:
- pcap:x:77:
- slocate:x:21:
- haldaemon:x:68:
- hsqldb:x:96:
- xfs:x:43:
- gdm:x:42:
- sabayon:x:86:
- multicast:x:500:
- student_bsos:x:501:
- student_bsos2:x:502:
- stapdev:x:101:
- stapusr:x:102:
- oprofile:x:16:
- audio:x:63:gdm
- stapsys:x:157:
- avahi-autoipd:x:158:
- vboxsf:x:503:
- squid:x:23:
- wbpriv:x:88:squid
- uzivatel1:x:504:
- skupina_uzivatelu:x:505:
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$
- [student_bsos@localhost home]$ sudo /usr/sbin/usermod -G skupina_uzivatelu uzivatel
- usermod: user uzivatel does not exist
- [student_bsos@localhost home]$ sudo /usr/sbin/usermod -G skupina_uzivatelu uzivatel1
- [student_bsos@localhost home]$ groups uzivatel1
- uzivatel1 : uzivatel1 skupina_uzivatelu
- [student_bsos@localhost home]$ sudo /usr/sbin/useradd uzivatel2 -G skupina_uzivatelu
- [student_bsos@localhost home]$ groups uzivatel2
- uzivatel2 : uzivatel2 skupina_uzivatelu
- [student_bsos@localhost home]$ cd ~
- [student_bsos@localhost ~]$ mkdir sdileny_adresar
- [student_bsos@localhost ~]$ sudo chgrp skupina_uzivatelu sdileny_adresar
- [student_bsos@localhost ~]$ chmod g=rwx sdileny_adresar
- [student_bsos@localhost ~]$ ls
- Desktop sdileny_adresar
- [student_bsos@localhost ~]$ ls -l
- total 8
- drwxr-xr-x 2 student_bsos student_bsos 4096 Jul 24 2017 Desktop
- drwxrwxr-x 2 student_bsos skupina_uzivatelu 4096 Feb 15 11:17 sdileny_adresar
- [student_bsos@localhost ~]$ chmod o=--- sdileny_adresar
- [student_bsos@localhost ~]$ ls -l
- total 8
- drwxr-xr-x 2 student_bsos student_bsos 4096 Jul 24 2017 Desktop
- drwxrwx--- 2 student_bsos skupina_uzivatelu 4096 Feb 15 11:17 sdileny_adresar
- [student_bsos@localhost ~]$ cd sdileny_adresar
- [student_bsos@localhost sdileny_adresar]$ sudo su uzivatel1
- [uzivatel1@localhost sdileny_adresar]$ touch mujsoubor.txt
- [uzivatel1@localhost sdileny_adresar]$ exit
- exit
- [student_bsos@localhost sdileny_adresar]$ sudo su uzivatel2
- [uzivatel2@localhost sdileny_adresar]$ echo "dsdsds" > mujsoubor.txt
- bash: mujsoubor.txt: Permission denied
- [uzivatel2@localhost sdileny_adresar]$ ls -l
- total 0
- -rw-rw-r-- 1 uzivatel1 uzivatel1 0 Feb 15 11:26 mujsoubor.txt
- [uzivatel2@localhost sdileny_adresar]$ exit
- exit
- [student_bsos@localhost sdileny_adresar]$ id
- uid=501(student_bsos) gid=501(student_bsos) groups=501(student_bsos)
- [student_bsos@localhost sdileny_adresar]$ sudo chmod g+s sdileny_adresar
- chmod: cannot access `sdileny_adresar': No such file or directory
- [student_bsos@localhost sdileny_adresar]$ cd ..
- [student_bsos@localhost ~]$ sudo chmod g+s sdileny_adresar
- [student_bsos@localhost ~]$ cd sdileny_adresar
- [student_bsos@localhost sdileny_adresar]$ su uzivatel1
- Password:
- [student_bsos@localhost sdileny_adresar]$ sudo su uzivatel1
- [uzivatel1@localhost sdileny_adresar]$ touch dalsi.txt
- [uzivatel1@localhost sdileny_adresar]$ ls -l
- total 0
- -rw-rw-r-- 1 uzivatel1 skupina_uzivatelu 0 Feb 15 11:34 dalsi.txt
- -rw-rw-r-- 1 uzivatel1 uzivatel1 0 Feb 15 11:26 mujsoubor.txt
- [uzivatel1@localhost sdileny_adresar]$ sudo su uzivatel2
- We trust you have received the usual lecture from the local System
- Administrator. It usually boils down to these three things:
- #1) Respect the privacy of others.
- #2) Think before you type.
- #3) With great power comes great responsibility.
- [sudo] password for uzivatel1:
- Sorry, try again.
- [sudo] password for uzivatel1:
- Sorry, try again.
- [sudo] password for uzivatel1:
- sudo: 2 incorrect password attempts
- [uzivatel1@localhost sdileny_adresar]$ exit
- exit
- [student_bsos@localhost sdileny_adresar]$ sudo su uzivatel2
- [uzivatel2@localhost sdileny_adresar]$ echo "dsdsd">dalsi.txt
- [uzivatel2@localhost sdileny_adresar]$ touch treti.txt
- [uzivatel2@localhost sdileny_adresar]$ ls -l
- total 4
- -rw-rw-r-- 1 uzivatel1 skupina_uzivatelu 6 Feb 15 11:37 dalsi.txt
- -rw-rw-r-- 1 uzivatel1 uzivatel1 0 Feb 15 11:26 mujsoubor.txt
- -rw-rw-r-- 1 uzivatel2 skupina_uzivatelu 0 Feb 15 11:38 treti.txt
- [uzivatel2@localhost sdileny_adresar]$ exit
- exit
- [student_bsos@localhost sdileny_adresar]$ sudo su uzivatel1
- [uzivatel1@localhost sdileny_adresar]$ echo "sdsds">tretri.txt
- [uzivatel1@localhost sdileny_adresar]$ exit
- exit
- [student_bsos@localhost sdileny_adresar]$ cd /home/student_bsos
- [student_bsos@localhost ~]$ mkdir sdileny_adresar2
- [student_bsos@localhost ~]$ sudo chgrp skupina_uzivatelu sdileny_adresar2
- [student_bsos@localhost ~]$ chmod o=--- sdileny_adresar2
- [student_bsos@localhost ~]$ sudo chmod g+s sdileny_adresar2
- [student_bsos@localhost ~]$ sudo /usr/sbin/useradd uzivatel3
- [student_bsos@localhost ~]$ cd sdileny_adresar2
- [student_bsos@localhost sdileny_adresar2]$ sudo su uzivatel3
- [uzivatel3@localhost sdileny_adresar2]$ touch moje.txt
- touch: cannot touch `moje.txt': Permission denied
- [uzivatel3@localhost sdileny_adresar2]$ sudo su uzivatel1
- We trust you have received the usual lecture from the local System
- Administrator. It usually boils down to these three things:
- #1) Respect the privacy of others.
- #2) Think before you type.
- #3) With great power comes great responsibility.
- [sudo] password for uzivatel3:
- [uzivatel3@localhost sdileny_adresar2]$ exit
- exit
- [student_bsos@localhost sdileny_adresar2]$ sudo su uzivatel1
- [uzivatel1@localhost sdileny_adresar2]$ touch dalsidalsi.txt
- [uzivatel1@localhost sdileny_adresar2]$ exit
- exit
- [student_bsos@localhost sdileny_adresar2]$ sudo su uzivatel2
- [uzivatel2@localhost sdileny_adresar2]$ echo "sdsdsd"> sdileny_adresar2
- [uzivatel2@localhost sdileny_adresar2]$
- [uzivatel2@localhost sdileny_adresar2]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement