Professional Documents
Culture Documents
CIT 0563
Tick agree
3. Select installation mode -> new installation
a. Partition divide the available space of hard drive into the smaller portions
b. Every hard disk has a partition table space for 4 entries and correspond to a primary and
extended partition
c. Only 1 extended partition entry is allowed
d. Primary partition consists of a continuous range of cylinders assigned to a particular file
system (limited for 4 partition per hard disk)
e. Extended partition consists of a continuous range of cylinders but it can subdivided into
logical partition.
f. Logical partitions do not require entries in the main partition table
b. For swap
i. Filesystem: swap
ii. Mount point : swap
iii. Size : 2GB
4. The partition installation is complete
6. Novell customer centerconfiguratiom and online -> run update and next
7. Configure network services -> next ( must have the CA management information or LDAP server)
9. Add local users -> next ( no key-in the users, it will add user at Lab 2) -> until finish
1. Use ls –l command to display the contents of current directory with the assigned permissions for
each file or subdirectory
a. Owner – u
b. Group –g
c. Others – o
d. All – a
Example Result
chmodu+x The owner give permission for execute
chmod g=rw All group members can read and write
chmod u=rwx The owner can read, write and execute or give all permission
Exercise
Create a file name as netsec.txt and change the default permission of the file to certain condition which
is owner get all permission, groups can be read and write and others can execute only.
Root # vi netsec.txt
:wq
Root # 11
1. root can change the user and group affiliate of file by using command chown
example: chownnew_user.new_group file
3. create file name called as hello.text under user root. Then, change the ownership from root to
jwong for hello.text using chown command.
answer:
root > vi hello.txt
:wq
Root >ls –al hello.txt or ll
Root >chown jwong.lab10 hello.txt
root>ll hello.txt
root>chgrp lab10 hello.txt
2.4 Modify default access permissions
1. by default setting, file create with access 666 and directories with 777.
2. To modify the setting use umask command with 3 numeric digit such as 022
3. Create file name as example1 and create directory called as exampledir1 with umask 000. Then,
create file name as example2 and create directory called as exampledir2 with umask 022.
1. Sticky bit use on folders in order to avoid the deletion of a folder and its content by other users
2. Example: create a project (A folder) where people will try to dump files for sharing but they
should not delete the files created by other users.
2.7 Answer
root> cd /home
root>mkdirprojecta
root>ll
a) GID = 2000
i. the primary group for all new users is “lab10” and the secondary group is
“users”
ii. include the new users full names in the /etc /passwd file
iii. the user’s home directories located under /home
iv. do not create the home directories on server 2
v. the password for each user is “suse”
3.5 Answers
Server 1
server 2
Server 2
3. Using id command:
id -g -n asharir
---> sem4ns3 (As result: display group own by the user)
2. 3 interfaces:
a. Lo – the loopback device which available on every linux system
b. Eth0 – first Ethernet adapter of the computer
c. Sit0 – special virtual device which can be used to encapsulate IPv4 packets into IPv6 packets
5. To display information about additional statistics information about the devices by using ip –s
link show eth0
6. To assign ip address using ip address add 10.0.0.2/24 brd + dev eth0 command
10. To set a route to the locally connected network using ip route add 10.0.0.0/24 dev eth0
command
11. To set a route to a different network using ip route add 192.168.l.0/24 via 10.0.0.100 (gateway)
command
12. To delete entry from routing table use ip route delete 192.168.1.0/24 dev eth0
4.2 Practical lab
Server1 # ifconfig
1. Setup the dhcp server with IP address 192.168.211.1/24 (depends on the IP address given in
VMWare).
2. Setup the client to get the IP address from the dhcp server by using Windows XP.
DNS (Domain Name Server) need to resolve the domain names and hostnames into IP address.
Master zone DNS server Includes all hosts from network and DNS server
master zone stores up-to-date records for all the hosts
in the domain
Slave domain DNS server Copy of the master zone and obtain its zone data with
zone transfer operations from its master server. It
responds authoritatively for the zone as long as valid
zone.
a. yast2 –i bind
b. yast2 –i bind-chroot
c. yast2 –i bind-devel
d. yast2 –i bind-doc
e. cd
f. cd /etc/
g. vi named.conf
h. :set number
Line 127
Esc y8 -> to copy
p -> to paste
then edit with following information
or
:set number
at line 136
type it
i. cd /var/lib/named
j. ll Copy file 127.0.0.zone to file 192.168.0.zone
k. cp 127.0.0.zone 192.168.0.zone
Copy file localhost.zoneto file
l. cplocalhost.zonegmi.net.zone
Edit m. ll gmi.net.zone
configuration file n. vi gmi.net.zone
192.168.0.zone
(forward IN SOA gmi.net root.gmi.net
lookup)&gmi.net.
IN NS alex.gmi.net
zone (reversed
lookup) alex IN A 192.168.0.100
:wq
o. vi 192.168.0.zone
IN SOA gmi.net. root.gmi.net.
IN NS alex.gmi.net.
:wq
p. vi /etc/resolv.conf To resolve or translate the
search gmi.net ipaddres to domain name
nameserver 192.168.0.100 gmi.net
:wq
2. On server 2 (client)
a. ip address add 192.168.111.2/24 brd + dev eth0 Assign ip address for server 2
b. Useradd –m –g 100 –u 1001 geeko
c. Useradd –m –g 100 –u 1002 cicak
d. Edit /etc/hosts If assign ip using ip add command is not
working, you may assign ip add manually.
Network File System (also known as NFS) is a protocol developed by Sun Microsystems. It allows a user
on a computer to access files that are sent across a network – similar to the way one accesses local
storage. It is most common in systems with a similar composition to the UNIX system; however, it is also
readily available for other systems, such as Mac OS, OpenVMS, Microsoft Windows, Novell NetWare,
and IBM AS/400
In other words: in NFS, file sharing can be done between linux operating system. While file sharing is
SAMBA canhappened between linux operating system and other operating system (with supporting
tools).
On server 1
Create a group names lab20 with GID 6000 and create user base on the requirements below:-
Create two directory under /mnt that are student and trainer. Both directories must have all permission
for the owner, all permission for group and read write permission for others. The IP address for server 1
is 192.168.111.128/24 and server 1 becomes the NFS server.
On server 2
Create a group names lab20with GID 6000 and create user base on the requirements below:-
Create two directory under /mnt that are stu and train. The IP address for server 2 is
192.168.111.129/24 and server 2 becomes the NFS client.
On server 1
1. yast2 nfs_server
2. yast2 nfs
3. ifconfig
4. ip address add 192.168.111.128/24 brd + dev eth0
5. groupadd –g 6000 lab20
6. useradd –m –g 6000 –G 100 –c “Nabilahhuda” –u 6001 abil
7. passwdabil
8. aber
9. useradd –m –g 6000 –G 100 –c “Wong Mei Quan” –u 6002 wong
10. passwdwong
11. aber
12. useradd –m –g 6000 –G 100 –c “Sridevi” –u 6003 sri
13. passwdsri
14. aber Create directory mnt
Currently none content exist in directory /mnt
15. cd /mnt
direct
16. ll
17. mkdir student Change mode user trainer (775):
18. mkdir trainer u=rwx,g=rwx,o=rx
On server2
192.168.111.129:192.168..111.0/24
Here it shown that all files already detected from server1
(192.168.111.128) to server2(client).
20. mount -to mount server 1 to server 2
result: will display files that already mounted
(detected) from server 1
(Here will shown how many usage provided for both mount
21. df –h -- to display disk usage point (/mnt/student and/mnt/trainer))
22. showmount –e 192.168.111.128
On Server1
- Size is 1.5GB
- Filesystem is ext3
- The group "projecta" and the owner have full access to this directory, no access at all for
other users
- All files created in /jobs/projecta will belong to the group "projecta" regardless of the users'
primary GID
d. Setup the NFS server to export the directories /home and /jobs/projecta
On Server2
e. Setup Server2 to mount the the shared directories automatically from Server1 during boot
- The directories /home and /jobs/projecta from Server1 are to be mounted to /home and
/jobs/projecta respectively
1. use the samba client to do the lookup and connect to the samba server
2. use mount to use the samba share as a local directory
On server1
On server2
1. yast2 –I samba-client
2. rcSuSEfirewall2 stop
3. smbclient –L//192.168.111.4 –U Justin
4. cd mnt
5. ll
6. mkdirsambashare
7. smbclient //192.168.111.4/student –U Justin
8. passwd = novell
9. smb:\>ls
10. smb:\> get tt
11. smb:\> exit
12. mount –t smbfs //192.168.111.128/trainer /mnt/sambashare –o username=Justin
13. mount
14. ip address add 192.168.111.129/24 brd + dev eth0
Lab 10: Setting email server
Requirement to setup email server – dns server
zone “111.168.192.in-addr.arpa” in {
type master;
file “192.168.111.zone”;
};
:wq
5. cd /var/lib/named
6. ll
7. cp 127.0.0.zone 192.168.111.zone
8. cp localhost.zone saya.org.zone
9. ll
10. edit 192.168.111.zone
IN NS server1.saya.org
1 IN PTR server1.saya.org
:wq
:wq
13. edit /etc/HOSTNAME
server1.saya.org
:wq
14. yast2 lan
NIC -> edit
Static IP address: 192.168.111.1
Netmask: 255.255.255.0
Hostname: server1
Domain name: saya.org
Click -> advanced -> additional address
->eth01
->192.168.111.128
->255.255.255.0
15. rcnamed start
16. rcSuSEfirewall2 stop
17. nslookup 192.168.111.1
18. nslookup server1.saya.org
1. rpm –q postfix
2. edit /etc/postfix/main.cf
delete #
myhostname=server1.saya.org
mydomain=saya.org
inet_interfaces=all
mydestination=$myhostname, localhost.$mydomain, local.$mydomain, mail.$mydomain,
www.$mydomain, ftp.$mydomain
add #
#myhostname=server1.saya.org
#inet_interfaces=localhost
#mydestination=$myhostname, localhost.$mydomain
:wq
3. postmap hash:/etc/postfix/transport
4. rcpostfix status
5. rcpostfix start
6. telnet server1.saya.org 25
7. quit
8. telnet 192.168.111.1 25
9. quit
10. telnet 192.168.111.128 25
11. quit
11.1 LVM
On Server1
• Size : 100MB
• Filesystem: 0x8e
1. yast2 disk -> file system: 0x8e LVM -> size:100MB -> next
2. LVM -> filename:ftp1->next -> size:50MB->next-> until finish
• Give full permission for owner, read and execute for group and full permission for others -
/srv/ftp
• susri
• Create file c1 c2 c3 c4 c5
On server2
• sucicak
• Create file cc1 cc2 cc3 cc4 cc5
• Get : to download
• Put : to upload
1. yast2 –i pure-ftpd
2. cd /etc/pure-ftpd
3. ll
4. cp pure-ftpd.conf pure-ftpd.conf.ori
5. ll
6. edit pure-ftpd.conf
Bind 192.168.111.131,21
:wq
7. rcpure-ftpd start
8. cd /srv
9. ll
10. mkdir ftp
11. ll
12. chmod 757 ftp
13. rcSuSEfirewall2 stop
new console
1. susri
2. cd /srv/ftp
3. ll
4. touch c1 c2 c3 c4 c5
5. ll
6. yast2 firewall -> advanced add port 21
7. edit /etc/sysconfig/SuSEfirewall2
FW_LOAD_MODULES=ip_conntrack_ftp
FW_SERVICES_ACCEPT_EXT=”0/0,tcp,21”
:wq
Server2 (FTP client IP address= 192.168.111.132/24)
new console
1. useradd –m –g 100 –c “cicak” –u 1001 cicak
2. sucicak
3. cd
4. pwd
5. ll
6. cd Documents
7. ll
8. touch a1 a2 a3 a4 a5
9. ftp 192.168.111.131
10. ls
11. get c1
12. exit
get – download
put –upload
Lab 11: Setting LDAP server and client
Lab 12: Apply tar for incremental or full backup
Lab 13: Apply acl with setfacl
Lab 14: Apply disk quota management
Lab 15: Configure log file in syslog.conf