Upload
sharon-stokes
View
214
Download
0
Embed Size (px)
Citation preview
CIS 192B – Lesson 3
Network Information Services
CIS 192B – Lesson 3
Types of Services
• Infrastructure– DHCP, DNS, NIS, AD, TIME
• Intranet– SSH, NFS, SAMBA
• Internet– MAIL, WEB, FTP, CUPS
CIS 192B – Lesson 3
Components of a Service
/
etc usr var
sysconfig init.d bin libsbin log
CIS 192B – Lesson 3
How To Change a Hostname
• Use the hostname command to change the name in RAM
• Edit /etc/sysconfig/network to make the change permanent. (Note: some Linux systems use the file /etc/hostname)
• Update the /etc/hosts file to use the new name with the loopback entry. (Note: this is very important for sendmail.)
CIS 192B – Lesson 3
Components of NIS
• The ypserv package contains the server daemon and its configuration file.
• The ypbind package contains the client daemon and its configuration file.
• The yp-tools package has several client utilities: ypcat - dumps the content of a particular NIS map file.
ypwhich - specifies the name of the NIS server you are using.
ypmatch - like ypcat, but returns only specific key values
yppasswd - allows the user to change their password on the NIS server
NIS is from Sun Microsystems and is designed around the Remote Procedure Call API and utilizes the portmap daemon for its operation. It was formerly called "Yellow Pages“ – thus the “yp” prefix
CIS 192B – Lesson 3
Server Side NIS• /etc/ypserv.conf file syntax:
option: <argument> # This is an option linehost : domain : map : security # This is an access rule
• Host Specifiers – hostname – IP address – network addresses
• Security – none – port – deny
• ypserv - serves the map files for clients in the domain • ypinit - creates the map files • yppasswdd - allows clients to change passwords on the server
CIS 192B – Lesson 3
The NIS Clients
• Verify that portmap is running and that the firewall is allowing both udp and tcp packets from the server.
• Setup the NIS domain name – Run the command domainname name – Set the variable NISDOMAIN=doimainname in the
/etc/sysconfig/network file.
• Configue the yp.conf file using one of three syntaxes: – domain NISDOMAIN server HOSTNAME – domain NISDOMAIN broadcast
– ypserver HOSTNAME • Edit the /etc/nsswitch.conf file and add nis to the appropriate
services.
• Start the ypbind</B< tt> service.
Clients need to run a daemon as well since accessing files like /etc/passwd and /etc/hosts is a common and continual process.
CIS 192B – Lesson 3
Project Diagram 1
RoterRouter/Firewall
RoterRoterRoter
172.30.4.0/24
NoPar
Internet
192.168.X.0/24
DNSDHCPNFS
MailCUPSSSH
Server1 Server2 Client1
CIS 192B – Lesson 3
Project Diagram 2
RoterRouter/Firewall NoPar
172.30.4.0/24
192.168.X.0/24 192.168.Y.0/24
Roter Roter Roter Roter
Client Server NFS SSH DHCP
Server Mail DNS
Server HTTP FTP
Internet
CIS 192B – Lesson 3
Project Diagram 3
RoterRouter/Firewall NoPar
172.30.4.0/24
Internet
RoterRouter/FirewallRoterServer CUPS DNS
RoterServer1 DHCP NFS
RoterServer2 SSH DNS