Download presentation
Presentation is loading. Please wait.
Published byAda Payne Modified over 8 years ago
1
Sys Admin Course NFS and SAMBA Fourie Joubert
2
Sys Admin Course NFS NFS is the Network File System It allows Linux systems to share a file system, or to mount a shared file system
3
Sys Admin Course The NFS client Mounting an NFS file system that is being shared by another computer mount -t nfs -o options host: /remote/export /local/directory
4
Sys Admin Course Mounting an NFS file system that is being shared by another computer using a line in fstab host:/remote/export /local type options 0 0
5
Sys Admin Course Common NFS mount options – intr: allow interruptions – nfsvers=n: specifies NFS version – noacl: disables acls – tcp: uses tcp – udp: uses udp
6
Sys Admin Course The NFS server rpcbind needs to be running service rpcbind status nfs needs to be running service nfs start service nfslock start chkconfig nfs on chkconfig nfslock on
7
Sys Admin Course NFS server configuration /etc/exports export host1(options1) host2(options2) /home train1.bi.up.ac.za train2.bi.up.ac.za /home *.bi.up.ac.za /home 137.215.69.0/255.255.255.0
8
Sys Admin Course Default options – ro: read only (rw) – sync: will not reply to requests before changes made by previous requests are written to disk (async) – wdelay: the NFS server will delay writing to the disk if it suspects another write request is imminent – root_squash: this prevents root users connected remotely (as opposed to locally) from having root privileges
9
Sys Admin Course Special notes – The format of the /etc/exports file is very precise, particularly in regards to use of the space character – Remember to always separate exported file systems from hosts and hosts from one another with a space character – However, there should be no other space characters in the file except on comment lines
10
Sys Admin Course /home bob.example.com(rw) – The first line allows only users from bob.example.com read/write access to the /home directory – The second line allows users from bob.example.com to mount the directory as read- only (the default), while the rest of the world can mount it read/write
11
Sys Admin Course The exportfs command allows you to export file systems after defining them, without rebooting or restarting the NFS services -r: reexport all entries in etc/exports -a: causes all entries to be exported or unexported -o: exports listed file systems -u: unexport all -v: verbose
12
Sys Admin Course Discovering NFS exports showmount –e server Hostname formats – single machine – *.example.com – 192.168.0.0/24 – 137.215.69.0/255.255.255.0 – Netgroups (yp/nis only)
13
Sys Admin Course NFS version 4 NFS version 4 has some additional configurations /etc/fstab /shared/nfs4exports/shared none rw,bind 0 0 /etc/exports /nfs4exports 137.215.69.0/24(rw,sync,fsid=0) /nfs4exports/shared 137.215.69.0/24(rw,sync) – fsid=0 NFSv4 has a concept of a root of the overall exported filesystem. The export point exported with fsid=0 will be used as this root.
14
Sys Admin Course On the client /etc/fstab server:/share /share nfs4 defaults 0 0
15
Sys Admin Course Configuring idmapd – Edit /etc/idmapd.conf and set the Domain Domain = mydomain.com – Make sure idmapd is running service idmapd start chkconfig idmapd on On the client mount –t nfs4 servername:/ /localpath
16
Sys Admin Course SAMBA SAMBA provides Windows file and printer sharing from a Linux server – It can also provide some authentication services
17
Sys Admin Course Installing SAMBA yum install samba SAMBA runs several services – smbd: file sharing, printing services, user authentication, resource locking, and data sharing – nmbd: NetBIOS name service requests – winbindd: NSS Name Service Switch (user and system information)
18
Sys Admin Course Create a directory to share mkdir /shared chown trainn:users /shared trainn is for example train1 or train2
19
Sys Admin Course Edit /etc/samba/smb.conf [global] workgroup = Train netbios name = trainn security = user [sharename] comment = “Share from trainn” path = /shared valid users = trainn public = no writable = yes printable = no create mask = 0765
20
Sys Admin Course Create a password file smbpasswd -a trainn -c creates the file and –a adds a user Start SAMBA service smb start
21
Sys Admin Course Testing SAMBA smbclient –L trainn.bi.up.ac.za smbclient –U trainn –L trainn.bi.up.ac.za smbclient –U trainn \\\\trainn.bi.up.ac.za\\shared
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.