Sunteți pe pagina 1din 3

Reza Abdillah 125410037

[student@localhost ~]$ id uid=500(student) gid=500(student) groups=500(student) [student@localhost ~]$ grep student /etc/passwd student:x:500:500::/home/student:/bin/bash [student@localhost ~]$ grep [500] /etc/group root:x:0: tty:x:5: wheel:x:10: man:x:15: games:x:20: cdwriter:x:80: users:x:100: nogroup:x:65534: rpm:x:101: xgrp:x:102:xfs ntools:x:103: ctools:x:104: messagebus:x:105: haldaemon:x:106: xfs:x:70: slocate:x:107: mysql:x:75: student:x:500: partimag:x:108: jee:x:501: jse:x:502: [student@localhost ~]$ ls -ld /home/student drwxr-xr-x 22 student student 1016 May 7 10:34 /home/student/ [student@localhost ~]$ logname student [student@localhost ~]$ finger bash: finger: command not found [student@localhost ~]$ touch f1 f2 f3 [student@localhost ~]$ ls -l total 0 drwx------ 2 student student 232 May 7 10:07 Desktop/ drwxrwxr-x 2 student student 80 May 7 10:02 Documents/ drwxrwxr-x 2 student student 80 May 7 10:02 Download/ -rw-r--r-- 1 student student 0 May 7 10:38 f1

Reza Abdillah 125410037


-rw-r--r-- 1 student student 0 May 7 10:38 f2 -rw-r--r-- 1 student student 0 May 7 10:38 f3 drwxrwxr-x 2 student student 80 May 7 10:02 Music/ drwxrwxr-x 2 student student 80 May 7 10:02 Pictures/ drwx------ 6 student student 168 May 7 10:07 tmp/ drwxrwxr-x 2 student student 80 May 7 10:02 Video/ [student@localhost ~]$ chmod u+x f1 [student@localhost ~]$ ls -l f1 -rwxr--r-- 1 student student 0 May 7 10:38 f1* [student@localhost ~]$ chmod g=w f1 [student@localhost ~]$ ls -l f1 -rwx-w-r-- 1 student student 0 May 7 10:38 f1* [student@localhost ~]$ chmod o-r f1 [student@localhost ~]$ ls -l f1 -rwx-w---- 1 student student 0 May 7 10:38 f1* [student@localhost ~]$ chmod a=x f2 [student@localhost ~]$ ls -l f2 ---x--x--x 1 student student 0 May 7 10:38 f2* [student@localhost ~]$ chmod u+x,g-r,o=w f3 [student@localhost ~]$ ls -l f3 -rwx----w- 1 student student 0 May 7 10:38 f3* [student@localhost ~]$ chmod 751 f1 [student@localhost ~]$ chmod 624 f2 [student@localhost ~]$ chmod 430 f3 [student@localhost ~]$ ls -l f1 f2 f3 -rwxr-x--x 1 student student 0 May 7 10:38 f1* -rw--w-r-- 1 student student 0 May 7 10:38 f2 -r---wx--- 1 student student 0 May 7 10:38 f3* [student@localhost ~]$ su root Password: [root@localhost student]# echo Hallo >f1 [root@localhost student]# ls -l f1 -rw-r--r-- 1 root root 6 May 7 10:52 f1 [root@localhost student]# useradd reza [root@localhost student]# chown reza f1 [root@localhost student]# ls -l f1 -rw-r--r-- 1 reza root 6 May 7 10:52 f1

Reza Abdillah 125410037


Latihan [student@localhost ~]$ touch kosong -rw-r--r-- 1 student student 0 Apr 4 22:42 kosong ~[student@localhost ~]$ ls -l /etc/group -rw-r--r-- 1 root root 549 Oct 19 2006 /etc/group ~[student@localhost ~]$ ls -ld /etc drwxr-xr-x 72 root root 5736 Apr 4 22:06 /etc/ [student@localhost ~]$ rm /etc/group rm: remove write-protected regular file `/etc/group'? [student@localhost ~]$ rm /etc/group rm: remove write-protected regular file `/etc/group'? cp /etc/group [student@localhost ~]$ ls -l /group ls: /group: No such file or directory [student@localhost ~]$ chmod +x -rwxr-xr-x 1 student student 0 Apr 4 22:42 kosong* [student@localhost ~]$ chmod -x kosong -rw-r--r-- 1 student student 0 Apr 4 22:42 kosong. [student@localhost ~]$ chmod u+w kosong -rw-r--r-- 1 student student 0 Apr 4 22:42 kosong [student@localhost ~]$ chmod g+w kosong -rw-rw-r-- 1 student student 0 Apr 4 22:42 kosong [student@localhost ~]$ chmod o+x kosong -rw-rw-r-x 1 student student 0 Apr 4 22:42 kosong* [student@localhost ~]$ touch file3 [student@localhost ~]$ chmod 777 file3 -rwxrwxrwx 1 student student 0 Apr 4 22:55 file3* [student@localhost ~]$ date >> file3 -rwxrwxrwx 1 student student 29 Apr 4 22:56 file3* [student@localhost ~]$ ls -l file 3 ls: file: No such file or directory ls: 3: No such file or directory [student@localhost ~]$ rm file3 rm: remove regular file `file3'?

S-ar putea să vă placă și