Upload
gary-harrison
View
214
Download
1
Embed Size (px)
Citation preview
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
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
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
5/14
Netgroups(2)
• Usage• Definition of permissions
– /etc/exports– /etc/hosts.equiv or .rhosts in user’s
• Account info /etc/passwd
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
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
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
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
10/14
Char 21 Electronic Mail
• Content– Mail Systems– Aliases
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
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
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
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