190 likes | 449 Views
Chapter 31: Daemons. CS-691x: UNIX Administration Presented By: Dan Winter Date: 07/01/1999. Essential Daemons. init : the first process that runs (PID 1) cron : the general system scheduler inetd : the super-daemon--master. Essential Daemons: init.
E N D
Chapter 31: Daemons CS-691x: UNIX Administration Presented By: Dan Winter Date: 07/01/1999
Essential Daemons • init: the first process that runs (PID 1) • cron: the general system scheduler • inetd: the super-daemon--master
Essential Daemons: init • Two startup modes: • child shell • single shell • linux single, init 1 • /etc/inittab • Errors -> /var/logs/messags, {console} • Killing off Zombie Processes
Essential Daemons: cron • Runs commands at preset times • Daily cleanup, Filesystem management • /etc/crontab • /etc/cron.daily, /etc/cron.hourly, /etc/cron.monthly, /etc/cron.weekly
Essential Daemons: inetd • /etc/inetd.conf • /etc/services • /etc/rpc • /etc/rc.d/init.d
Inetd: /etc/inetd.conf name socket protocol fork executor full-qualified pathshell stream tcp nowait root /usr/sbin/tcpd in.rshdlogin stream tcp nowait root /usr/sbin/tcpd in.rlogind#exec stream tcp nowait root /usr/sbin/tcpd in.rexecdtalk dgram udp wait root /usr/sbin/tcpd in.talkdntalk dgram udp wait root /usr/sbin/tcpd in.ntalkd#dtalk stream tcp waut nobody /usr/sbin/tcpd in.dtalkd
Inetd: /etc/services name port/type alias commentbiff 512/udp comsat login 513/tcp # BSD rlogind(8) who 513/udp whod # BSD rwhod(8) shell 514/tcp cmd # BSD rshd(8) syslog 514/udp # BSD syslogd(8) printer 515/tcp spooler # BSD lpd(8)
Inetd: /etc/rpc name port aliases portmapper 100000 portmap sunrpc rstatd 100001 rstat rstat_svc rup perfmeter rusersd 100002 rusers nfs 100003 nfsprog
Inetd: /etc/rc.d/init.d $ ls /etc/rc.d/init.d amd.init inet network sendmail.init yppasswd.initcron.init keytable nfs single ypserv.initfunctions killall nfsfs skeletongpm lpd.init pcmcia smbhalt mars_nwe.init portmap.init snmpd.inithttpd.init named.init random syslog $ /etc/rc.d/init.d/inetUsage: inet {start|stop} $
NFS/NIS NFS (Already covered) /etc/exports, /etc/fstab, /etc/rc.d/init.d/nfs, /etc/rc.d/init.d/nfsfs NIS (Separate Topic) /etc/ypserv.conf, /usr/sbin/ypserv, /usr/sbin/yppoll, /usr/sbin/yppush, /usr/sbin/ypset, /usr/bin/ypcat, /usr/bin/ypmatch, /usr/bin/ypwhich, /usr/bin/yppasswd, etc.
Internet talkd, rwhod, ftpd, popper, rlogind, telnetd, rshd, rexecd, timex, xntpd, routed, gated, named, nntpd, syslogd, fingerd, httpd, and more...
Internet: talkd • /etc/inetd.conf: talk dgram udp wait root /usr/sbin/tcpd in.talkd ntalk dgram udp wait root /usr/sbin/tcpd in.ntalkd #dtalk stream tcp waut nobody /usr/sbin/tcpd in.dtalkd • /etc/services: talk 517/udp # BSD talkd(8) ntalk 518/udp # SunOS talkd(8) • /usr/sbin/inetd, (/usr/sbin/talkd) • /usr/bin/talk, /usr/bin/mesg
Internet: ftpd • /etc/inetd.conf: ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a #tftp dgram udp wait root /usr/sbin/tcpd in.tftpd • /etc/services: ftp-data 20/tcp ftp 21/tcp tftp 69/udp sftp 115/tcp • /usr/sbin/inetd • /usr/bin/ftp, /usr/bin/tftp, /usr/bin/ncftp, /usr/bin/pftp
Internet: rlogind, telnetd, rshd, rexecd • /etc/hosts.equiv: ssu037.ssu.edu listserver.ssu.edu • ~/.rhosts: ssu037.ssu.edu dkwinter listserver.ssu.edu dkwinter • /usr/sbin/inetd • /bin/rlogin, /bin/rsh, /bin/rcp, /bin/rexec, /bin/telnet
Internet: routed, gated • /etc/gateways: Used for definition of distant gateways • /etc/networks: Associations of IP numbers with network names • /etc/hosts: Internet host table • netstat -nr Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 131.118.32.0 0.0.0.0 255.255.240.0 U 1500 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 3584 0 0 lo 0.0.0.0 131.118.47.254 0.0.0.0 UG 1500 0 0 eth0 • /usr/sbin/routed, /usr/sbin/gated • /bin/netstat, /sbin/ifconfig, /sbin/route, (/etc/defaultrouter)
Internet: named • /usr/local/adm/named: DNS database for a Zone-capable server • /etc/resolv.conf: Search domain, and nameservers listed by priority • /etc/hosts: Internet host table • nslookup psu.edu Server: ssu037.ssu.edu Address: 131.118.32.11 Name: psu.edu Addresses: 146.186.149.198, 146.186.157.8, 146.186.15.17 • /usr/sbin/named • /etc/resolv.conf, /usr/bin/nslookup, /usr/bin/dig
Internet: syslogd • /etc/syslog.conf # Log anything (except mail) of level info or higher. # Don't log private authentication messages! *.info;mail.none;authpriv.none /var/log/messages • /usr/sbin/syslogd • /etc/syslog.conf, /var/log/*
Internet: httpd • /usr/local/etc/httpd/httpd.conf: Used for definition of web server • /usr/local/etc/httpd/access.conf: Used for definition of directories • /usr/local/etc/httpd/srm.conf: Used for definition of web settings • /usr/sbin/httpd