1/14 char 18 sharing system files content –nis(the network information service) –nis+

14
1/14 Char 18 Sharing System F iles • Content NIS(The Network Information Service) – NIS+

Upload: gary-harrison

Post on 14-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

1/14

Char 18 Sharing System Files

• Content– NIS(The Network Information Service)– NIS+

Page 2: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

2/14

NIS Introduction

• NIS’s Old name : Sun Yellow Pages ==> yp prefix• Support for NIS and NIS+

– Solaris - Partially, Yes– SunOS - Yes, No

• Server - content of shared files (maps)– ex) passwd.byname,passwd.byuid– group, networks, hosts, protocols, services aliases

• Server locating– IP broadcasting– ypset

Page 3: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

3/14

Magic NIS Cookies

• Local priority - local machine’s info overrides NIS copy– /etc/passwd, /etc/group– Magic Cookies(‘+’)

• Global priority - NIS copy supersedes local copy– /etc/hosts, /etc/networks, /etc/protocols

Page 4: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

4/14

Netgroups

• Abstraction of sets of user, machines, nets• /etc/netgroup• Format

– groupname list-of-members– list-of-members : (hostname, username, domainname)– Blank, ‘-’ symbol– Example

bobcats (snake, , ) (headrest, , )

servers (anchor, , ) (moet, , ) (piper, , ) (kirk, , )

allhosts beers serves

Page 5: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

5/14

Netgroups(2)

• Usage• Definition of permissions

– /etc/exports– /etc/hosts.equiv or .rhosts in user’s

• Account info /etc/passwd

Page 6: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

6/14

Technical Overview of NIS

• NIS directory– /var/yp, /usr/etc/yp, /etc/yp

• two ndbm file for each map– map.dir, map.pag– makedbm command

==> Makefile (run make in NIS dir)

• ypxfr, yppush command• ypserv, ypbind daemon

• Figure P397,P398

Page 7: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

7/14

Setting Up an NIS Domain

• Run ypinit on each server (page 398,399)• On every machine(page 399)

– set domain name from one of system startup files• domainname command

– import /etc/passwd, /etc/group

Page 8: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

8/14

NIS+

• Site-wide hierarchy• More database-like• Not use flat file as NIS does• Incremental change and logging scheme• Built on top of Sun’s secure RPC system

Page 9: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

9/14

NIS+(2)

• From a client’s perspective, NIS+ looks much the same as any other administrative database system. Most data is accessed through the same library routines as always, and the complex world of domains, tables, permissions, and search paths is in the end rendered down to an analog of the original UNIX flat files

Page 10: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

10/14

Char 21 Electronic Mail

• Content– Mail Systems– Aliases

Page 11: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

11/14

Mail Systems

• Figure page 440• user agent (page 441,442)• transport agent

– SMTP(Simple Mail Transport Protocol)

• delivery agent– /bin/mail : local user– uux, spop : remote site user

• UUCP.POP(Post Office Protocol)

• Figure page 447

Page 12: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

12/14

• Spool Directory– /var/mail

• Mail Philosophy– A master mail server– A mail home for each user

• aliasing• maildrop field of the user database

Page 13: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

13/14

Mail Aliases

• Aliasing location– User agent’s config file– System-wide aliases file, /ect/aliases

• user’s forwarding file, ~/.forward– ex) ms1 : yskim, stoh, swkim ...

• A file containing a list of addresses– ex) phd1 : :include:/user/phdlist

Page 14: 1/14 Char 18 Sharing System Files Content –NIS(The Network Information Service) –NIS+

14/14

• Mail Forwarding– ~/.forward

• The Hashed Alias Database– /etc/aliases.dir - index– /etc/aliases.pag - real data– newaliases

• Mailing Lists– mylist : :include:/var/adm/aliases/mylist