Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 5

hp-it-12@ubuntu:~$ touch F1 F2 F3 hp-it-12@ubuntu:~$ hp-it-12@ubuntu:~$ ls Desktop Downloads F1 F3 Pictures Templates Documents examples.

desktop F2 Music Public Videos hp-it-12@ubuntu:~$ touch F1 F2 F3 hp-it-12@ubuntu:~$ ls -l f* ls: cannot access f*: No such file or directory hp-it-12@ubuntu:~$ ls-l ls-l: command not found hp-it-12@ubuntu:~$ ls -l total 44 drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Desktop drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Documents drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Downloads -rw-r--r-- 1 hp-it-12 hp-it-12 8445 Sep 26 04:36 examples.desktop -rw-rw-r-- 1 hp-it-12 hp-it-12 0 Sep 29 09:04 F1 -rw-rw-r-- 1 hp-it-12 hp-it-12 0 Sep 29 09:04 F2 -rw-rw-r-- 1 hp-it-12 hp-it-12 0 Sep 29 09:04 F3 drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Music drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Pictures drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Public drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Templates drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Videos hp-it-12@ubuntu:~$ ls -l*f ls: invalid option -- '*' Try `ls --help' for more information. hp-it-12@ubuntu:~$ ls -l *f ls: cannot access *f: No such file or directory hp-it-12@ubuntu:~$ umask 0002 hp-it-12@ubuntu:~$ man umask hp-it-12@ubuntu:~$ umask 022 hp-it-12@ubuntu:~$ touch f4 hp-it-12@ubuntu:~$ ls -l f* -rw-r--r-- 1 hp-it-12 hp-it-12 0 Sep 29 14:02 f4 hp-it-12@ubuntu:~$ umask 023 hp-it-12@ubuntu:~$ touch f5 hp-it-12@ubuntu:~$ ls -l f* -rw-r--r-- 1 hp-it-12 hp-it-12 0 Sep 29 14:02 f4 -rw-r--r-- 1 hp-it-12 hp-it-12 0 Sep 29 14:04 f5 hp-it-12@ubuntu:~$ mkdir fdir01 hp-it-12@ubuntu:~$ ls -l f* -rw-r--r-- 1 hp-it-12 hp-it-12 0 Sep 29 14:02 f4 -rw-r--r-- 1 hp-it-12 hp-it-12 0 Sep 29 14:04 f5 fdir01: total 0 hp-it-12@ubuntu:~$ ls -ld f*

-rw-r--r-- 1 hp-it-12 hp-it-12 0 Sep 29 14:02 f4 -rw-r--r-- 1 hp-it-12 hp-it-12 0 Sep 29 14:04 f5 drwxr-xr-- 2 hp-it-12 hp-it-12 4096 Sep 29 14:06 fdir01 hp-it-12@ubuntu:~$ chmod 740 fl chmod: cannot access `fl': No such file or directory hp-it-12@ubuntu:~$ chmod 740 f1 chmod: cannot access `f1': No such file or directory hp-it-12@ubuntu:~$ ls -l f1 ls: cannot access f1: No such file or directory hp-it-12@ubuntu:~$ ls -l f4 -rw-r--r-- 1 hp-it-12 hp-it-12 0 Sep 29 14:02 f4 hp-it-12@ubuntu:~$ chmod f4 chmod: missing operand after `f4' Try `chmod --help' for more information. hp-it-12@ubuntu:~$ ls -l f4 -rw-r--r-- 1 hp-it-12 hp-it-12 0 Sep 29 14:02 f4 hp-it-12@ubuntu:~$ chmod 760 f4 hp-it-12@ubuntu:~$ ls -l f* -rwxrw---- 1 hp-it-12 hp-it-12 0 Sep 29 14:02 f4 -rw-r--r-- 1 hp-it-12 hp-it-12 0 Sep 29 14:04 f5 fdir01: total 0 hp-it-12@ubuntu:~$ chmod g=rw- f4 hp-it-12@ubuntu:~$ ls -l f4 -rwxrw---- 1 hp-it-12 hp-it-12 0 Sep 29 14:02 f4 hp-it-12@ubuntu:~$ chmod u=rw-, o=r-chmod: invalid mode: `u=rw-,' Try `chmod --help' for more information. hp-it-12@ubuntu:~$ chmod u=rw, o=r-- f4 chmod: invalid mode: `u=rw,' Try `chmod --help' for more information. hp-it-12@ubuntu:~$ ls -l f4 -rwxrw---- 1 hp-it-12 hp-it-12 0 Sep 29 14:02 f4 hp-it-12@ubuntu:~$ chmod u=rw-, o=r-- f4 chmod: invalid mode: `u=rw-,' Try `chmod --help' for more information. hp-it-12@ubuntu:~$ ls -l f4 -rwxrw---- 1 hp-it-12 hp-it-12 0 Sep 29 14:02 f4 hp-it-12@ubuntu:~$ ls -l total 48 drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Desktop drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Documents drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Downloads -rw-r--r-- 1 hp-it-12 hp-it-12 8445 Sep 26 04:36 examples.desktop -rw-rw-r-- 1 hp-it-12 hp-it-12 0 Sep 29 09:04 F1 -rw-rw-r-- 1 hp-it-12 hp-it-12 0 Sep 29 09:04 F2 -rw-rw-r-- 1 hp-it-12 hp-it-12 0 Sep 29 09:04 F3 -rwxrw---- 1 hp-it-12 hp-it-12 0 Sep 29 14:02 f4

-rw-r--r-- 1 hp-it-12 hp-it-12 0 Sep 29 14:04 f5 drwxr-xr-- 2 hp-it-12 hp-it-12 4096 Sep 29 14:06 fdir01 drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Music drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Pictures drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Public drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Templates drwxr-xr-x 2 hp-it-12 hp-it-12 4096 Sep 26 04:42 Videos hp-it-12@ubuntu:~$ ls -l F1 -rw-rw-r-- 1 hp-it-12 hp-it-12 0 Sep 29 09:04 F1 hp-it-12@ubuntu:~$ chmod g=rw F1 hp-it-12@ubuntu:~$ ls -l F1 -rw-rw-r-- 1 hp-it-12 hp-it-12 0 Sep 29 09:04 F1 hp-it-12@ubuntu:~$ chmod g=rw- F1 hp-it-12@ubuntu:~$ ls -l F1 -rw-rw-r-- 1 hp-it-12 hp-it-12 0 Sep 29 09:04 F1 hp-it-12@ubuntu:~$ sudo su [sudo] password for hp-it-12: root@ubuntu:/home/hp-it-12# adduser lain Adding user `lain' ... Adding new group `lain' (1001) ... Adding new user `lain' (1002) with group `lain' ... Creating home directory `/home/lain' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for lain Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] Y root@ubuntu:/home/hp-it-12# ls -l /home total 20 drwxr-xr-x 24 hp-it-12 hp-it-12 4096 Sep 29 14:15 hp-it-12 drwxr-xr-x 2 lain lain 4096 Sep 29 14:25 lain drwxr-xr-x 2 shinta pengajar 4096 Sep 26 05:34 shinta drwxr-xr-x 2 shinta pengajar 4096 Sep 26 04:54 usera drwxr-xr-x 2 lain staf 4096 Sep 26 04:54 userb root@ubuntu:/home/hp-it-12# su lain lain@ubuntu:/home/hp-it-12$ echo "coba tulis file" >coba.txt bash: coba.txt: Permission denied lain@ubuntu:/home/hp-it-12$ exit exit root@ubuntu:/home/hp-it-12# exit exit hp-it-12@ubuntu:~$ echo "coba tulis file" >coba.txt

hp-it-12@ubuntu:~$ su lain Password: lain@ubuntu:/home/hp-it-12$ cat coba.txt coba tulis file lain@ubuntu:/home/hp-it-12$ ls coba.txt Documents examples.desktop F2 f4 fdir01 Pictures Templates Desktop Downloads F1 F3 f5 Music Public Videos lain@ubuntu:/home/hp-it-12$ exit exit hp-it-12@ubuntu:~$ adduser beda --ingroup mahasiswa adduser: Only root may add a user or group to the system. hp-it-12@ubuntu:~$ sudo adduser beda --ingroup mahasiswa Adding user `beda' ... Adding new user `beda' (1005) with group `mahasiswa' ... Creating home directory `/home/beda' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for beda Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] Y hp-it-12@ubuntu:~$ ls -l home ls: cannot access home: No such file or directory hp-it-12@ubuntu:~$ ls -l /home total 24 drwxr-xr-x 2 beda mahasiswa 4096 Sep 29 14:35 beda drwxr-xr-x 24 hp-it-12 hp-it-12 4096 Sep 29 14:31 hp-it-12 drwxr-xr-x 2 lain lain 4096 Sep 29 14:31 lain drwxr-xr-x 2 shinta pengajar 4096 Sep 26 05:34 shinta drwxr-xr-x 2 shinta pengajar 4096 Sep 26 04:54 usera drwxr-xr-x 2 lain staf 4096 Sep 26 04:54 userb hp-it-12@ubuntu:~$ chmod o=r-- /home/hp-it-12 hp-it-12@ubuntu:~$ ls -l /home total 24 drwxr-xr-x 2 beda mahasiswa 4096 Sep 29 14:35 beda drwxr-xr-- 24 hp-it-12 hp-it-12 4096 Sep 29 14:31 hp-it-12 drwxr-xr-x 2 lain lain 4096 Sep 29 14:31 lain drwxr-xr-x 2 shinta pengajar 4096 Sep 26 05:34 shinta drwxr-xr-x 2 shinta pengajar 4096 Sep 26 04:54 usera drwxr-xr-x 2 lain staf 4096 Sep 26 04:54 userb hp-it-12@ubuntu:~$ su beda Password: beda@ubuntu:/home/hp-it-12$ ls

ls: cannot open directory .: Permission denied beda@ubuntu:/home/hp-it-12$ cd /home beda@ubuntu:/home$ ls beda hp-it-12 lain shinta usera userb beda@ubuntu:/home$ cd hp-it-12 bash: cd: hp-it-12: Permission denied beda@ubuntu:/home$

You might also like